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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
654841721010b21714ca12c3fa27f710e312615b | 2,333 | exs | Elixir | mix.exs | rbino/astarte_housekeeping_api | f2428afc499cdb5522e8113c6d34a5457b1cc317 | [
"Apache-2.0"
] | null | null | null | mix.exs | rbino/astarte_housekeeping_api | f2428afc499cdb5522e8113c6d34a5457b1cc317 | [
"Apache-2.0"
] | null | null | null | mix.exs | rbino/astarte_housekeeping_api | f2428afc499cdb5522e8113c6d34a5457b1cc317 | [
"Apache-2.0"
] | null | null | null | #
# This file is part of Astarte.
#
# Copyright 2017 Ispirata Srl
#
# 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 appl... | 27.447059 | 85 | 0.631376 |
65485fe8e41cca3b64f1068b96115ddc0e19ee84 | 4,839 | exs | Elixir | test/gateways/trexle_test.exs | lyoung83/gringotts | c119a3027e2a313a32f5abeb76a401979e48f7d0 | [
"MIT"
] | null | null | null | test/gateways/trexle_test.exs | lyoung83/gringotts | c119a3027e2a313a32f5abeb76a401979e48f7d0 | [
"MIT"
] | null | null | null | test/gateways/trexle_test.exs | lyoung83/gringotts | c119a3027e2a313a32f5abeb76a401979e48f7d0 | [
"MIT"
] | null | null | null | defmodule Gringotts.Gateways.TrexleTest do
use ExUnit.Case, async: false
alias Gringotts.{Address, CreditCard, FakeMoney}
alias Gringotts.Gateways.TrexleMock, as: MockResponse
alias Gringotts.Gateways.Trexle
import Mock
@valid_card %CreditCard{
first_name: "Harry",
last_name: "Potter",
number... | 29.687117 | 84 | 0.648274 |
654868d160ab4a6b96223c10f98b827587984655 | 3,750 | ex | Elixir | lib/client.ex | 0dayCTF/mitsu | 19868357aa9febc25fc61fccae36be9072500a64 | [
"BSD-3-Clause"
] | 2 | 2021-04-10T19:46:39.000Z | 2021-09-05T17:41:42.000Z | lib/client.ex | 0dayCTF/mitsu | 19868357aa9febc25fc61fccae36be9072500a64 | [
"BSD-3-Clause"
] | 1 | 2021-09-18T15:45:59.000Z | 2021-09-18T15:45:59.000Z | lib/client.ex | 0dayCTF/mitsu | 19868357aa9febc25fc61fccae36be9072500a64 | [
"BSD-3-Clause"
] | 2 | 2021-08-01T17:39:55.000Z | 2021-08-28T18:07:35.000Z | defmodule Mitsu.Client do
require Logger
use WebSockex
def start_link(state) do
{:ok, connection} = AMQP.Connection.open([
host: state["amqp_conn_details"]["host"],
username: state["amqp_conn_details"]["username"],
password: state["amqp_conn_details"]["password"],
heartbeat: state["am... | 26.408451 | 125 | 0.6296 |
654874a87d471fbbca035b248f59ffa70065a90b | 44,683 | ex | Elixir | lib/elixir/lib/exception.ex | vhf/elixir | 8e20b02a712e656cfffba617b07536aa503ab7e9 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/exception.ex | vhf/elixir | 8e20b02a712e656cfffba617b07536aa503ab7e9 | [
"Apache-2.0"
] | null | null | null | lib/elixir/lib/exception.ex | vhf/elixir | 8e20b02a712e656cfffba617b07536aa503ab7e9 | [
"Apache-2.0"
] | null | null | null | defmodule Exception do
@moduledoc """
Functions to format throw/catch/exit and exceptions.
Note that stacktraces in Elixir are only available inside
catch and rescue by using the `__STACKTRACE__/0` variable.
Do not rely on the particular format returned by the `format*`
functions in this module. They may ... | 29.454845 | 153 | 0.649039 |
6548beff148e533d0c551819584dd1fb381d889b | 191 | ex | Elixir | lib/transform.ex | OldhamMade/phoenix_sass | e07840c1561303bc960efcd4e7ae17a1faee15da | [
"Apache-2.0"
] | 4 | 2020-09-23T18:58:57.000Z | 2021-12-30T15:48:38.000Z | lib/transform.ex | OldhamMade/phoenix_sass | e07840c1561303bc960efcd4e7ae17a1faee15da | [
"Apache-2.0"
] | 26 | 2020-11-13T06:58:09.000Z | 2022-03-24T10:34:39.000Z | lib/transform.ex | OldhamMade/phoenix_sass | e07840c1561303bc960efcd4e7ae17a1faee15da | [
"Apache-2.0"
] | 2 | 2021-02-01T16:25:04.000Z | 2021-12-30T16:10:29.000Z | defmodule PhoenixSass.Transform do
defstruct [
:root,
:src,
:srcdir,
:subdir,
:basename,
:destdir,
:dest,
:opts,
:sass,
:result,
:error,
]
end
| 11.9375 | 34 | 0.52356 |
6548c8e9e3ba853d7377470b0d82328bb55138cc | 2,731 | ex | Elixir | lib/postgrex/scram.ex | enter-haken/postgrex | fb3438d4e6a56db81ddd0d578cdfc0484909c233 | [
"Apache-2.0"
] | 681 | 2016-06-16T12:28:22.000Z | 2022-03-30T08:48:42.000Z | deps/postgrex/lib/postgrex/scram.ex | rwtrecs/rocketseat-nlw5-inmana | 8ce8bc32e0bdd005c423394bb163945747b557e2 | [
"MIT"
] | 383 | 2016-06-17T14:49:41.000Z | 2022-03-21T18:13:19.000Z | deps/postgrex/lib/postgrex/scram.ex | adrianomota/blog | ef3b2d2ed54f038368ead8234d76c18983caa75b | [
"MIT"
] | 234 | 2016-06-16T16:14:47.000Z | 2022-03-03T00:43:59.000Z | defmodule Postgrex.SCRAM do
@moduledoc false
@hash_length 32
@nonce_length 24
@nonce_rand_bytes div(@nonce_length * 6, 8)
@nonce_prefix "n,,n=,r="
@nonce_encoded_size <<byte_size(@nonce_prefix) + @nonce_length::signed-size(32)>>
def challenge do
nonce = @nonce_rand_bytes |> :crypto.strong_rand_bytes... | 36.413333 | 98 | 0.668253 |
6548e1519a7a069614ac478aaf637064e3fc34f9 | 1,879 | ex | Elixir | lib/exflag.ex | tjhoff/exflag | 7ab09bb086edddebb631df29ef64cd1757c1d4b8 | [
"Apache-2.0"
] | 1 | 2019-06-19T19:50:55.000Z | 2019-06-19T19:50:55.000Z | lib/exflag.ex | tjhoff/exflag | 7ab09bb086edddebb631df29ef64cd1757c1d4b8 | [
"Apache-2.0"
] | null | null | null | lib/exflag.ex | tjhoff/exflag | 7ab09bb086edddebb631df29ef64cd1757c1d4b8 | [
"Apache-2.0"
] | null | null | null | defmodule ExFlag do
@moduledoc """
Documentation for ExFlag.
"""
alias ExFlag.FlagRequest
@endpoint Application.get_env(:exflag, :endpoint)
def start_link(_, name \\ __MODULE__) do
Agent.start_link(fn -> %{} end, name: name)
Agent.start_link(fn -> %{} end, name: :ex_flag_values)
end
def set_... | 26.097222 | 71 | 0.637573 |
6548e5944a5677cf4f4755e2fdb56f76eaad2e94 | 1,553 | ex | Elixir | lib/tackle_box_cds_web/endpoint.ex | rgovaerts/tackle_box_cds_api | 332cda4d576c469748677b9952a0d7fdf77d61c2 | [
"MIT"
] | null | null | null | lib/tackle_box_cds_web/endpoint.ex | rgovaerts/tackle_box_cds_api | 332cda4d576c469748677b9952a0d7fdf77d61c2 | [
"MIT"
] | null | null | null | lib/tackle_box_cds_web/endpoint.ex | rgovaerts/tackle_box_cds_api | 332cda4d576c469748677b9952a0d7fdf77d61c2 | [
"MIT"
] | null | null | null | defmodule TackleBoxCdsWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :tackle_box_cds
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key:... | 29.301887 | 97 | 0.721829 |
6548fe03065c1ff32df945ac8ffeb60b9426a8fb | 4,841 | ex | Elixir | lib/sitemap.ex | isavita/sitemap | 0fa66869646e1bace12f2e60bb08aeaa0f713f38 | [
"MIT",
"Unlicense"
] | 3 | 2019-05-17T00:57:02.000Z | 2020-04-03T12:38:53.000Z | lib/sitemap.ex | isavita/sitemap | 0fa66869646e1bace12f2e60bb08aeaa0f713f38 | [
"MIT",
"Unlicense"
] | 1 | 2020-02-18T14:15:48.000Z | 2020-02-18T14:15:48.000Z | lib/sitemap.ex | isavita/sitemap | 0fa66869646e1bace12f2e60bb08aeaa0f713f38 | [
"MIT",
"Unlicense"
] | 1 | 2020-02-18T11:29:25.000Z | 2020-02-18T11:29:25.000Z | defmodule Sitemap do
@moduledoc """
Documentation for Sitemaps.
"""
alias Sitemap.{Alternate, Config, Geo, Image, News, PageMap, Video}
@header """
<?xml version="1.0" encoding="UTF-8"?>
"""
@index """
<sitemapindex
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="ht... | 30.068323 | 124 | 0.627763 |
654936acc10ad9f286c11b3720b91c58f53dd14f | 3,473 | ex | Elixir | lib/central/account/libs/user_lib.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | lib/central/account/libs/user_lib.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | lib/central/account/libs/user_lib.ex | adelq/teiserver | 77140896df6b4e1ec9e680d64c31ffb528158d14 | [
"MIT"
] | null | null | null | defmodule Central.Account.UserLib do
use CentralWeb, :library
alias Bamboo.Email
alias Central.Account
alias Central.Account.User
alias Central.Account.GroupLib
alias Central.Helpers.TimexHelper
@spec colours :: {String.t(), String.t(), String.t()}
def colours(), do: Central.Helpers.StylingHelper.colo... | 28.941667 | 174 | 0.642384 |
65495bcf4d3f30f5634072d3c5a63085a824c6bc | 270 | exs | Elixir | test/animina_web/views/layout_view_test.exs | wintermeyer/animina | 44fb98b4cd2efd4ab425fc37e1ae68a6fa1c1f5a | [
"MIT"
] | 1 | 2021-04-17T20:36:24.000Z | 2021-04-17T20:36:24.000Z | test/animina_web/views/layout_view_test.exs | wintermeyer/animina | 44fb98b4cd2efd4ab425fc37e1ae68a6fa1c1f5a | [
"MIT"
] | 3 | 2021-04-15T19:45:43.000Z | 2021-04-16T06:08:24.000Z | test/animina_web/views/layout_view_test.exs | wintermeyer/animina | 44fb98b4cd2efd4ab425fc37e1ae68a6fa1c1f5a | [
"MIT"
] | null | null | null | defmodule AniminaWeb.LayoutViewTest do
use AniminaWeb.ConnCase, async: true
# When testing helpers, you may want to import Phoenix.HTML and
# use functions such as safe_to_string() to convert the helper
# result into an HTML string.
# import Phoenix.HTML
end
| 30 | 65 | 0.766667 |
654961447e96f66b6309b930658cb78de547a872 | 1,383 | ex | Elixir | charts/lib/charts/axes/magnitude_axis.ex | Refined-Process/charts_ex | 6d23eff5903496b7a4518a3208486a15a3354ae2 | [
"MIT"
] | null | null | null | charts/lib/charts/axes/magnitude_axis.ex | Refined-Process/charts_ex | 6d23eff5903496b7a4518a3208486a15a3354ae2 | [
"MIT"
] | null | null | null | charts/lib/charts/axes/magnitude_axis.ex | Refined-Process/charts_ex | 6d23eff5903496b7a4518a3208486a15a3354ae2 | [
"MIT"
] | null | null | null | defmodule Charts.Axes.MagnitudeAxis do
@moduledoc """
Exposes a struct representing configuration for an axis that has values that increase in a particular direction
"""
defstruct [:min, :max, :step, :label, grid_lines: &__MODULE__.default_grid_lines_fun/2]
@type min :: number()
@type max :: number()
@typ... | 34.575 | 113 | 0.673897 |
6549713ca2f0fc7a7f71adbced7f9819e78867fb | 714 | ex | Elixir | lib/neko/user_rate/store/dynamic_supervisor.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 21 | 2017-05-11T19:19:22.000Z | 2021-06-15T23:43:18.000Z | lib/neko/user_rate/store/dynamic_supervisor.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 41 | 2017-11-20T18:43:31.000Z | 2021-12-09T18:17:25.000Z | lib/neko/user_rate/store/dynamic_supervisor.ex | xmaid/neko-achievements | 4998e462efcc977e4ee1b3e2471023f427e400f6 | [
"MIT"
] | 97 | 2017-10-11T15:38:11.000Z | 2022-01-21T09:56:01.000Z | defmodule Neko.UserRate.Store.DynamicSupervisor do
use DynamicSupervisor
@name __MODULE__
# ------------------------------------------------------------------
# Client API
# ------------------------------------------------------------------
def start_link(arg) do
DynamicSupervisor.start_link(__MODULE... | 26.444444 | 70 | 0.44958 |
654977c76e5459a083a40ee2f2e96d5e7be3b84c | 1,080 | exs | Elixir | clients/firebase_hosting/test/test_helper.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firebase_hosting/test/test_helper.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/firebase_hosting/test/test_helper.exs | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | 1 | 2020-10-04T10:12:44.000Z | 2020-10-04T10:12:44.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 30 | 83 | 0.742593 |
6549931a7d91ecc4da487820094c4f4e2fa69867 | 3,182 | exs | Elixir | test/ecto/query/builder/dynamic_test.exs | alco/ecto | 8972c318d8ed551395607b0d6e15e3c6cfbf425a | [
"Apache-2.0"
] | null | null | null | test/ecto/query/builder/dynamic_test.exs | alco/ecto | 8972c318d8ed551395607b0d6e15e3c6cfbf425a | [
"Apache-2.0"
] | null | null | null | test/ecto/query/builder/dynamic_test.exs | alco/ecto | 8972c318d8ed551395607b0d6e15e3c6cfbf425a | [
"Apache-2.0"
] | 1 | 2020-10-07T16:52:00.000Z | 2020-10-07T16:52:00.000Z | defmodule Ecto.Query.Builder.DynamicTest do
use ExUnit.Case, async: true
import Ecto.Query.Builder.Dynamic
doctest Ecto.Query.Builder.Dynamic
import Ecto.Query
defp query do
from p in "posts", join: c in "comments", as: :comments, on: p.id == c.post_id
end
describe "fully_expand/2" do
test "wi... | 40.794872 | 108 | 0.518856 |
6549a956e3db99c42071a828c4e5422657320463 | 1,833 | ex | Elixir | clients/cloud_trace/lib/google_api/cloud_trace/v2/model/stack_frames.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/lib/google_api/cloud_trace/v2/model/stack_frames.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/cloud_trace/lib/google_api/cloud_trace/v2/model/stack_frames.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.25 | 127 | 0.729405 |
6549bc5c2f483ad1acd31c6b3af93262683885a5 | 914 | exs | Elixir | test/transaction_test.exs | svan-jansson/ex_sql_client | 0f72126a37736249a5bedf8d9e2b22a834189a78 | [
"MIT"
] | 1 | 2019-12-17T01:43:12.000Z | 2019-12-17T01:43:12.000Z | test/transaction_test.exs | svan-jansson/ex_sql_client | 0f72126a37736249a5bedf8d9e2b22a834189a78 | [
"MIT"
] | null | null | null | test/transaction_test.exs | svan-jansson/ex_sql_client | 0f72126a37736249a5bedf8d9e2b22a834189a78 | [
"MIT"
] | null | null | null | defmodule TransactionTest do
use ExUnit.Case
setup_all do
connection_string =
"Server=localhost; MultipleActiveResultSets=true; User Id=sa; Password=InsecurePassword123"
{:ok, conn} = ExSqlClient.start_link(connection_string: connection_string)
{:ok, %{conn: conn}}
end
@tag :integration
t... | 32.642857 | 97 | 0.63895 |
6549dd881567a772bc340457d7ab033e74b9eed1 | 2,490 | ex | Elixir | lib/regex_help_web/live/page_live.ex | maciejgryka/regex_help | 93fe33cadcf63597dadb5e3dac9a0ee8f05dac15 | [
"MIT"
] | 6 | 2021-05-24T08:21:34.000Z | 2021-11-19T14:29:55.000Z | lib/regex_help_web/live/page_live.ex | maciejgryka/regex_help | 93fe33cadcf63597dadb5e3dac9a0ee8f05dac15 | [
"MIT"
] | null | null | null | lib/regex_help_web/live/page_live.ex | maciejgryka/regex_help | 93fe33cadcf63597dadb5e3dac9a0ee8f05dac15 | [
"MIT"
] | 3 | 2021-11-19T14:32:00.000Z | 2022-01-17T00:13:18.000Z | defmodule RegexHelpWeb.PageLive do
use RegexHelpWeb, :live_view
alias Phoenix.LiveView.Socket
alias RegexHelper.Flags
@impl true
def mount(_params, _session, socket) do
socket =
socket
|> assign(query: "")
|> assign(regex_generated: "")
|> assign(regex_custom: "")
|> assign... | 30 | 86 | 0.655823 |
654a1a34fc58e872173f65a6a6da247697b4ef5b | 3,777 | ex | Elixir | kousa/lib/beef/scheduled_rooms.ex | movwf/dogehouse | c97c04164e98853c6221100a97cc4ff1af84de7b | [
"MIT"
] | 9 | 2021-03-17T03:56:18.000Z | 2021-09-24T22:45:14.000Z | kousa/lib/beef/scheduled_rooms.ex | movwf/dogehouse | c97c04164e98853c6221100a97cc4ff1af84de7b | [
"MIT"
] | 12 | 2021-07-06T12:51:13.000Z | 2022-03-16T12:38:18.000Z | kousa/lib/beef/scheduled_rooms.ex | movwf/dogehouse | c97c04164e98853c6221100a97cc4ff1af84de7b | [
"MIT"
] | 4 | 2021-07-15T20:33:50.000Z | 2022-03-27T12:46:47.000Z | defmodule Beef.ScheduledRooms do
import Ecto.Query
import Ecto.Changeset
alias Kousa.Utils.Pagination
alias Beef.Schemas.ScheduledRoom
alias Beef.Repo
@fetch_limit 16
def get_by_id(id) do
from(sr in ScheduledRoom,
where: sr.id == ^id,
inner_join: u in assoc(sr, :creator),
preload: ... | 24.525974 | 95 | 0.547789 |
654a1f40046a7e4aef1b03a2f58dc9cd12f1bea5 | 1,531 | ex | Elixir | lib/bookpile_web/endpoint.ex | bitboxer/bookpile | eabdb0c9dd5859621512b0af7b516ab11ac34825 | [
"MIT"
] | 4 | 2021-08-23T19:27:00.000Z | 2021-12-24T14:22:10.000Z | lib/bookpile_web/endpoint.ex | bitboxer/bookpile | eabdb0c9dd5859621512b0af7b516ab11ac34825 | [
"MIT"
] | 16 | 2021-08-23T16:48:07.000Z | 2022-02-28T17:25:37.000Z | lib/bookpile_web/endpoint.ex | bitboxer/bookpile | eabdb0c9dd5859621512b0af7b516ab11ac34825 | [
"MIT"
] | 2 | 2021-08-23T16:18:42.000Z | 2021-08-23T16:35:41.000Z | defmodule BookpileWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :bookpile
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_bookpil... | 30.019608 | 97 | 0.72175 |
654a51448839f4189763f42c6658e15dc5b2cc06 | 3,095 | ex | Elixir | lib/cog/permissions/eval/binary_expr.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 1,003 | 2016-02-23T17:21:12.000Z | 2022-02-20T14:39:35.000Z | lib/cog/permissions/eval/binary_expr.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 906 | 2016-02-22T22:54:19.000Z | 2022-03-11T15:19:43.000Z | lib/cog/permissions/eval/binary_expr.ex | matusf/cog | 71708301c7dc570fb0d3498a50f47a70ef957788 | [
"Apache-2.0"
] | 95 | 2016-02-23T13:42:31.000Z | 2021-11-30T14:39:55.000Z | defimpl Cog.Eval, for: Piper.Permissions.Ast.BinaryExpr do
alias Cog.Eval
alias Cog.Permissions.Context
alias Piper.Permissions.Ast
def value_of(%Ast.BinaryExpr{op: op, left: lhs, right: rhs}, context) do
comparator = comparison_type_to_function(op)
{lhsv, context} = Eval.value_of(lhs, context)
{r... | 32.925532 | 104 | 0.649111 |
654a9f88d38dfb615edd4d2cd27ddf4ec6048eaa | 660 | ex | Elixir | lib/web/router.ex | idabmat/game_api | c12eefb84ff5c9647ee2e06d7893e3aae1b48b2d | [
"MIT"
] | null | null | null | lib/web/router.ex | idabmat/game_api | c12eefb84ff5c9647ee2e06d7893e3aae1b48b2d | [
"MIT"
] | null | null | null | lib/web/router.ex | idabmat/game_api | c12eefb84ff5c9647ee2e06d7893e3aae1b48b2d | [
"MIT"
] | null | null | null | defmodule Web.Router do
use Web, :router
pipeline :api do
plug(:accepts, ["json"])
end
pipeline :api_auth do
plug(Web.Auth.Pipeline)
end
scope "/auth" do
pipe_through(:api)
get("/:provider", Web.Controllers.Auth, :request)
get("/:provider/callback", Web.Controllers.Auth, :callback)
... | 20 | 65 | 0.651515 |
654ae4e91f986d9eca143b5721b746702be11f4e | 4,777 | exs | Elixir | .credo.exs | mugimaru/ex_diet | 9602c07af27255decbb32fd7ae0c12b3ffe662a3 | [
"Apache-2.0"
] | 2 | 2020-06-25T11:51:46.000Z | 2020-09-30T14:00:40.000Z | .credo.exs | mugimaru/ex_diet | 9602c07af27255decbb32fd7ae0c12b3ffe662a3 | [
"Apache-2.0"
] | null | null | null | .credo.exs | mugimaru/ex_diet | 9602c07af27255decbb32fd7ae0c12b3ffe662a3 | [
"Apache-2.0"
] | 1 | 2020-01-29T08:43:07.000Z | 2020-01-29T08:43:07.000Z | # This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in ... | 40.142857 | 101 | 0.653339 |
654b0f1796f65853dff8f2b1e6f2f06faf141513 | 2,847 | ex | Elixir | lib/ace/governor.ex | CharlesOkwuagwu/Ace | e39bfbf5a99dde225d3adcf680885e0bd71a86a4 | [
"MIT"
] | null | null | null | lib/ace/governor.ex | CharlesOkwuagwu/Ace | e39bfbf5a99dde225d3adcf680885e0bd71a86a4 | [
"MIT"
] | null | null | null | lib/ace/governor.ex | CharlesOkwuagwu/Ace | e39bfbf5a99dde225d3adcf680885e0bd71a86a4 | [
"MIT"
] | null | null | null | defmodule Ace.Governor do
@moduledoc """
A governor maintains servers ready to handle clients.
A governor process starts with a reference to supervision that can start servers.
It will then wait until the server has accepted a connection.
Once it's server has accepted a connection the governor will start a n... | 35.148148 | 116 | 0.713734 |
654b1718dea1236acc224581f499dd34efc70b21 | 285 | ex | Elixir | lib/uf/pe.ex | edmaarcosta/IEEx | fb457be8c03b7a147463cdd2736f9699a699e22d | [
"MIT"
] | null | null | null | lib/uf/pe.ex | edmaarcosta/IEEx | fb457be8c03b7a147463cdd2736f9699a699e22d | [
"MIT"
] | 1 | 2017-12-05T15:58:10.000Z | 2017-12-05T15:58:10.000Z | lib/uf/pe.ex | edmaarcosta/ieex | fb457be8c03b7a147463cdd2736f9699a699e22d | [
"MIT"
] | 1 | 2018-10-01T19:35:47.000Z | 2018-10-01T19:35:47.000Z | defmodule IEEx.UF.PE do # 032141840
alias IEEx.Util
alias IEEx.UF.PE9
alias IEEx.UF.PE14
def is_valid?(input) do
ie = Util.only_numbers(input)
case String.length(ie) do
9 -> PE9.is_valid?(ie)
14 -> PE14.is_valid?(ie)
_ -> false
end
end
end
| 16.764706 | 35 | 0.617544 |
654b177c6a8fe306dda1d5b1c20f53067b5e3bbf | 929 | ex | Elixir | lib/bulmalab/application.ex | easink/bulmalab | eddd13d4717388fdccaeb97efaa2ac7ce723030a | [
"Apache-2.0"
] | null | null | null | lib/bulmalab/application.ex | easink/bulmalab | eddd13d4717388fdccaeb97efaa2ac7ce723030a | [
"Apache-2.0"
] | null | null | null | lib/bulmalab/application.ex | easink/bulmalab | eddd13d4717388fdccaeb97efaa2ac7ce723030a | [
"Apache-2.0"
] | null | null | null | defmodule Bulmalab.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
def start(_type, _args) do
# List all child processes to be supervised
children = [
# Start the endpoint when the application starts
... | 29.967742 | 67 | 0.719053 |
654b1b8d28de4d55b6c3f84dba5443a6df08908c | 2,046 | ex | Elixir | lib/xturn/supervisor.ex | xirsys/xturn-website | bf3c924e5d3112772fbb9f674a0d7105497c29ae | [
"Apache-2.0"
] | 73 | 2018-11-13T01:10:41.000Z | 2022-01-30T17:58:45.000Z | lib/xturn/supervisor.ex | xirsys/xturn-website | bf3c924e5d3112772fbb9f674a0d7105497c29ae | [
"Apache-2.0"
] | 1 | 2019-02-21T19:32:51.000Z | 2019-02-22T11:12:09.000Z | lib/xturn/supervisor.ex | xirsys/xturn-website | bf3c924e5d3112772fbb9f674a0d7105497c29ae | [
"Apache-2.0"
] | 8 | 2019-03-27T01:44:16.000Z | 2022-01-12T12:34:12.000Z | ### ----------------------------------------------------------------------
###
### Copyright (c) 2013 - 2018 Lee Sylvester and Xirsys LLC <experts@xirsys.com>
###
### All rights reserved.
###
### XTurn is licensed by Xirsys under the Apache
### License, Version 2.0. (the "License");
###
### you may not use this file ex... | 29.652174 | 89 | 0.609482 |
654b8d12501fce9730046097cb755dda1381abf0 | 4,139 | ex | Elixir | day8/lib/day8.ex | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | day8/lib/day8.ex | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | day8/lib/day8.ex | carlism/aoc_2020 | 5ffdba5d41d243562fa448a92ff02900354956bb | [
"MIT"
] | null | null | null | defmodule Day8 do
@moduledoc """
Documentation for Day8.
"""
def part1 do
Day8.start_link(Day8.parse_program("input.txt"))
|> elem(1)
|> Day8.run()
|> Day8.await_completion()
|> IO.puts()
end
def part2 do
program = Day8.parse_program("input.txt")
{:ok, pid} = Day8.start_link(pr... | 23.651429 | 79 | 0.576951 |
654b942597ed8284b6d722a06669dbda3a134bcc | 432 | exs | Elixir | test/gatehouse/model/target_test.exs | trutvo/gatehouse | 027d4dd35703d84e15b9b2297347350b9a8f5a6b | [
"Apache-2.0"
] | 1 | 2019-07-21T03:48:31.000Z | 2019-07-21T03:48:31.000Z | test/gatehouse/model/target_test.exs | trutvo/gatehouse | 027d4dd35703d84e15b9b2297347350b9a8f5a6b | [
"Apache-2.0"
] | 1 | 2021-03-07T17:54:41.000Z | 2021-03-07T17:54:41.000Z | test/gatehouse/model/target_test.exs | trutvo/gatehouse | 027d4dd35703d84e15b9b2297347350b9a8f5a6b | [
"Apache-2.0"
] | 2 | 2019-06-14T06:25:25.000Z | 2019-07-21T03:48:33.000Z | defmodule Gatehouse.TargetTest do
use ExUnit.Case
doctest Gatehouse.Target
alias Gatehouse.Target
test "add access_token parameter" do
uri = Target.add_access_token_to_uri("http://example.com", "1234")
assert "http://example.com?access_token=1234" == uri
uri = Target.add_access_token_to_uri("http:/... | 33.230769 | 81 | 0.733796 |
654b9c56d15816059c616dab15f3820d158480a8 | 2,867 | exs | Elixir | examples/process_fridge.exs | tlossen/elixir | 38567f7f84bfce69a58c0be0ee6959cc7c6b3d6b | [
"MIT"
] | 1 | 2015-10-25T11:30:13.000Z | 2015-10-25T11:30:13.000Z | examples/process_fridge.exs | tlossen/elixir | 38567f7f84bfce69a58c0be0ee6959cc7c6b3d6b | [
"MIT"
] | null | null | null | examples/process_fridge.exs | tlossen/elixir | 38567f7f84bfce69a58c0be0ee6959cc7c6b3d6b | [
"MIT"
] | null | null | null | % Example from http://learnyousomeerlang.com/more-on-multiprocessing#state-your-state
% and converted to Elixir.
%
% This example showcases Elixir communication between process, in a similar fashion to Erlang's.
% This example builds a small fridge where you can store, take and see items.
module Fridge
% Creates a n... | 28.107843 | 96 | 0.651901 |
654bc228b4f885ceda7a98caabd4482582ce61f1 | 4,536 | ex | Elixir | lib/sanbase_web/graphql/resolvers/project/project_metrics_resolver.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | lib/sanbase_web/graphql/resolvers/project/project_metrics_resolver.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | 1 | 2021-07-24T16:26:03.000Z | 2021-07-24T16:26:03.000Z | lib/sanbase_web/graphql/resolvers/project/project_metrics_resolver.ex | sitedata/sanbase2 | 8da5e44a343288fbc41b68668c6c80ae8547d557 | [
"MIT"
] | null | null | null | defmodule SanbaseWeb.Graphql.Resolvers.ProjectMetricsResolver do
import Sanbase.Utils.ErrorHandling, only: [handle_graphql_error: 3]
import Absinthe.Resolution.Helpers
import SanbaseWeb.Graphql.Helpers.Utils
alias Sanbase.Model.Project
alias Sanbase.Metric
alias Sanbase.Cache.RehydratingCache
alias Sanba... | 34.625954 | 97 | 0.674824 |
654bc88d5dcdf7b88bc60c84a3118dc35d0d4ed3 | 213 | exs | Elixir | apps/firestorm_data/priv/repo/migrations/20170305204652_add_slug_to_threads.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 10 | 2017-06-28T08:06:52.000Z | 2022-03-19T17:49:21.000Z | apps/firestorm_data/priv/repo/migrations/20170305204652_add_slug_to_threads.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | null | null | null | apps/firestorm_data/priv/repo/migrations/20170305204652_add_slug_to_threads.exs | CircleCI-Public/firestorm | 9ca2c46a2b2377370347ad94d6003eeb77be38d6 | [
"MIT"
] | 2 | 2017-10-21T12:01:02.000Z | 2021-01-29T10:26:22.000Z | defmodule FirestormData.Repo.Migrations.AddSlugToThreads do
use Ecto.Migration
def change do
alter table(:threads) do
add :slug, :string
end
create unique_index(:threads, [:slug])
end
end
| 19.363636 | 59 | 0.70892 |
654bcc8f1e03828a425854dae7b655ab4b0a956e | 1,444 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/security_policy_rule_matcher_config.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/security_policy_rule_matcher_config.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/security_policy_rule_matcher_config.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... | 30.723404 | 90 | 0.743767 |
654c18489d101b413baa2a46fef07aeb082f9f5b | 1,233 | exs | Elixir | test/text_based_fps/text_test.exs | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | 1 | 2022-03-02T12:18:07.000Z | 2022-03-02T12:18:07.000Z | test/text_based_fps/text_test.exs | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | 12 | 2021-05-31T21:41:09.000Z | 2021-07-30T03:18:09.000Z | test/text_based_fps/text_test.exs | guisehn/elixir-text-based-fps | 59a815da337309297f8b42ef3481277dd4d9b371 | [
"MIT"
] | null | null | null | defmodule TextBasedFPS.TextTest do
alias TextBasedFPS.Text
use ExUnit.Case, async: true
describe "paint/2" do
test "paints the text and resets to default color" do
assert Text.paint("foo", :danger) == "\e[31mfoo\e[0m"
end
test "encloses painted text without resetting to default color when enc... | 33.324324 | 102 | 0.631792 |
654c3539e0b24e1a933ced4297f1a4b7739934cf | 1,129 | exs | Elixir | config/config.exs | MassICTBV/nlexch-client-elixir | 794121d139092ad98be0445eee50434f7802ca2d | [
"MIT"
] | null | null | null | config/config.exs | MassICTBV/nlexch-client-elixir | 794121d139092ad98be0445eee50434f7802ca2d | [
"MIT"
] | null | null | null | config/config.exs | MassICTBV/nlexch-client-elixir | 794121d139092ad98be0445eee50434f7802ca2d | [
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 36.419355 | 73 | 0.753764 |
654c63224066845eef756900c059977a22139041 | 235 | ex | Elixir | lib/magnemite_web/plugs/assign_user.ex | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | lib/magnemite_web/plugs/assign_user.ex | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | lib/magnemite_web/plugs/assign_user.ex | andsleonardo/magnemite | 2a06c1520defeb193d718313ad3fc6a50349bc8d | [
"MIT"
] | null | null | null | defmodule MagnemiteWeb.Plugs.AssignUser do
@moduledoc false
import Plug.Conn
def init(default), do: default
def call(conn, _default) do
user = Guardian.Plug.current_resource(conn)
assign(conn, :user, user)
end
end
| 18.076923 | 47 | 0.723404 |
654c6e3c3563f5f628db8950a849963f996855f1 | 3,939 | ex | Elixir | clients/logging/lib/google_api/logging/v2/api/monitored_resource_descriptors.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/api/monitored_resource_descriptors.ex | leandrocp/elixir-google-api | a86e46907f396d40aeff8668c3bd81662f44c71e | [
"Apache-2.0"
] | null | null | null | clients/logging/lib/google_api/logging/v2/api/monitored_resource_descriptors.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... | 45.802326 | 292 | 0.711856 |
654c971685f6efcf8b742d56c1f3a57e12f4d8ed | 1,609 | ex | Elixir | lib/webchat_web/endpoint.ex | Bwuak/webchat | b6668be508481a1ff480303affaebdaf28604f41 | [
"MIT"
] | null | null | null | lib/webchat_web/endpoint.ex | Bwuak/webchat | b6668be508481a1ff480303affaebdaf28604f41 | [
"MIT"
] | 1 | 2020-08-04T19:50:09.000Z | 2020-08-04T19:50:09.000Z | lib/webchat_web/endpoint.ex | Bwuak/webchat | b6668be508481a1ff480303affaebdaf28604f41 | [
"MIT"
] | null | null | null | defmodule WebchatWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :webchat
# The session will be stored in the cookie and signed,
# this means its contents can be read but not tampered with.
# Set :encryption_salt if you would also like to encrypt it.
@session_options [
store: :cookie,
key: "_webchat_k... | 29.796296 | 97 | 0.71908 |
654c9b67fcc7459e13e14d888a11aa9088120a18 | 1,338 | ex | Elixir | apps/discovery_api/lib/discovery_api_web/views/multiple_data_view.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 26 | 2019-09-20T23:54:45.000Z | 2020-08-20T14:23:32.000Z | apps/discovery_api/lib/discovery_api_web/views/multiple_data_view.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 757 | 2019-08-15T18:15:07.000Z | 2020-09-18T20:55:31.000Z | apps/discovery_api/lib/discovery_api_web/views/multiple_data_view.ex | calebcarroll1/smartcitiesdata | b0f03496f6c592c82ba14aebf6c5996311cf3cd0 | [
"Apache-2.0"
] | 9 | 2019-11-12T16:43:46.000Z | 2020-03-25T16:23:16.000Z | defmodule DiscoveryApiWeb.MultipleDataView do
use DiscoveryApiWeb, :view
import DiscoveryApiWeb.Utilities.StreamUtils
def accepted_formats() do
["csv", "json", "geojson"]
end
def render(:describe, "csv", %{rows: rows}) do
row_values = Enum.map(rows, &Map.values/1)
[Map.keys(rows |> hd())]
|... | 22.677966 | 68 | 0.592676 |
654cb76e06c1dc5262b3031375767cee095ae9f9 | 1,763 | ex | Elixir | lib/calamity/aggregate_store.ex | Cantido/calamity | 203c95eca8cbe6cf7eab8a8f88f14ece6246935f | [
"MIT"
] | null | null | null | lib/calamity/aggregate_store.ex | Cantido/calamity | 203c95eca8cbe6cf7eab8a8f88f14ece6246935f | [
"MIT"
] | 1 | 2022-02-28T11:22:00.000Z | 2022-02-28T11:22:00.000Z | lib/calamity/aggregate_store.ex | Cantido/calamity | 203c95eca8cbe6cf7eab8a8f88f14ece6246935f | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Rosa Richter
#
# SPDX-License-Identifier: MIT
defprotocol Calamity.AggregateStore do
@moduledoc """
Stores `Calamity.Aggregate` structs.
"""
@doc """
Execute a command and then update an aggregate from the events it emits.
Returns `{events, store}`.
"""
def dispatch(sto... | 24.830986 | 88 | 0.648894 |
654cb92b4bb31febeb4f2966826eba54c6fdb421 | 575 | ex | Elixir | web/guardian_serializer.ex | korczis/maze | 128ca3958c9e62c4fdc53efa72799283d66b056d | [
"MIT"
] | null | null | null | web/guardian_serializer.ex | korczis/maze | 128ca3958c9e62c4fdc53efa72799283d66b056d | [
"MIT"
] | 3 | 2016-11-22T20:23:00.000Z | 2016-11-22T20:23:20.000Z | web/guardian_serializer.ex | korczis/maze | 128ca3958c9e62c4fdc53efa72799283d66b056d | [
"MIT"
] | null | null | null | defmodule Maze.GuardianSerializer do
@behaviour Guardian.Serializer
use Guardian.Hooks
alias Maze.User
def for_token(%User{:email => email, :token => token}) do
{:ok, %{email: email, token: token}}
end
def from_token(%{"email" => email, "token" => token}) do
{:ok, %User{email: email, token: toke... | 23.958333 | 82 | 0.65913 |
654ce57ec476e25c0c42b8329c2916abf774d8f6 | 3,461 | exs | Elixir | apps/omg_watcher/test/omg_watcher/api/account_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 177 | 2018-08-24T03:51:02.000Z | 2020-05-30T13:29:25.000Z | apps/omg_watcher/test/omg_watcher/api/account_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 1,042 | 2018-08-25T00:52:39.000Z | 2020-06-01T05:15:17.000Z | apps/omg_watcher/test/omg_watcher/api/account_test.exs | omisego/elixir-omg | 2c68973d8f29033d137f63a6e060f12e2a7dcd59 | [
"Apache-2.0"
] | 47 | 2018-08-24T12:06:33.000Z | 2020-04-28T11:49:25.000Z | # Copyright 2019-2020 OMG Network 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... | 27.91129 | 111 | 0.58278 |
654d0ba774f3532c0023815bdd186d961f681845 | 4,075 | exs | Elixir | lib/mix/test/mix/local/installer_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 1 | 2021-12-16T20:32:28.000Z | 2021-12-16T20:32:28.000Z | lib/mix/test/mix/local/installer_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 1 | 2020-09-14T16:23:33.000Z | 2021-03-25T17:38:59.000Z | lib/mix/test/mix/local/installer_test.exs | spencerdcarlson/elixir | 23d75ecdf58df80969e12f4420282238e19219a1 | [
"Apache-2.0"
] | 1 | 2020-11-25T02:22:55.000Z | 2020-11-25T02:22:55.000Z | Code.require_file("../../test_helper.exs", __DIR__)
defmodule Mix.Local.InstallerTest do
use MixTest.Case
test "fetch" do
dep_spec = {:git_repo, git: fixture_path("git_repo")}
fetcher = fn mix_exs ->
send(self(), mix_exs)
Mix.Task.run("deps.get", [])
end
config =
Mix.Local.Inst... | 36.061947 | 93 | 0.626012 |
654d0ec30224fd0be097b8605ab2fe36d25881f5 | 4,147 | ex | Elixir | lib/nerves_hub_user_api/api.ex | OffgridElectric/nerves_hub_user_api | dd77a47fd9bc51c9a76732056bc0b3fc0019f770 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub_user_api/api.ex | OffgridElectric/nerves_hub_user_api | dd77a47fd9bc51c9a76732056bc0b3fc0019f770 | [
"Apache-2.0"
] | null | null | null | lib/nerves_hub_user_api/api.ex | OffgridElectric/nerves_hub_user_api | dd77a47fd9bc51c9a76732056bc0b3fc0019f770 | [
"Apache-2.0"
] | null | null | null | defmodule NervesHubUserAPI.API do
@moduledoc false
@file_chunk 4096
@progress_steps 50
use Tesla
adapter(Tesla.Adapter.Hackney, pool: :nerves_hub_user_api)
if Mix.env() == :dev, do: plug(Tesla.Middleware.Logger)
plug(Tesla.Middleware.FollowRedirects, max_redirects: 5)
plug(Tesla.Middleware.JSON)
al... | 25.757764 | 96 | 0.616349 |
654d2f9604de51162b6c528f1b5008f1abe40824 | 206 | ex | Elixir | lib/lingo_hub/project.ex | LostKobrakai/lingohub | f18af24f559f955b4556bb2396cfb622b6b0ce98 | [
"Apache-2.0"
] | null | null | null | lib/lingo_hub/project.ex | LostKobrakai/lingohub | f18af24f559f955b4556bb2396cfb622b6b0ce98 | [
"Apache-2.0"
] | null | null | null | lib/lingo_hub/project.ex | LostKobrakai/lingohub | f18af24f559f955b4556bb2396cfb622b6b0ce98 | [
"Apache-2.0"
] | null | null | null | defmodule LingoHub.Project do
@type t :: %__MODULE__{
title: String.t(),
name: String.t(),
account: String.t()
}
defstruct title: nil, name: nil, account: nil
end
| 20.6 | 47 | 0.558252 |
654d5030c3cd6cc8eb20769c7b2fdad39de7b872 | 3,282 | exs | Elixir | config/dev.exs | CloudFire-LLC/fireguard | 50ccfc792cf580104922026fedbbf3cd6e374574 | [
"Apache-2.0"
] | 5 | 2020-05-22T00:24:39.000Z | 2021-06-18T18:28:45.000Z | config/dev.exs | CloudFire-LLC/fireguard | 50ccfc792cf580104922026fedbbf3cd6e374574 | [
"Apache-2.0"
] | 64 | 2020-05-22T00:31:00.000Z | 2021-06-28T15:21:33.000Z | config/dev.exs | CloudFire-LLC/fireguard | 50ccfc792cf580104922026fedbbf3cd6e374574 | [
"Apache-2.0"
] | 2 | 2020-05-22T00:27:52.000Z | 2021-03-14T19:37:27.000Z | import Config
# Configure your database
if url = System.get_env("DATABASE_URL") do
config :fz_http, FzHttp.Repo,
url: url,
show_sensitive_data_on_connection_error: true,
pool_size: 10
else
config :fz_http, FzHttp.Repo,
username: "postgres",
password: "postgres",
database: "firezone_dev",
... | 27.35 | 86 | 0.684034 |
654d61e8c317eff55cff6f6086dff63ec0c1b0ea | 84 | ex | Elixir | timetable_backend/lib/timetable_backend/repo.ex | heru/timetable | b5f86f53020c6e32b569628c5396b8972ca0538f | [
"MIT"
] | null | null | null | timetable_backend/lib/timetable_backend/repo.ex | heru/timetable | b5f86f53020c6e32b569628c5396b8972ca0538f | [
"MIT"
] | null | null | null | timetable_backend/lib/timetable_backend/repo.ex | heru/timetable | b5f86f53020c6e32b569628c5396b8972ca0538f | [
"MIT"
] | null | null | null | defmodule TimetableBackend.Repo do
use Ecto.Repo, otp_app: :timetable_backend
end
| 21 | 44 | 0.821429 |
654d6fa8969aa754cd703e5a118ec963c6e227d7 | 45,300 | ex | Elixir | golf13/deps/decimal/lib/decimal.ex | RobertDober/golftour | 1a1187ef46be99532b41a08801c10541a9a84ab1 | [
"Apache-2.0"
] | null | null | null | golf13/deps/decimal/lib/decimal.ex | RobertDober/golftour | 1a1187ef46be99532b41a08801c10541a9a84ab1 | [
"Apache-2.0"
] | null | null | null | golf13/deps/decimal/lib/decimal.ex | RobertDober/golftour | 1a1187ef46be99532b41a08801c10541a9a84ab1 | [
"Apache-2.0"
] | null | null | null | defmodule Decimal do
@moduledoc """
Decimal arithmetic on arbitrary precision floating-point numbers.
A number is represented by a signed coefficient and exponent such that: `sign
* coefficient * 10^exponent`. All numbers are represented and calculated
exactly, but the result of an operation may be rounded d... | 31.048663 | 124 | 0.62117 |
654d909a22a3bd80218035a31bd5d74796b80399 | 1,741 | ex | Elixir | lib/tapebas_web/components/icon.ex | cristineguadelupe/tapebas | 5f8c70d5ac36b2a606fe4630cc659161b2f4d7bf | [
"MIT"
] | 3 | 2022-03-24T16:48:38.000Z | 2022-03-24T16:50:04.000Z | lib/tapebas_web/components/icon.ex | cristineguadelupe/tapebas | 5f8c70d5ac36b2a606fe4630cc659161b2f4d7bf | [
"MIT"
] | null | null | null | lib/tapebas_web/components/icon.ex | cristineguadelupe/tapebas | 5f8c70d5ac36b2a606fe4630cc659161b2f4d7bf | [
"MIT"
] | 1 | 2022-03-20T01:11:12.000Z | 2022-03-20T01:11:12.000Z | defmodule TapebasWeb.Components.Icon do
@moduledoc """
The Icon module components by heroicons.
Beautiful hand-crafted SVG icons, by the makers of Tailwind CSS.
URL: https://heroicons.com
"""
use Phoenix.Component
def unlike(assigns) do
assigns = assigns |> assign_new(:class, fn -> "h-6 w-6" end)
... | 42.463415 | 294 | 0.638139 |
654da3f081ba809e6722835fb04cdc5b83c98f44 | 221 | ex | Elixir | lib/doctor_schedule_web/live/schedule_component.ex | theguuholi/doctor_schedule | a92dfa92d1398c59718be2428d36bb326d6bc361 | [
"MIT"
] | 2 | 2022-03-11T12:15:01.000Z | 2022-03-11T13:53:21.000Z | lib/doctor_schedule_web/live/schedule_component.ex | theguuholi/doctor_schedule | a92dfa92d1398c59718be2428d36bb326d6bc361 | [
"MIT"
] | 3 | 2020-12-12T22:10:17.000Z | 2021-04-05T12:53:12.000Z | lib/doctor_schedule_web/live/schedule_component.ex | theguuholi/doctor_schedule | a92dfa92d1398c59718be2428d36bb326d6bc361 | [
"MIT"
] | 1 | 2021-02-26T04:24:34.000Z | 2021-02-26T04:24:34.000Z | defmodule DoctorScheduleWeb.ScheduleComponent do
use Phoenix.LiveComponent
alias DoctorScheduleWeb.PageView
alias Phoenix.View
def render(assigns) do
View.render(PageView, "schedule.html", assigns)
end
end
| 22.1 | 51 | 0.791855 |
654dac92b0ae1704705de56ab71a2651ca71bd87 | 47 | exs | Elixir | config/prod.exs | shannonwells/coinpayments | e89b9da2d83fd18d12ace974b2faedd095abcff8 | [
"MIT"
] | null | null | null | config/prod.exs | shannonwells/coinpayments | e89b9da2d83fd18d12ace974b2faedd095abcff8 | [
"MIT"
] | null | null | null | config/prod.exs | shannonwells/coinpayments | e89b9da2d83fd18d12ace974b2faedd095abcff8 | [
"MIT"
] | null | null | null | use Mix.Config
import_config "prod.secret.exs" | 15.666667 | 31 | 0.808511 |
654db518d258b1e01dd7a4aaaf27401672322200 | 1,182 | exs | Elixir | apps/kv_server/test/kv_server_test.exs | bionikspoon/elixir_kv_umbrella | 40d92a7026f83499eefdd69ddc20d1c3c5252c0f | [
"MIT"
] | null | null | null | apps/kv_server/test/kv_server_test.exs | bionikspoon/elixir_kv_umbrella | 40d92a7026f83499eefdd69ddc20d1c3c5252c0f | [
"MIT"
] | null | null | null | apps/kv_server/test/kv_server_test.exs | bionikspoon/elixir_kv_umbrella | 40d92a7026f83499eefdd69ddc20d1c3c5252c0f | [
"MIT"
] | null | null | null | defmodule KVServerTest do
use ExUnit.Case
doctest KVServer
@moduletag :capture_log
setup do
Application.stop :kv
:ok = Application.start :kv
end
setup do
opts = [:binary, packet: :line, active: false]
{:ok, socket} = :gen_tcp.connect 'localhost', Application.fetch_env!(:kv_server, :port),... | 25.695652 | 97 | 0.653976 |
654db61c9da4f3e858faea00485559d1984a1824 | 449 | exs | Elixir | test/events_dashboard_web/views/error_view_test.exs | Hermanlangner/events_dashboard | 30d5d3666ac8057bfd91dd33131d8132c97cfec9 | [
"MIT"
] | null | null | null | test/events_dashboard_web/views/error_view_test.exs | Hermanlangner/events_dashboard | 30d5d3666ac8057bfd91dd33131d8132c97cfec9 | [
"MIT"
] | null | null | null | test/events_dashboard_web/views/error_view_test.exs | Hermanlangner/events_dashboard | 30d5d3666ac8057bfd91dd33131d8132c97cfec9 | [
"MIT"
] | null | null | null | defmodule EventsDashboardWeb.ErrorViewTest do
use EventsDashboardWeb.ConnCase, async: true
# Bring render/3 and render_to_string/3 for testing custom views
import Phoenix.View
test "renders 404.html" do
assert render_to_string(EventsDashboardWeb.ErrorView, "404.html", []) == "Not Found"
end
test "ren... | 29.933333 | 100 | 0.752784 |
654dc51b9bf196fbaf69dc7dbe7000d4a663ed07 | 1,146 | exs | Elixir | config/config.exs | almirsarajcic/ex_aws_s3 | 1610f22a7ecf3428d5e1db3bddccd035a2c4c36e | [
"Unlicense",
"MIT"
] | null | null | null | config/config.exs | almirsarajcic/ex_aws_s3 | 1610f22a7ecf3428d5e1db3bddccd035a2c4c36e | [
"Unlicense",
"MIT"
] | null | null | null | config/config.exs | almirsarajcic/ex_aws_s3 | 1610f22a7ecf3428d5e1db3bddccd035a2c4c36e | [
"Unlicense",
"MIT"
] | null | null | null | # This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the paren... | 34.727273 | 73 | 0.753054 |
654dc6a1ab40241c06c0145fd9f9c3a5bdf4a33a | 2,778 | ex | Elixir | clients/compute/lib/google_api/compute/v1/model/instance_group_manager_status.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | null | null | null | clients/compute/lib/google_api/compute/v1/model/instance_group_manager_status.ex | MasashiYokota/elixir-google-api | 975dccbff395c16afcb62e7a8e411fbb58e9ab01 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/compute/lib/google_api/compute/v1/model/instance_group_manager_status.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... | 49.607143 | 453 | 0.75414 |
654dc764ef77a872c6ea747bce531d4a778aed1f | 123 | exs | Elixir | test/runlet_sh_test.exs | msantos/runlet_sh | eedd035f0a612f247c1e17dd1f22584b886b6156 | [
"0BSD"
] | 2 | 2020-01-12T19:04:53.000Z | 2020-02-01T03:40:33.000Z | test/runlet_sh_test.exs | msantos/runlet_sh | eedd035f0a612f247c1e17dd1f22584b886b6156 | [
"0BSD"
] | null | null | null | test/runlet_sh_test.exs | msantos/runlet_sh | eedd035f0a612f247c1e17dd1f22584b886b6156 | [
"0BSD"
] | null | null | null | defmodule RunletShTest do
use ExUnit.Case
doctest Runlet.Cmd.Sh
test "the truth" do
assert 1 + 1 == 2
end
end
| 13.666667 | 25 | 0.674797 |
654dd6fd8469cdd787ac681bdc06aa3e53e9c8a0 | 1,027 | exs | Elixir | gherkin/elixir/mix.exs | lamkr/cucumber-common | 914bc5cd72198eb4dd93d7228f2e167a16e23ac3 | [
"MIT"
] | null | null | null | gherkin/elixir/mix.exs | lamkr/cucumber-common | 914bc5cd72198eb4dd93d7228f2e167a16e23ac3 | [
"MIT"
] | null | null | null | gherkin/elixir/mix.exs | lamkr/cucumber-common | 914bc5cd72198eb4dd93d7228f2e167a16e23ac3 | [
"MIT"
] | null | null | null | defmodule CucumberGherkin.MixProject do
use Mix.Project
@vsn "18.1.1"
@github "https://github.com/cucumber/common/tree/main/gherkin/elixir"
@name "CucumberGherkin"
def project do
[
app: :cucumber_gherkin,
version: @vsn,
name: @name,
description: description(),
package: pack... | 20.54 | 71 | 0.580331 |
654e0ccf87f92e1d0cb4731c9ec118b803dcd41c | 15,205 | ex | Elixir | lib/plausible/stats/breakdown.ex | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 984 | 2019-09-02T11:36:41.000Z | 2020-06-08T06:25:48.000Z | lib/plausible/stats/breakdown.ex | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 24 | 2019-09-10T09:53:17.000Z | 2020-06-08T07:35:26.000Z | lib/plausible/stats/breakdown.ex | plausible-insights/plausible | 88173342b9e969894879bfb2e8d203426f6a1b1c | [
"MIT"
] | 51 | 2019-09-03T10:48:10.000Z | 2020-06-07T00:23:34.000Z | defmodule Plausible.Stats.Breakdown do
use Plausible.ClickhouseRepo
import Plausible.Stats.{Base, Imported}
alias Plausible.Stats.Query
@no_ref "Direct / None"
@event_metrics [:visitors, :pageviews, :events]
@session_metrics [:visits, :bounce_rate, :visit_duration]
@event_props ["event:page", "event:page... | 27.645455 | 98 | 0.587438 |
654e26109fac17fde7211f65d9bc28657f2d5bbe | 768 | ex | Elixir | lib/phoenix/router/socket.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/router/socket.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | lib/phoenix/router/socket.ex | brightroll/phoenix | b93022086322bcc1d797214a28e0c9710f537c22 | [
"MIT"
] | null | null | null | defmodule Phoenix.Router.Socket do
defmacro __using__(options) do
mount = Dict.fetch! options, :mount
quote do
import unquote(__MODULE__)
dispatch_option unquote(mount), Phoenix.Socket.Handler, router: __MODULE__
end
end
defmacro channel(channel, module) do
quote do
def match(... | 29.538462 | 80 | 0.665365 |
654e5dba8d95b54540908cc7f4e3c196eb2db44d | 3,097 | exs | Elixir | priv/repo/demo/glip_connector.exs | flowr-app/flowr | 1e88bc917da32df2878e13c9bb1998dbbe61cd62 | [
"0BSD"
] | 2 | 2021-08-01T04:38:08.000Z | 2021-08-01T06:52:29.000Z | priv/repo/demo/glip_connector.exs | flowr-app/flowr | 1e88bc917da32df2878e13c9bb1998dbbe61cd62 | [
"0BSD"
] | 3 | 2021-08-01T08:20:13.000Z | 2021-08-01T08:22:07.000Z | priv/repo/demo/glip_connector.exs | flowr-app/flowr | 1e88bc917da32df2878e13c9bb1998dbbe61cd62 | [
"0BSD"
] | null | null | null | {:ok, glip_connector} =
Flowr.Exterior.create_connector(%{
name: "Glip (Example)",
description: "Example: Glip",
auth: %{
auth_type: "oauth2",
connection_info: %{
"authorize" => %{
"params" => %{
"client_id" => "<%= config[\"client_id\"] %>",
"redirect... | 28.412844 | 103 | 0.46206 |
654e658fdf491d643cb40d97ba94f9a106e57a91 | 1,990 | exs | Elixir | test/okr_app/objectives/objective_test.exs | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 12 | 2019-05-10T21:48:06.000Z | 2021-11-07T14:04:30.000Z | test/okr_app/objectives/objective_test.exs | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 2 | 2019-05-14T19:07:10.000Z | 2019-05-20T21:06:27.000Z | test/okr_app/objectives/objective_test.exs | sb8244/okr_app_pub | 933872107bd13390a0a5ea119d7997d4cb5ea7db | [
"MIT"
] | 3 | 2019-05-19T18:24:20.000Z | 2019-10-31T20:29:12.000Z | defmodule OkrApp.Objectives.ObjectiveTest do
use ExUnit.Case, async: true
alias OkrApp.Objectives.Objective
describe "mid_score" do
test "no key_results is a 0" do
assert Objective.mid_score(%Objective{key_results: []}) == Decimal.new("0.00")
end
test "the key_results mid_score are averaged t... | 32.096774 | 95 | 0.652764 |
654e9400d582a368a1506f85e2ea32dee5d50010 | 1,864 | ex | Elixir | lib/bot.ex | Celeo/bobby_discord_bot | ae6bfa86b988fcfaa57fddbde02bdbe1d3f706ff | [
"MIT"
] | null | null | null | lib/bot.ex | Celeo/bobby_discord_bot | ae6bfa86b988fcfaa57fddbde02bdbe1d3f706ff | [
"MIT"
] | null | null | null | lib/bot.ex | Celeo/bobby_discord_bot | ae6bfa86b988fcfaa57fddbde02bdbe1d3f706ff | [
"MIT"
] | null | null | null | defmodule Bot.Application do
use Application
require Logger
@impl true
def start(_type, _args) do
Logger.info("Starting application")
Supervisor.start_link([Bot.Supervisor], strategy: :one_for_one)
end
end
defmodule Bot.Supervisor do
use Supervisor
require Logger
def start_link(args \\ []) do... | 22.731707 | 94 | 0.67221 |
654ea7553740642240bf45fba15a1994658f366f | 1,295 | exs | Elixir | test/harald/host/att/read_by_group_type_req_test.exs | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 59 | 2019-02-16T00:09:58.000Z | 2020-03-29T23:37:36.000Z | test/harald/host/att/read_by_group_type_req_test.exs | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 19 | 2019-02-15T22:41:43.000Z | 2020-02-15T19:20:57.000Z | test/harald/host/att/read_by_group_type_req_test.exs | RicardoTrindade/harald | 3f56003265c29af0780730eb538183b50e55df2f | [
"MIT"
] | 9 | 2020-05-07T00:02:36.000Z | 2021-09-17T18:17:46.000Z | defmodule Harald.Host.ATT.ReadByGroupTypeReqTest do
use ExUnit.Case, async: true
alias Harald.Host.ATT.ReadByGroupTypeReq
test "encode/1" do
starting_handle = 1
ending_handle = 0xFFFF
attribute_group_type = 0x2800
parameters = %{
starting_handle: starting_handle,
ending_handle: endin... | 26.428571 | 73 | 0.711197 |
654eb95f2a00cc5232fe6a23a5ae8191fd843399 | 2,548 | exs | Elixir | test/nickdotcom/articles_test.exs | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | test/nickdotcom/articles_test.exs | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | test/nickdotcom/articles_test.exs | nickyeager/nickdotcom | e1a0f32c44da2111c9d8b22800edeb831d893b5e | [
"MIT"
] | null | null | null | defmodule Nickdotcom.ArticlesTest do
use Nickdotcom.DataCase
alias Nickdotcom.Articles
describe "posts" do
alias Nickdotcom.Articles.Post
@valid_attrs %{body: "some body", cover: "some cover", published: true, slug: "some slug", title: "some title", user_id: 42}
@update_attrs %{body: "some updated ... | 33.973333 | 162 | 0.652669 |
654ef21547b70b51fbb94834ddf86a5b10db1fca | 1,000 | ex | Elixir | lib/where_its_due.ex | rustedgrail/where_its_due | 2140006ecfbe29e9d4ebc1895b147a76b5376fc3 | [
"MIT"
] | null | null | null | lib/where_its_due.ex | rustedgrail/where_its_due | 2140006ecfbe29e9d4ebc1895b147a76b5376fc3 | [
"MIT"
] | null | null | null | lib/where_its_due.ex | rustedgrail/where_its_due | 2140006ecfbe29e9d4ebc1895b147a76b5376fc3 | [
"MIT"
] | null | null | null | defmodule WhereItsDue do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Start the endpoint when the application starts
supervisor(Where... | 32.258065 | 71 | 0.718 |
654f30b6ca8f449bab2eb5309c1915d527a4f86c | 294 | ex | Elixir | plugins/one_chat/lib/one_chat_web/channels/utils.ex | smpallen99/ucx_ucc | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 11 | 2017-05-15T18:35:05.000Z | 2018-02-05T18:27:40.000Z | plugins/one_chat/lib/one_chat_web/channels/utils.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 15 | 2017-11-27T10:38:05.000Z | 2018-02-09T20:42:08.000Z | plugins/one_chat/lib/one_chat_web/channels/utils.ex | anndream/infinity_one | 47225f205a6ac4aacdb9bb4f7512dcf4092576ad | [
"MIT"
] | 4 | 2017-09-13T11:34:16.000Z | 2018-02-26T13:37:06.000Z | defmodule OneChatWeb.Channel.Utils do
defmacro __using__(_) do
quote do
alias unquote(__MODULE__)
end
end
def noreply(socket), do: {:noreply, socket}
defmacro dataset(key, value) do
quote do
%{"dataset" => %{unquote(key) => unquote(value)}}
end
end
end
| 17.294118 | 55 | 0.642857 |
654f328789a897f5477b413a15f5fbcbda536425 | 153 | ex | Elixir | lib/gigalixir_demo_web/controllers/page_controller.ex | kimlindholm/gigalixir_demo | fee72bfb6f71e6f8c9df80d43ef2ca20c70d7526 | [
"MIT"
] | null | null | null | lib/gigalixir_demo_web/controllers/page_controller.ex | kimlindholm/gigalixir_demo | fee72bfb6f71e6f8c9df80d43ef2ca20c70d7526 | [
"MIT"
] | null | null | null | lib/gigalixir_demo_web/controllers/page_controller.ex | kimlindholm/gigalixir_demo | fee72bfb6f71e6f8c9df80d43ef2ca20c70d7526 | [
"MIT"
] | null | null | null | defmodule GigalixirDemoWeb.PageController do
use GigalixirDemoWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end
| 19.125 | 44 | 0.75817 |
654f3a505e0c3d8bd4da02a2e19bb09ac9ea7719 | 197 | exs | Elixir | priv/repo/migrations/20210222074225_update_event_topics.exs | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 2 | 2021-02-12T09:21:56.000Z | 2021-02-22T08:52:20.000Z | priv/repo/migrations/20210222074225_update_event_topics.exs | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | 4 | 2021-02-22T08:53:43.000Z | 2021-06-09T09:24:46.000Z | priv/repo/migrations/20210222074225_update_event_topics.exs | WeLightProject/WeLight-Portal | 6e701469423e3a62affdc415c4e8c186d603d324 | [
"MIT"
] | null | null | null | defmodule SuperIssuer.Repo.Migrations.UpdateEventTopics do
use Ecto.Migration
def change do
alter table :event do
add :topics, {:array, :string}
remove :data
end
end
end
| 17.909091 | 58 | 0.690355 |
654f46670952d0a922728dcb314e728e87106a7b | 1,994 | ex | Elixir | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/filtered_bid_creative_row.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/filtered_bid_creative_row.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/ad_exchange_buyer/lib/google_api/ad_exchange_buyer/v2beta1/model/filtered_bid_creative_row.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 37.622642 | 127 | 0.765797 |
654f594d17ab57741b858bd1a33b878523b98ff1 | 4,917 | ex | Elixir | lib/pow_assent/ecto/schema.ex | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | 193 | 2019-10-30T00:58:21.000Z | 2022-03-09T20:26:37.000Z | lib/pow_assent/ecto/schema.ex | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | 82 | 2019-10-29T20:19:38.000Z | 2022-03-22T04:09:27.000Z | lib/pow_assent/ecto/schema.ex | mitcheaton1/pow_assent | f3e9e6cc7dd16a3f2d9add885bd160d227abb713 | [
"MIT"
] | 28 | 2019-10-31T12:38:10.000Z | 2021-11-01T18:05:23.000Z | defmodule PowAssent.Ecto.Schema do
@moduledoc """
Handles the Ecto schema for user.
`user_id_attrs` is provided by the user in a registration step.
## Usage
Configure `lib/my_project/users/user.ex` the following way:
defmodule MyApp.Users.User do
use Ecto.Schema
use Pow.Ecto.Schema
... | 36.422222 | 185 | 0.719138 |
654f61b5b41b67e26033e6499cd5cc441d87e974 | 592 | ex | Elixir | lib/spear/records/google.ex | NFIBrokerage/spear | 611223d2cdba97daa63f2ddd81a08b4f55e72198 | [
"Apache-2.0"
] | 34 | 2021-04-15T22:16:38.000Z | 2022-03-11T10:20:11.000Z | lib/spear/records/google.ex | NFIBrokerage/spear | 611223d2cdba97daa63f2ddd81a08b4f55e72198 | [
"Apache-2.0"
] | 32 | 2021-04-05T18:07:35.000Z | 2021-11-04T19:32:58.000Z | lib/spear/records/google.ex | NFIBrokerage/spear | 611223d2cdba97daa63f2ddd81a08b4f55e72198 | [
"Apache-2.0"
] | 1 | 2021-10-11T15:53:42.000Z | 2021-10-11T15:53:42.000Z | defmodule Spear.Records.Google do
@moduledoc """
A record-like wrapper around google protobufs
"""
defmacro empty do
quote do
{:"google.protobuf.Empty"}
end
end
if Version.match?(System.version(), ">= 1.11.0") do
def timestamp(%DateTime{} = datetime) do
# google timestamp is number... | 23.68 | 85 | 0.652027 |
654f70ff9e18ed650e97b8bb7402d7fad6fcff09 | 115 | ex | Elixir | lib/lx/cmd/https.ex | hertogp/lx | 271ecbefa06bfb7947cd641e0a85cd410ac9f97c | [
"MIT"
] | null | null | null | lib/lx/cmd/https.ex | hertogp/lx | 271ecbefa06bfb7947cd641e0a85cd410ac9f97c | [
"MIT"
] | null | null | null | lib/lx/cmd/https.ex | hertogp/lx | 271ecbefa06bfb7947cd641e0a85cd410ac9f97c | [
"MIT"
] | null | null | null | defmodule Lx.Cmd.Https do
require Logger
def run(argv) do
Logger.info("argv: #{inspect(argv)}")
end
end
| 14.375 | 41 | 0.669565 |
654fc389d40ed7d3b5a4a18cae3c4c94ab57677a | 718 | ex | Elixir | lib/problem005.ex | lewapkon/eulixir | 990017cdccee7cd508269b7036e290ec777aea3d | [
"MIT"
] | null | null | null | lib/problem005.ex | lewapkon/eulixir | 990017cdccee7cd508269b7036e290ec777aea3d | [
"MIT"
] | null | null | null | lib/problem005.ex | lewapkon/eulixir | 990017cdccee7cd508269b7036e290ec777aea3d | [
"MIT"
] | null | null | null | defmodule Eulixir.Problem005 do
@moduledoc """
http://projecteuler.net/problem=5
2520 is the smallest number that can be divided by each of the numbers from
1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the
numbers from 1 to 20?
"""
@do... | 19.405405 | 79 | 0.600279 |
654fdea28d2a3bb171e217dc847e01b87347ef42 | 11,547 | exs | Elixir | test/test_helper.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | test/test_helper.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | test/test_helper.exs | bahanni/custom_rpi4 | ddefa85d30bacaae40151a63a9a0ebbf4ad30ed5 | [
"MIT"
] | null | null | null | Application.ensure_all_started(:mimic)
Application.ensure_all_started(:farmbot)
defmodule Helpers do
alias FarmbotOS.Asset.{Repo, Point}
@wait_time 180
@fake_jwt "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZ" <>
"G1pbkBhZG1pbi5jb20iLCJpYXQiOjE1MDIxMjcxMTcsImp0a" <>
"SI6IjlhZjY2... | 31.040323 | 85 | 0.685546 |
655039191ed82c1c3708ad9d4843e8e0d1a77c75 | 138 | exs | Elixir | test/iceland_test.exs | YodelTalk/iceland | 625f5dd94b1d3286248016bace5a95fc15cf6aba | [
"MIT"
] | null | null | null | test/iceland_test.exs | YodelTalk/iceland | 625f5dd94b1d3286248016bace5a95fc15cf6aba | [
"MIT"
] | null | null | null | test/iceland_test.exs | YodelTalk/iceland | 625f5dd94b1d3286248016bace5a95fc15cf6aba | [
"MIT"
] | null | null | null | defmodule IcelandTest do
use ExUnit.Case
doctest Iceland
test "greets the world" do
assert Iceland.hello() == :world
end
end
| 15.333333 | 36 | 0.710145 |
6550408455ced2ee87152489a3ab1f8651467e29 | 2,782 | ex | Elixir | clients/run/lib/google_api/run/v1/model/list_meta.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/run/lib/google_api/run/v1/model/list_meta.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/run/lib/google_api/run/v1/model/list_meta.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... | 38.638889 | 137 | 0.717469 |
65506e0de0928a7bf8f390fb59ca54ca4a11f3e8 | 1,997 | ex | Elixir | lib/makeup.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null | lib/makeup.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null | lib/makeup.ex | rubysolo/makeup | e1c5d27e3f14c04904d74b94b6298bbc28a406c3 | [
"BSD-2-Clause"
] | null | null | null | defmodule Makeup do
@moduledoc """
Syntax highlighting library for code, inspired by Pygments.
By default, it doesn't include any lexers.
You must import them separately (even the Elixir lexer).
"""
alias Makeup.Formatters.HTML.HTMLFormatter
alias Makeup.Lexers.ElixirLexer
alias Makeup.Styles.HTML.Styl... | 26.276316 | 80 | 0.670506 |
655079b4bd61c29ebe6c35704c791448259b5993 | 1,820 | ex | Elixir | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/test_ruleset_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/test_ruleset_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | null | null | null | clients/firebase_rules/lib/google_api/firebase_rules/v1/model/test_ruleset_request.ex | GoNZooo/elixir-google-api | cf3ad7392921177f68091f3d9001f1b01b92f1cc | [
"Apache-2.0"
] | 1 | 2018-07-28T20:50:50.000Z | 2018-07-28T20:50:50.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 35.686275 | 184 | 0.752198 |
655086a44a712c584ec125fe41cf628413884e6e | 2,048 | ex | Elixir | lib/spandex.ex | itskoko/spandex | 2cedc5113b20689b9c1b616182319a702ad1d613 | [
"MIT"
] | null | null | null | lib/spandex.ex | itskoko/spandex | 2cedc5113b20689b9c1b616182319a702ad1d613 | [
"MIT"
] | null | null | null | lib/spandex.ex | itskoko/spandex | 2cedc5113b20689b9c1b616182319a702ad1d613 | [
"MIT"
] | 3 | 2021-04-07T14:58:37.000Z | 2021-04-07T14:58:49.000Z | defmodule Spandex do
@moduledoc """
Provides the entry point for the application, in addition to a standardized
interface. The functions here call the corresponding functions on the
configured adapter.
"""
require Logger
import Spandex.Adapters.Helpers
defmacro span(name, do: body) do
quote do
... | 27.675676 | 101 | 0.65625 |
6550971186279920a1a39bd2c2507af94c8a5fe5 | 1,111 | ex | Elixir | lib/cat_on_duty/employees/team.ex | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 3 | 2020-11-23T15:30:04.000Z | 2020-12-01T17:11:49.000Z | lib/cat_on_duty/employees/team.ex | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 1 | 2020-12-29T09:09:03.000Z | 2020-12-29T09:09:03.000Z | lib/cat_on_duty/employees/team.ex | psolvy/cat_on_duty | b03ba225286c85407ca21576c39225f058b22b56 | [
"MIT"
] | 1 | 2021-08-11T10:10:16.000Z | 2021-08-11T10:10:16.000Z | defmodule CatOnDuty.Employees.Team do
@moduledoc "Team model"
use Ecto.Schema
import Ecto.Changeset
alias CatOnDuty.Employees.Sentry
@type t :: %__MODULE__{
id: pos_integer | nil,
name: String.t() | nil,
tg_chat_id: String.t() | nil,
sentries: [Sentry.t()] | [] | Ect... | 26.452381 | 94 | 0.639964 |
6550ab3d0696050b5bad7c0506f2b9aedb8a6599 | 3,042 | ex | Elixir | clients/vault/lib/google_api/vault/v1/model/hold.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vault/lib/google_api/vault/v1/model/hold.ex | medikent/elixir-google-api | 98a83d4f7bfaeac15b67b04548711bb7e49f9490 | [
"Apache-2.0"
] | null | null | null | clients/vault/lib/google_api/vault/v1/model/hold.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... | 42.25 | 166 | 0.695924 |
6550b373108b65a12cff18c076db98a50158964b | 1,749 | ex | Elixir | debian/manpage.1.ex | CoderAldrich/toluapp | b416a21f45b60509904e24f197235a2cc98dbd79 | [
"MIT"
] | 201 | 2015-01-13T12:34:38.000Z | 2022-03-05T14:26:35.000Z | debian/manpage.1.ex | CoderAldrich/toluapp | b416a21f45b60509904e24f197235a2cc98dbd79 | [
"MIT"
] | null | null | null | debian/manpage.1.ex | CoderAldrich/toluapp | b416a21f45b60509904e24f197235a2cc98dbd79 | [
"MIT"
] | 73 | 2015-04-05T22:19:30.000Z | 2022-03-05T14:26:37.000Z | .\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH TOLUA++ SECTION "December 30, 2004"
.\" Please adjust this date whenever revising th... | 29.15 | 71 | 0.666095 |
6550d8ce79bc58044d41827e5db4868bb7af0879 | 401 | ex | Elixir | lib/cauzzipay/accounts/deposit.ex | Gustavo-Cauzzi/Cauzzipay | 912b3fa13dbb920a5af242134c77d44e63c39c6f | [
"MIT"
] | 1 | 2021-05-19T01:25:54.000Z | 2021-05-19T01:25:54.000Z | lib/cauzzipay/accounts/deposit.ex | Gustavo-Cauzzi/Cauzzipay | 912b3fa13dbb920a5af242134c77d44e63c39c6f | [
"MIT"
] | null | null | null | lib/cauzzipay/accounts/deposit.ex | Gustavo-Cauzzi/Cauzzipay | 912b3fa13dbb920a5af242134c77d44e63c39c6f | [
"MIT"
] | null | null | null | defmodule Cauzzipay.Accounts.Deposit do
alias Cauzzipay.Repo
alias Cauzzipay.Accounts.Operation
def call(params) do
params
|> Operation.call(:deposit)
|> run_transaction()
end
defp run_transaction(multi) do
case Repo.transaction(multi) do
{:error, _operation, reason, _changes} -> {:err... | 22.277778 | 64 | 0.670823 |
6550e4ac4eb8d0f86ae978e20c774a597b21364c | 727 | ex | Elixir | lib/liquid_voting_web/gettext.ex | jinjagit/api | c1a176d8c318e05810bc1635706c56395819191e | [
"MIT"
] | null | null | null | lib/liquid_voting_web/gettext.ex | jinjagit/api | c1a176d8c318e05810bc1635706c56395819191e | [
"MIT"
] | 10 | 2020-09-28T06:37:48.000Z | 2021-12-22T15:04:38.000Z | lib/liquid_voting_web/gettext.ex | jinjagit/api | c1a176d8c318e05810bc1635706c56395819191e | [
"MIT"
] | null | null | null | defmodule LiquidVotingWeb.Gettext do
@moduledoc """
A module providing Internationalization with a gettext-based API.
By using [Gettext](https://hexdocs.pm/gettext),
your module gains a set of macros for translations, for example:
import LiquidVotingWeb.Gettext
# Simple translation
gettext(... | 29.08 | 72 | 0.685007 |
6550ef57ba9d710db6b8ca7808767c8f60e636f0 | 892 | ex | Elixir | lib/mix/tasks/resemblixir/references.ex | katehedgpeth/resemblixir | 0ff32c75d9e9cd897477c721c38227cf0e62b969 | [
"MIT"
] | null | null | null | lib/mix/tasks/resemblixir/references.ex | katehedgpeth/resemblixir | 0ff32c75d9e9cd897477c721c38227cf0e62b969 | [
"MIT"
] | null | null | null | lib/mix/tasks/resemblixir/references.ex | katehedgpeth/resemblixir | 0ff32c75d9e9cd897477c721c38227cf0e62b969 | [
"MIT"
] | null | null | null | defmodule Mix.Tasks.Resemblixir.References do
require Logger
@moduledoc """
Generate reference files for your Resemblixir scenarios. You must have
"""
use Mix.Task
def run(args \\ []) do
{opts, _, _} = OptionParser.parse(args, switches: [log: :boolean])
{:ok, _} = Application.ensure_all_started(... | 28.774194 | 108 | 0.603139 |
6550f6ab93289371bb54c503bd20853747618257 | 2,082 | ex | Elixir | clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpn_tunnels.ex | renovate-bot/elixir-google-api | 1da34cd39b670c99f067011e05ab90af93fef1f6 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpn_tunnels.ex | swansoffiee/elixir-google-api | 9ea6d39f273fb430634788c258b3189d3613dde0 | [
"Apache-2.0"
] | 1 | 2020-08-18T00:11:23.000Z | 2020-08-18T00:44:16.000Z | clients/network_connectivity/lib/google_api/network_connectivity/v1/model/linked_vpn_tunnels.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... | 41.64 | 295 | 0.748319 |
655106ad56128acb64da973112370204dd9b9f77 | 1,539 | ex | Elixir | clients/firebase_hosting/lib/google_api/firebase_hosting/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2021-12-20T03:40:53.000Z | 2021-12-20T03:40:53.000Z | clients/firebase_hosting/lib/google_api/firebase_hosting/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"Apache-2.0"
] | 1 | 2020-12-18T09:25:12.000Z | 2020-12-18T09:25:12.000Z | clients/firebase_hosting/lib/google_api/firebase_hosting/v1/model/empty.ex | pojiro/elixir-google-api | 928496a017d3875a1929c6809d9221d79404b910 | [
"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... | 36.642857 | 345 | 0.759584 |
65510ac96fa00aa78b1133a3806ea958c6c14fd7 | 10,792 | ex | Elixir | lib/provider.ex | VeryBigThings/provider | b618bd9bfe64bf9633eaba121f140267e559591a | [
"MIT"
] | 25 | 2020-03-06T15:25:56.000Z | 2021-04-25T23:23:12.000Z | lib/provider.ex | VeryBigThings/provider | b618bd9bfe64bf9633eaba121f140267e559591a | [
"MIT"
] | null | null | null | lib/provider.ex | VeryBigThings/provider | b618bd9bfe64bf9633eaba121f140267e559591a | [
"MIT"
] | 4 | 2020-05-05T17:56:50.000Z | 2021-12-25T20:20:09.000Z | defmodule Provider do
@moduledoc """
Retrieval of configuration settings from external sources, such as OS env vars.
This module is an alternative to app env for retrieval of configuration settings. It allows you
to properly consolidate system settings, define per-env defaults, add strong typing, and
compile... | 36.707483 | 99 | 0.619718 |
65512a3332e4770847ac589c31cef8dae31b74ff | 1,400 | ex | Elixir | lib/mongooseice/turn/reservation.ex | glassechidna/MongooseICE | c2ea99f47460fd7293b51eaa72fbce122a60affe | [
"Apache-2.0"
] | 90 | 2017-09-26T12:20:06.000Z | 2022-01-30T17:58:11.000Z | lib/mongooseice/turn/reservation.ex | glassechidna/MongooseICE | c2ea99f47460fd7293b51eaa72fbce122a60affe | [
"Apache-2.0"
] | 39 | 2017-01-20T08:54:13.000Z | 2017-09-13T11:30:14.000Z | lib/mongooseice/turn/reservation.ex | glassechidna/MongooseICE | c2ea99f47460fd7293b51eaa72fbce122a60affe | [
"Apache-2.0"
] | 13 | 2018-03-29T07:03:25.000Z | 2022-03-06T10:21:45.000Z | defmodule MongooseICE.TURN.Reservation do
@moduledoc false
## A Reservation represents a relay address reserved
## by an allocation request with a positive `EvenPort.reserved?`.
## The relay address is created along with a RESERVATION-TOKEN
## which is returned to the client requesting the allocation,
## a... | 31.111111 | 78 | 0.713571 |
6551372fce3e3c0be851a7cf7bdd88cc41e8a29e | 525 | ex | Elixir | lib/survey_api_web/views/survey_view.ex | kamidev/survey_ap | 483314842cf2e8279e1224e83b57d61a5da143ad | [
"MIT"
] | 6 | 2020-02-04T16:18:30.000Z | 2020-10-31T06:00:03.000Z | lib/survey_api_web/views/survey_view.ex | kamidev/survey_ap | 483314842cf2e8279e1224e83b57d61a5da143ad | [
"MIT"
] | 114 | 2019-11-14T03:48:17.000Z | 2022-03-17T12:38:14.000Z | lib/survey_api_web/views/survey_view.ex | kamidev/survey_ap | 483314842cf2e8279e1224e83b57d61a5da143ad | [
"MIT"
] | 1 | 2021-07-08T01:48:56.000Z | 2021-07-08T01:48:56.000Z | defmodule SurveyAPIWeb.SurveyView do
use SurveyAPIWeb, :view
alias SurveyAPIWeb.SurveyView
def render("index.json", %{surveys: surveys}) do
%{data: render_many(surveys, SurveyView, "survey.json")}
end
def render("show.json", %{survey: survey}) do
%{data: render_one(survey, SurveyView, "survey.json")... | 23.863636 | 60 | 0.668571 |
655138ed789b33b5f3067386a2edb2dedfd00615 | 5,063 | exs | Elixir | lib/iex/test/iex/server_test.exs | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2019-08-13T23:22:33.000Z | 2019-08-13T23:22:33.000Z | lib/iex/test/iex/server_test.exs | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | 1 | 2019-04-25T12:52:49.000Z | 2019-04-25T13:27:31.000Z | lib/iex/test/iex/server_test.exs | kenichi/elixir | 8c27da88c70623cbe516d5310c885943395a82a2 | [
"Apache-2.0"
] | null | null | null | Code.require_file("../test_helper.exs", __DIR__)
defmodule IEx.ServerTest do
use IEx.Case
require IEx
describe "options" do
test "prefix" do
assert capture_io(fn ->
IEx.Server.run(prefix: "pry")
end) =~ "pry(1)> "
end
test "env" do
assert capture_iex("__ENV_... | 29.95858 | 97 | 0.632036 |
65513e0b2b6bd87e24f1cf98ae6e0a54ec171bf8 | 4,175 | ex | Elixir | lib/zipper_tree.ex | Dkendal/zipper_tree | 1dc6dcab78a0d2d0775a88ac2c5bdaaab81b8c23 | [
"WTFPL"
] | 18 | 2015-02-10T12:50:02.000Z | 2020-08-12T06:08:03.000Z | lib/zipper_tree.ex | Dkendal/zipper_tree | 1dc6dcab78a0d2d0775a88ac2c5bdaaab81b8c23 | [
"WTFPL"
] | null | null | null | lib/zipper_tree.ex | Dkendal/zipper_tree | 1dc6dcab78a0d2d0775a88ac2c5bdaaab81b8c23 | [
"WTFPL"
] | null | null | null | defmodule ZipperTree do
@moduledoc """
Provides traversal and modification methods for variadic arity trees. All
methods maintain an active 'cursor' or focus in the tree. The methods will
also technically work for lists too - I guess, if you're into that sorta
thing.
All traversal and insertion methods hap... | 22.93956 | 81 | 0.568862 |
65516e15d2d7876cf19b003b59cedbdb68d60304 | 121 | exs | Elixir | config/setup.exs | CMcDonald82/phoenix-api-starter | c3ece669ea047dc523c867e7609486f1a1818a1f | [
"MIT"
] | null | null | null | config/setup.exs | CMcDonald82/phoenix-api-starter | c3ece669ea047dc523c867e7609486f1a1818a1f | [
"MIT"
] | null | null | null | config/setup.exs | CMcDonald82/phoenix-api-starter | c3ece669ea047dc523c867e7609486f1a1818a1f | [
"MIT"
] | null | null | null | use Mix.Config
config :phoenix_api_starter, Mix.Tasks.Setup,
name: "NewApp",
otp_name: "new_app",
git_reinit: true | 20.166667 | 45 | 0.735537 |
655179a081e66c45e73dd62fb90bf9ceae557f6b | 2,433 | exs | Elixir | apps/omg_watcher/config/prod.exs | SingularityMatrix/elixir-omg | 7db3fcc3adfa303e30ff7703148cc5110b587d20 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/config/prod.exs | SingularityMatrix/elixir-omg | 7db3fcc3adfa303e30ff7703148cc5110b587d20 | [
"Apache-2.0"
] | null | null | null | apps/omg_watcher/config/prod.exs | SingularityMatrix/elixir-omg | 7db3fcc3adfa303e30ff7703148cc5110b587d20 | [
"Apache-2.0"
] | null | null | null | use Mix.Config
# For production, we often load configuration from external
# sources, such as your system environment. For this reason,
# you won't find the :http configuration below, but set inside
# OMG.Watcher.Web.Endpoint.init/2 when load_from_system_env is
# true. Any dynamic configuration should be done there.
#... | 32.013158 | 67 | 0.717633 |
65517e92320af4d1066e6ede90626beca0bae6c5 | 1,662 | exs | Elixir | example_avialia/config/prod.secret.exs | kianmeng/Domo | 1dcd2a0fb7d11b8c99db45b76aca95825db27d3b | [
"MIT"
] | 101 | 2020-06-11T23:51:50.000Z | 2022-03-30T16:29:18.000Z | example_avialia/config/prod.secret.exs | kianmeng/Domo | 1dcd2a0fb7d11b8c99db45b76aca95825db27d3b | [
"MIT"
] | 11 | 2020-10-11T11:50:24.000Z | 2022-02-12T08:54:50.000Z | example_avialia/config/prod.secret.exs | kianmeng/Domo | 1dcd2a0fb7d11b8c99db45b76aca95825db27d3b | [
"MIT"
] | 4 | 2020-07-02T08:54:22.000Z | 2021-12-26T09:59:15.000Z | # 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("BOARDINGS_DATABASE_URL") ||
raise ""... | 30.777778 | 71 | 0.731047 |
6551a6d7db4d13a85be79fd4e4b54a6c05354985 | 94 | exs | Elixir | test/gen_test.exs | fstp/computercraft | 16f0a559a5c180e3a10ded81fb7456d54c2b5aa2 | [
"MIT"
] | null | null | null | test/gen_test.exs | fstp/computercraft | 16f0a559a5c180e3a10ded81fb7456d54c2b5aa2 | [
"MIT"
] | null | null | null | test/gen_test.exs | fstp/computercraft | 16f0a559a5c180e3a10ded81fb7456d54c2b5aa2 | [
"MIT"
] | null | null | null | defmodule GenTest do
use ExUnit.Case
doctest Gen
test "main" do
Gen.main
end
end
| 10.444444 | 20 | 0.680851 |
6551b3cfe67f147e4647418406a6cc0f9dcb255d | 7,205 | exs | Elixir | test/eflatbuffers_test.exs | Q-in/eflatbuffers | 180f26473ebb98c3b073d4ccca7fa4d303b7c18d | [
"MIT"
] | null | null | null | test/eflatbuffers_test.exs | Q-in/eflatbuffers | 180f26473ebb98c3b073d4ccca7fa4d303b7c18d | [
"MIT"
] | null | null | null | test/eflatbuffers_test.exs | Q-in/eflatbuffers | 180f26473ebb98c3b073d4ccca7fa4d303b7c18d | [
"MIT"
] | null | null | null | defmodule EflatbuffersTest do
use ExUnit.Case
import TestHelpers
doctest Eflatbuffers
def before_test do
flush_port_commands()
end
test "test enum" do
schema = """
enum EHitResult : byte { Miss = 1, None, Hit, Critical, Count }
table FBAttackAck {
type:ushort;
order:bool;
... | 25.732143 | 147 | 0.59195 |
6551bcc99b6c99d3d727eea1287a742f1b680f3c | 4,043 | ex | Elixir | lib/grizzly/command_class/multi_channel_association/get.ex | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | lib/grizzly/command_class/multi_channel_association/get.ex | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | lib/grizzly/command_class/multi_channel_association/get.ex | pragdave/grizzly | bcd7b46ab2cff1797dac04bc3cd12a36209dd579 | [
"Apache-2.0"
] | null | null | null | defmodule Grizzly.CommandClass.MultiChannelAssociation.Get do
@moduledoc """
Command module for working with MULTI_CHANNEL_ASSOCIATION_GET command.
command options:
* `:group` - the group number
* `:seq_number` - The sequence number for the Z/IP Packet
* `:retries` - The number of times to resend th... | 28.076389 | 91 | 0.592877 |
6551d54e56c26e849091ed20c5ba546193031634 | 487 | ex | Elixir | web/models/location.ex | cjeich/MysteryNightServer | 36f37187c67562ceb4d6383b0d22b43cbe504515 | [
"Apache-2.0"
] | null | null | null | web/models/location.ex | cjeich/MysteryNightServer | 36f37187c67562ceb4d6383b0d22b43cbe504515 | [
"Apache-2.0"
] | null | null | null | web/models/location.ex | cjeich/MysteryNightServer | 36f37187c67562ceb4d6383b0d22b43cbe504515 | [
"Apache-2.0"
] | null | null | null | defmodule MysteryNight.Location do
use MysteryNight.Web, :model
schema "locations" do
field :lat, :string
field :long, :string
field :velocity, :integer
field :station_id, :integer
timestamps()
end
@doc """
Builds a changeset based on the `struct` and `params`.
"""
def changeset(str... | 22.136364 | 63 | 0.644764 |
6551d732f378c9db013830f632118d4ba1a2f909 | 1,067 | ex | Elixir | apps/artemis/lib/artemis/contexts/incident/delete_incident.ex | artemis-platform/artemis_dashboard | 5ab3f5ac4c5255478bbebf76f0e43b44992e3cab | [
"MIT"
] | 9 | 2019-08-19T19:56:34.000Z | 2022-03-22T17:56:38.000Z | apps/artemis/lib/artemis/contexts/incident/delete_incident.ex | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 7 | 2019-07-12T21:41:01.000Z | 2020-08-17T21:29:22.000Z | apps/artemis/lib/artemis/contexts/incident/delete_incident.ex | chrislaskey/atlas_dashboard | 9009ef5aac8fefba126fa7d3e3b82d1b610ee6fe | [
"MIT"
] | 2 | 2019-07-05T22:51:47.000Z | 2019-08-19T19:56:37.000Z | defmodule Artemis.DeleteIncident do
use Artemis.Context
alias Artemis.DeleteManyAssociatedComments
alias Artemis.GetIncident
alias Artemis.Repo
def call!(id, params \\ %{}, user) do
case call(id, params, user) do
{:error, _} -> raise(Artemis.Context.Error, "Error deleting incident")
{:ok, re... | 25.404762 | 82 | 0.671978 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.