content_id
large_stringlengths
40
40
size_bytes
int64
1.5k
25k
repo_ids
large listlengths
1
410
tags
large listlengths
0
7
content
large_stringlengths
681
25k
02749c6849df8a401997a0834a95ff180d4a9d91
1,778
[ 451971405 ]
[ "phoenix", "ecto" ]
defmodule UploadsMvpWeb.EventController do use UploadsMvpWeb, :controller alias UploadsMvp.Core alias UploadsMvp.Core.Event def index(conn, _params) do events = Core.list_events() render(conn, "index.html", events: events) end def new(conn, _params) do changeset = Core.change_event(%Event{}) ...
0274a3b9e4f1c38e969a64aa38fae46e87bc2297
2,940
[ 146536449 ]
[ "genserver", "documented" ]
defmodule Tanks.GameServer do alias Tanks.Entertainment.{Game, Room} alias Tanks.RoomStore alias TanksWeb.{GameChannel, RoomChannel} ## Interfaces @doc """ spawn up a process to manage game state :: pid """ def start(game, name) do # state is {name:, game: } # we use room name as our GenServer...
02750436ea48d9e8302b9b8f4a784206d0b832e8
5,489
[ 192653852 ]
[ "macro" ]
defmodule OOTPUtility.StandingsFactory do alias OOTPUtility.{Leagues, Standings} import OOTPUtility.Factories.Utilities, only: [distribute_wins_amongst_teams: 2, generate_slug_from_name: 1] defmacro __using__(_opts) do # credo:disable-for-next-line Credo.Check.Refactor.LongQuoteBlocks quote do ...
0275b50b2deeb88f9b26e42ddffe78ad51b97087
1,767
[ 135832997 ]
[ "liveview" ]
defmodule Data.Article.Blog.BeimFarenland do use Article.Default def name(), do: "#{created_at()}-6-beim-farenland" def created_at(), do: ~D[2019-01-11] def title(), do: "Beim Farenland (Veloroute 6)" def start(), do: ~d[2020-11-02] def stop(), do: ~d[2021-04-16] def type(), do: :finished def constr...
027606e7ee4fb10605471abdb4d226397ab350e1
2,488
[ 439819223 ]
[ "liveview", "ecto" ]
defmodule CookbookWeb.BrowseFilesLive do use CookbookWeb, :live_view def render(assigns) do ~H""" <div id="browse_files_demo" phx-hook="ArrowKeyEvents"> <.form let={f} for={@filter_changeset} as="filter" phx-change="filter"> <%= text_input(f, :q, class: "form-control", phx_hook: "FocusOnMount...
02762fcbee795376b061b4aa9e34d1a02dd54eb2
2,758
[ 949664843 ]
[ "documented" ]
defmodule Raxol.Core.Renderer.View.Style.Border do @moduledoc """ Handles border rendering for the Raxol view system. Provides various border styles and rendering functionality. """ alias Raxol.Core.Renderer.View.Types @doc """ Creates a border around a view. ## Options * `:style` - Border style ...
02763b8d7809be59707e8cbd0b5f40f10a1c5f2c
4,240
[ 1000579716 ]
[]
# DSPy Integration Configuration for AAOS Objects # This file shows how to configure DSPy integration for LLM-powered object responses import Config # DSPy Configuration config :object, :dspy, # LM Studio Configuration (local LLM server) lm_studio: %{ base_url: "http://localhost:1234", timeout: 30_000, ...
02765716d43f8da398901abee5c97b64905fd35b
5,244
[ 465410216 ]
[ "typespec", "documented" ]
defmodule GraphQL.QueryBuilder do @moduledoc """ Functions to simplify the creation of GraphQL queries. The easiest way to use these functions is to `import` this module directly, this way you'll have all you need to build a query. ## Helper functions - `query/4` - creates a new "query" operation - `mu...
0276830c5ee133a18c9b234efb881160eb450618
2,381
[ 833293773 ]
[ "ecto" ]
defmodule Counselling.Programs do import Ecto.Query, warn: false alias Counselling.Ranks.RankCutoff alias Counselling.NirfRanking alias Counselling.Colleges.College alias Counselling.CollegePrograms.CollegeProgram alias Counselling.{Programs.Program, Repo} def create_program(attrs \\ %{}) do %Program...
0276a2237f971563eb1253206548cd40df43089c
5,106
[ 296258514 ]
[ "typespec", "documented", "ecto" ]
defmodule ElixirAwesomeList.Package.Context do alias ElixirAwesomeList.Repo alias ElixirAwesomeList.Package import Ecto.Query import ElixirAwesomeList.PipelineContextProvider @doc """ Creates a package with a given attrs. """ @spec create_package(map) :: {:error, any} | {:ok, Package.t()} def creat...
0276bf80a67324b066cc4dcd092802d64a67abfc
6,979
[ 577086718 ]
[ "test" ]
defmodule ClusterTest do use ExUnit.Case, async: true alias ExTypesense.TestSchema.Credential alias OpenApiTypesense.ApiResponse alias OpenApiTypesense.APIStatsResponse alias OpenApiTypesense.Connection alias OpenApiTypesense.HealthStatus alias OpenApiTypesense.SuccessStatus @rate_limit :timer.seconds...
0276f73cddffb787e7ae8344804844a0a6931c99
4,456
[ 987352938 ]
[ "liveview" ]
defmodule LiveViewDashboardWeb.Components.KeypadComponent do use Phoenix.Component # Attributes attr :id, :string, default: "keypad-component" attr :correct_code, :string, default: "1234" attr :max_attempts, :integer, default: 5 attr :current_input, :string, default: "" attr :attempts, :integer, default:...
0277159798eec372ce668e255e52c9a9aaa15077
2,774
[ 845055997 ]
[ "genserver", "documented" ]
defmodule FileManager.Session do @moduledoc """ This modules is responsible for managing file system sessions. To interact with the file system, callers need to first open a session. The session maintains the caller's current working directory. """ use GenServer alias FileManager.Storage defstruct cur...
0277765a2da8b8010609acc19a99a1cf25359291
2,512
[ 652796601 ]
[]
defmodule LiveViewStudio.Flights do def search_by_airport(airport) do Process.sleep(1000) upcase_airport = String.upcase(airport) list_flights() |> Enum.filter(&(&1.origin == upcase_airport || &1.destination == upcase_airport)) end def list_flights do [ %{ number: "450", ...
027843bb05ee1c4785cb0182d5dd13cd78e94c13
2,782
[ 113799071 ]
[]
defmodule Dec11Optim do @filename "dec_11.txt" def perform do full_list = parse_file() iterate(full_list) |> count_occupied end def iterate(original) do next = original |> preprocess |> loop cond do Enum.join(original) == Enum.join(next) -> original true -> iterate(ne...
027863ef8f86bc820ff96483e4d4add0724da637
1,684
[ 318300060 ]
[ "typespec", "documented" ]
defmodule Lit.Helpers do @moduledoc """ Provides helper functions for Lit-generated controllers. """ @type params :: map @doc """ Determines how the query for an index action should be sorted. Relies on the `"sort_field"` and `"sort_direction"` parameters to be passed. By default, it sorts by `:id` i...
027867d541831d5cd7234c3358d9eb41d52dfc26
7,430
[ 791099453 ]
[ "typespec", "macro", "documented" ]
defmodule Tracing do @moduledoc """ Mostly copied from https://github.com/msramos/abstracing/blob/main/lib/tracing.ex """ OpenTelemetry.Tracer defguard is_ast(value) when is_tuple(value) and tuple_size(value) == 3 defguard valid_opts(opts) when is_map(opts) or is_ast(opts) defguard valid_name(name) when...
02794e29c348a69e92490788f2aede6bc471e0c2
1,910
[ 496589622 ]
[ "genserver" ]
defmodule Dc.Manager do use GenServer use Common def start_game(args) do {func, _} = __ENV__.function call({func, args}) end @loop_interval 1000 def start_link(_opts) do GenServer.start_link(__MODULE__, [], name: __MODULE__) end @impl true def init(_args) do Process.send_after(self(...
027967708dfdd64554162c449f3329c274481f23
2,398
[ 48701042, 565421534 ]
[ "test" ]
defmodule ChangelogWeb.NewstemViewTest do use ChangelogWeb.ConnCase, async: true alias ChangelogWeb.NewsItemView describe "object_path/1" do test "defaults to nil when object is nil" do item = build(:news_item, object_id: nil) assert is_nil(NewsItemView.object_path(item)) end test "reco...
0279e51b594bcda49664558d0fcf01b4b85ac162
2,173
[ 102057268 ]
[ "genserver" ]
defmodule Project1 do use GenServer def start_link(args) do Project1.Exdistutils.start_distributed(:project1,:error) {:ok,pid_banker}=Project1.Banker.start_link {:ok,var}=get_seed(pid_banker) var=:erlang.system_info(:logical_processors_available) GenServer.start_link(__MODULE__,{:ok,pid_banke...
0279fcec25af467c637360669ebbda0b3e88cc84
1,521
[ 194499949, 194512327 ]
[ "phoenix" ]
defmodule RumblWeb.Auth do alias Rumbl.Accounts alias RumblWeb.Router.Helpers, as: Routes import Plug.Conn import Phoenix.Controller def init(opts), do: opts def call(conn, _opts) do user_id = get_session(conn, :user_id) cond do user = conn.assigns[:current_user] -> put_current_use...
0279fd06bf3e971721349947fb1fcfe872878398
12,445
[ 367278931 ]
[ "documented" ]
defmodule Google.Cloud.Blockchainnodeengine.V1.BlockchainNode.BlockchainType do @moduledoc false use Protobuf, enum: true, protoc_gen_elixir_version: "0.14.1", syntax: :proto3 field :BLOCKCHAIN_TYPE_UNSPECIFIED, 0 field :ETHEREUM, 1 end defmodule Google.Cloud.Blockchainnodeengine.V1.BlockchainNode.State do ...
027ab8e81d14dd8f61016c6819e3cb9250fa763b
4,129
[ 345517080, 755184742 ]
[ "genserver", "typespec", "supervisor", "documented" ]
defmodule Crawly.DataStorage do @moduledoc """ Data Storage, is a module responsible for storing crawled items. On the high level it's possible to represent the architecture of items storage this way: ┌──────────────────┐ │ │ ┌------------------┐ ...
027ab94ff7646ef1800aed8e9c5a64e71c6b584c
24,470
[ 564863485, 741187755 ]
[ "typespec", "documented" ]
defmodule Evision.SIFT do import Kernel, except: [apply: 2, apply: 3] @typedoc """ Type that represents an `Evision.SIFT` struct. - **ref**. `reference()` The underlying erlang resource variable. """ @type t :: %__MODULE__{ ref: reference() } @enforce_keys [:ref] defstruct [:ref] alias _...
027ae4026b836517b523d126158bfea783f33463
1,681
[ 337120631 ]
[ "documented" ]
defmodule Petal.New.Project do @moduledoc false alias Petal.New.Project defstruct base_path: nil, app: nil, app_mod: nil, app_path: nil, lib_web_name: nil, root_app: nil, root_mod: nil, project_path: nil, web_app: nil...
027b10f6d6c9e64426e0d8176d39ab0b897ee171
1,714
[ 759246320 ]
[ "liveview" ]
defmodule PhosWeb.UserForgotPasswordLive do use PhosWeb, :live_view alias Phos.Users def render(assigns) do ~H""" <div class="w-full flex flex-col justify-center h-screen items-center"> <.header class="text-center"> Forgot your password? <:subtitle>We'll send a password reset link ...
027b1acb237ec97a0a08794f7c5658891e8c39b2
1,752
[ 56443202 ]
[ "test" ]
defmodule Caravan.Wheel.Modes.SimpleTest do use ExUnit.Case import Caravan.Wheel.Modes.Simple, only: [handle_fetch: 1, handle_pull: 1] alias Ecto.Adapters.SQL.Sandbox alias Dirk.{Ticker, Repo} setup do :ok = Sandbox.checkout(Repo) body = %{"ticker" => %{"buy" => 3880.38, "high" => 3917.24, ...
027bf27ae17520d622d72cb05af71e2e2910407b
1,882
[ 185558207, 213229236, 1000104078, 982054619, 882572863, 217320195, 174991383, 807904878, 540729553, 771023416, 887377354 ]
[ "ecto" ]
defmodule Mix.Tasks.Pleroma.Search.Indexer do import Mix.Pleroma import Ecto.Query alias Pleroma.Workers.SearchIndexingWorker def run(["create_index"]) do start_pleroma() with :ok <- Pleroma.Config.get([Pleroma.Search, :module]).create_index() do IO.puts("Index created") else e -> IO....
027c9a3d8c418aa47243c8e484fad05ef19f77fd
1,571
[ 383233019 ]
[]
# This file is responsible for configuring your application # and its dependencies with the aid of the Mix.Config module. # # This configuration file is loaded before any dependency and # is restricted to this project. # General application configuration import Config config :rockelivery, ecto_repos: [Rockelivery.R...
027da8dd55c146983b12657bebbba9bfcf8e6fb3
2,232
[ 128109345 ]
[ "documented", "ecto" ]
defmodule Tasktrack.Tasks do @moduledoc """ The Tasks context. """ import Ecto.Query, warn: false alias Tasktrack.Repo alias Tasktrack.Tasks.Task @doc """ Returns the list of tasks. ## Examples iex> list_tasks() [%Task{}, ...] """ def list_tasks do Repo.all(Task) |> Repo....
027e7d82194de82a68917adcc077267311d469ae
2,245
[ 107728716 ]
[ "typespec", "documented", "ecto" ]
defmodule Edges.Events.Source do @moduledoc """ This represents a `Reader` of the site. ## Table Column | Type | Nullable | Default :----- | :--: | :------: | ------: id | uuid | false ...
027e90b5ee40803cc4f3a1a84d47316a8460dfe7
2,837
[ 123757219 ]
[ "test" ]
defmodule AmnesiaWeb.TaskControllerTest do use AmnesiaWeb.ConnCase alias Amnesia.Tasks alias Amnesia.Tasks.Task @create_attrs %{description: "some description", due_date: "3010-04-17 14:00:00.000000Z", title: "some title"} @update_attrs %{description: "some updated description", due_date: "2011-05-18 15:01:...
027ebf063e319a9a3e9658ccba233992a7a8ef77
3,341
[ 127277904 ]
[ "test" ]
defmodule PipeLoggerTest do use ExUnit.Case doctest PipeLogger @test_data [1, "STRING", {1, 2}, %{1 => 2}, [1, 2]] # # debug # test "debug with no argument" do assert @test_data |> PipeLogger.debug() |> Enum.map(& &1) == @test_data end test "debug ith string msg" do assert @test_data |> Pip...
027edaa88f3a111896b9b2107782e6e36973ab80
3,261
[ 170274079 ]
[ "test" ]
defmodule Org.ProjectListGroomerTest do use ExUnit.Case alias Org.ProjectListGroomer alias FS.IOMap @default_project_list [ "project a", "project b", "project c", ".stfolder", ".stignore", ".stversions", ".DS_Store" ] @io_map %IOMap{ files: %{ project_list_file: %{ ...
027ee0f131c5b282668e1a16fbdce01653bc128b
3,688
[ 881572900 ]
[ "documented", "ecto" ]
defmodule ProjetoFinal.Hogwarts do @moduledoc """ The Hogwarts context. """ import Ecto.Query, warn: false alias ProjetoFinal.Repo alias ProjetoFinal.Hogwarts.Personagem @doc """ Returns the list of personagens. ## Examples iex> list_personagens() [%Personagem{}, ...] """ def lis...
027eea945430dd60169d49e38356a41457232f63
1,737
[ 185341206 ]
[]
# This file is responsible for configuring your application # and its dependencies with the aid of the Mix.Config module. # # This configuration file is loaded before any dependency and # is restricted to this project. # General application configuration use Mix.Config config :chat_app, ecto_repos: [ChatApp.Repo] ...
027f06d314a36a121e3ab492c6761ade6c0bbe30
8,687
[ 927701597 ]
[ "documented" ]
defmodule Tau5.LuaEvaluator do @moduledoc """ Handles Lua code evaluation in a sandboxed environment with memory and security restrictions. """ require Logger import Kernel, except: [spawn_opt: 2] import :erlang, only: [spawn_opt: 2] @config %{ timeout_ms: 5_000, max_heap_size: 1_000_000, ma...
02803efbf7fee387481a6ad2ee2cf3ca6b033cd4
8,490
[ 829059969 ]
[ "typespec", "documented" ]
defmodule BACnet.Protocol.EventAlgorithms.ChangeOfCharacterString do @moduledoc """ Implements the BACnet event algorithm `ChangeOfCharacterString`. The ChangeOfCharacterString event algorithm detects whether the monitored value matches a character string that is listed as an alarm value. Alarm values are of...
02812c244cb149052987949cfa33623ae43df9b3
1,635
[ 731744119 ]
[ "test", "ecto" ]
defmodule OrderManagement.OrdersTest do use OrderManagement.DataCase alias OrderManagement.Orders describe "orders" do alias OrderManagement.Orders.Order import OrderManagement.OrdersFixtures @invalid_attrs %{email: nil, price: nil, balance_due: nil} test "get_order/1 returns the order with g...
02823a2accb9c891ed9a01e48818e6c8fbcb2970
2,702
[ 115367249 ]
[ "genserver", "documented" ]
defmodule Ueberauth.Strategy.Bungie do @moduledoc """ Bungie Strategy for Ueberauth """ use Ueberauth.Strategy, oauth2_module: Ueberauth.Strategy.Bungie.OAuth alias Ueberauth.Auth.{Info, Credentials, Extra} def uid(conn) do conn.private.bungie_user["Response"]["membershipId"] end def handle_reque...
028255d21c2bcc5dd48ba14313dcac9e77294acf
3,352
[ 303611154 ]
[]
%{ "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [...
0282663c6c049f1837c47c4a8abe407090ed6e9b
2,121
[ 360305330 ]
[]
defmodule Volley.MixProject do use Mix.Project @source_url "https://github.com/NFIBrokerage/volley" @version_file Path.join(__DIR__, ".version") @external_resource @version_file @version (case Regex.run(~r/^v([\d\.\w-]+)/, File.read!(@version_file), capture: :all_but_first ...
02835765a284aff1b50eb0b165ad4263c505792b
1,536
[ 99181723 ]
[]
defmodule TwilightInformant.Entry do # see https://github.com/nightscout/cgm-remote-monitor/blob/master/swagger.yaml defstruct type: nil, dateString: nil, date: nil, sgv: nil, direction: nil, noise: nil, filtered: nil, unfiltered: nil, rssi: nil, device: nil @content_type {"Content-Type", "application/json"}...
02838605cc2c045cee389be14387416e1606bb11
2,409
[ 664252694 ]
[]
defmodule RealDealApiWeb.Auth.Guardian do use Guardian, otp_app: :real_deal_api alias RealDealApi.Accounts def subject_for_token(%{id: id}, _claims) do sub = to_string(id) {:ok, sub} end def subject_for_token(_,_) do {:error, :no_id_provided} end def resource_from_claims(%{"sub...
0284067eb950a2b6a620f01a398cc07849678dd5
3,276
[ 122302424 ]
[ "test" ]
defmodule SuffixTest do use ExUnit.Case, async: true doctest Suffix test "ends_consonant_vowel_double_consonant?" do assert Suffix.ends_consonant_vowel_consonant?("vote") == false assert Suffix.ends_consonant_vowel_consonant?("stitch") == false assert Suffix.ends_consonant_vowel_consonant?("inn") == ...
02847c1a88c266fc114764a601cf7fd541cb1a71
2,934
[ 416383998 ]
[ "typespec" ]
defmodule BikeBrigade.SmsService do use BikeBrigade.Adapter, :sms_service use Phoenix.VerifiedRoutes, endpoint: BikeBrigadeWeb.Endpoint, router: BikeBrigadeWeb.Router alias BikeBrigade.Messaging.SmsMessage alias BikeBrigade.Utils alias BikeBrigade.Accounts @type sid :: String.t() @type status :: String...
0284b724ca651d4f00fb15e7300f10194ce96687
2,168
[ 436632362 ]
[ "test", "ecto" ]
defmodule MyApp.TimelineTest do use MyApp.DataCase alias MyApp.Timeline describe "posts" do alias MyApp.Timeline.Post import MyApp.TimelineFixtures @invalid_attrs %{body: nil, likes_count: nil, repost_count: nil, username: nil} test "list_posts/0 returns all posts" do post = post_fixtur...
0284d115831ece12c4e9089b0510eebb2843aa9a
3,103
[ 739922604 ]
[ "typespec", "liveview", "documented" ]
defmodule AshPyro.Extensions.Resource.Info do @moduledoc """ Helpers to introspect the `AshPyro.Extensions.Resource` Ash extension. Intended for use in components that automatically build UI from resource configuration. """ @doc """ Returns the form fields defined in the `AshPyro.Extensions.Resource` extensi...
0284d4cb34a029e5295e71752ac0bed079d56e7a
2,958
[ 106712767 ]
[ "test" ]
defmodule Sanbase.Alert.TriggerTrendingWordsTrendingProjectTest do use Sanbase.DataCase, async: false import Mock import Sanbase.Factory import ExUnit.CaptureLog alias Sanbase.Alert.UserTrigger alias Sanbase.Alert.Evaluator alias Sanbase.Alert.Trigger.TrendingWordsTriggerSettings setup do Sanbas...
0284ec09a49cdbc71a6a23b73aee96c5f96125bf
12,598
[ 456248094 ]
[]
%{ "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"}, "cachex": {:hex, :cachex, "3.4.0", "868b2959ea4aeb328c6b60ff66c8d5123c083466ad3c33d3d8b5f142e13101fb", [:mix], [{:eternal, "...
02859f1ce166cf3e1c8d9e66ed7e245b3394e4fe
3,591
[ 406479264 ]
[ "test", "ecto" ]
defmodule GeoLocationService.ServicesTest do use GeoLocationService.DataCase alias GeoLocationService.Services describe "datasets" do alias GeoLocationService.Services.Dataset @valid_attrs %{ city: "New Neva City", country: "Nicaragua", country_code: "CC", ip_address: "<IP_ADDRE...
0285bf14daa7808b6c3304568513ef7b7993d3d0
13,671
[ 942811655, 920024200 ]
[ "phoenix" ]
defmodule FrontWeb.JobController do require Logger use FrontWeb, :controller alias Front.{Async, Audit} alias Front.MemoryCookie alias Front.Models alias FrontWeb.Plugs.{FetchPermissions, Header, PageAccess, PublicPageAccess, PutProjectAssigns} @private_endpoints ~w(edit_workflow stop)a plug(PutProje...
0285c33efbd833706945d2b6d933b20cd666a5df
5,407
[ 101395144, 102010291, 76213170, 92660269, 99529942, 100894637 ]
[ "typespec", "documented" ]
defmodule ExDoc.Formatter.EPUB do @moduledoc """ Provide EPUB documentation """ @mimetype "application/epub+zip" alias __MODULE__.{Assets, Templates} alias ExDoc.Formatter.HTML @doc """ Generate EPUB documentation for the given modules """ @spec run(list, ExDoc.Config.t) :: String.t def run(proj...
0285c99e5cd9ac2a1c4a0e58e683781f3200bc72
2,157
[ 367292607 ]
[ "documented", "ecto" ]
defmodule PfLive.Finances do @moduledoc """ The Finances context. """ import Ecto.Query, warn: false alias PfLive.Repo alias PfLive.Finances.Entry require Date @doc """ Returns the list of entries. ## Examples iex> list_entries() [%Entry{}, ...] """ def list_entries do Repo....
0285d4cc17f1112c5861daf9e7770906c7f42bca
1,924
[ 766016116 ]
[ "documented", "ecto" ]
defmodule Bets.Dashboards do @moduledoc """ The Dashboards context. """ import Ecto.Query, warn: false alias Bets.Repo alias Bets.Dashboards.Dashboard @doc """ Returns the list of dashboards. ## Examples iex> list_dashboards() [%Dashboard{}, ...] """ def list_dashboards do Re...
0285fef154a38cc9d06f32baed89852efed5a12e
10,446
[ 192834211 ]
[]
%{ "aes256": {:hex, :aes256, "0.5.1", "bf8a21c2d5642da93e181d3494636507e78f40e479c7df3d49e577e2cf352517", [:mix], [], "hexpm"}, "bamboo": {:hex, :bamboo, "0.8.0", "573889a3efcb906bb9d25a1c4caa4ca22f479235e1b8cc3260d8b88dabeb4b14", [:mix], [{:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: false]}, {:plu...
0286422a702aed630d257b229083a8f3d488a75d
5,626
[ 667398340 ]
[]
alias Acl.Accessibility.Always, as: AlwaysAccessible alias Acl.Accessibility.ByQuery, as: AccessByQuery alias Acl.GraphSpec.Constraint.Resource, as: ResourceConstraint alias Acl.GraphSpec.Constraint.ResourceFormat, as: ResourceFormatConstraint alias Acl.GraphSpec, as: GraphSpec alias Acl.GroupSpec, as: GroupSpec alias ...
028688be64020507730dcde2873d217ef2589203
3,392
[ 602266485 ]
[ "test" ]
defmodule ExConn.ClientTest do use ExUnit.Case defmodule MockClient do use ExConn.Client url("ENV[MOCK_CONNECTOR_URL] || default-mock-url.com") headers(%{ "Content-Type" => "application/json", "API_KEY" => "ENV[MOCK_API_KEY] || default-api-key" }) endpoint( :get_thing, ...
0286bd5eb74e8db68e457a2c9f30ac8cc521f07b
2,749
[ 68231981 ]
[ "macro", "documented" ]
defmodule Sippet.Transactions.Client do @moduledoc false alias Sippet.Message, as: Message alias Sippet.Message.StatusLine, as: StatusLine alias Sippet.Transactions.Client.State, as: State def receive_response(server, %Message{start_line: %StatusLine{}} = response), do: GenStateMachine.cast(server, {:in...
0286e23c546463edba17c850947bb86196ac1f42
4,077
[ 646854017 ]
[ "test", "ecto" ]
defmodule Blog.CommentTest do use Blog.DataCase describe "comments" do import Blog.CommentFixture import Blog.UserFixture import Blog.BlogFixture alias Blog.Comments test "list of comments by blog" do IO.inspect("Running test -- list of comments by blog -- ...") user = user_fixtu...
02870e613a5673be3b092cf2219abc60f9d974d1
4,447
[ 88605544, 163807587, 182398778 ]
[ "typespec", "documented" ]
defmodule Bitcoin.Protocol.Messages.Alert do @moduledoc """ An alert message. https://en.bitcoin.it/wiki/Protocol_documentation#alert """ @known_valid_alert_signing_pubkeys %{ satoshi_client: Base.decode16!("04FC9702847840AAF195DE8442EBECEDF5B095CDBB9BC716BDA9110971B28A49E0EAD8564FF0DB22209E0374782...
028719fa336a5c76b61bb7e1d3b6db4c4944bac1
3,415
[ 161799729 ]
[ "documented" ]
defmodule Receivex.Adapter.Mailgun do @moduledoc false @behaviour Receivex.Adapter import Receivex.Parser def handle_webhook(conn, handler, opts) do payload = conn.body_params api_key = Keyword.fetch!(opts, :api_key) case valid_webhook_request?(payload, api_key) do true -> payload ...
02875587ac579229a2e839f6ba62a81ceae7d1fd
2,337
[ 91360571 ]
[]
%{"certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [:rebar3], [], "hexpm"}, "earmark": {:hex, :earmark, "1.2.2", "f718159d6b65068e8daeef709ccddae5f7fdc770707d82e7d126f584cd925b74", [:mix], []}, "ex_doc": {:hex, :ex_doc, "0.15.1", "d5f9d588fd802152516fccfdb96d6...
028779f5a9cde1e168acc788da1ad2e2beafc09a
3,676
[ 188179001 ]
[ "documented" ]
defmodule AdWords.Reporting.Plug do @moduledoc """ E.g: __rdquery=SELECT CampaignId, Clicks FROM ADGROUP_PERFORMANCE_REPORT DURING TODAY&__fmt=CSV TODO: add doc """ alias AdWords.Services.Shared alias NimbleCSV.RFC4180, as: CSV import Plug.Conn @time_opts ~r/[today|yesterday|last_7_days]/i @url "http...
02879cc0e0ea2d4c1bcb58e1419cb0851069aacc
1,750
[ 577099121 ]
[]
defmodule Q03 do def read_and_parse(filename) do # read file {:ok, data_str} = File.read(filename) # convert string to lines data_str |> String.split("\n") end def get_priorities() do priorities1 = ?a..?z |> Enum.with_index(fn x, i -> {<<x :: utf8>>, i+1} end) priorities2 = ?A...
0287a0fa78e5796b25bbf33924b81c0c76f7c06b
5,199
[ 39850985 ]
[]
%{ "castore": {:hex, :castore, "0.1.7", "1ca19eee705cde48c9e809e37fdd0730510752cc397745e550f6065a56a701e9", [:mix], [], "hexpm", "a2ae2c13d40e9c308387f1aceb14786dca019ebc2a11484fb2a9f797ea0aa0d8"}, "certifi": {:hex, :certifi, "2.5.1", "867ce347f7c7d78563450a18a6a28a8090331e77fa02380b4a21962a65d36ee5", [:rebar3], [{...
02880f26cd0f05a7610cce2415c767c82ba80b1f
10,157
[ 299711271 ]
[ "typespec", "macro", "documented" ]
defmodule Quantum do @moduledoc """ Defines a quantum Scheduler. When used, the quantum scheduler expects the `:otp_app` as option. The `:otp_app` should point to an OTP application that has the quantum runner configuration. For example, the quantum scheduler: defmodule MyApp.Scheduler do use ...
0288225bc1a0ba1670677482e80ac3dbff592888
3,952
[ 1010403460 ]
[ "typespec", "documented" ]
defmodule ClaudeCodeSDK.Query do @moduledoc """ Handles querying Claude Code and processing responses. This module is responsible for building the appropriate command-line arguments for different types of Claude Code queries (new queries, continuations, and resumptions) and delegating to the Process module f...
0288602e58588e7491acbdcbd9128217a11b4386
11,432
[ 997214727 ]
[ "test" ]
defmodule Aiex.AI.Distributed.NodeCapabilityManagerTest do use ExUnit.Case, async: false alias Aiex.AI.Distributed.NodeCapabilityManager setup do # Start NodeCapabilityManager for testing {:ok, pid} = NodeCapabilityManager.start_link([]) on_exit(fn -> if Process.alive?(pid) do Pro...
0288c2a17926959386024ad790d072a38af3198f
4,326
[ 142629370 ]
[ "typespec", "documented", "phoenix" ]
defmodule PowAssent.Phoenix.RegistrationController do @moduledoc false use Pow.Extension.Phoenix.Controller.Base alias Plug.Conn alias Pow.Extension.Config, as: ExtensionConfig alias Pow.Plug, as: PowPlug alias PowAssent.Plug alias PowEmailConfirmation.Phoenix.ControllerCallbacks, as: EmailConfirmationCa...
0288e3e6a77fb27127a5af27bcf07eb3879fdf50
4,721
[ 332374862 ]
[ "test" ]
defmodule Ex6502.CPU.Executor.ORATest do use ExUnit.Case, async: true import Ex6502.TestHelper alias Ex6502.CPU.Executor.ORA alias Ex6502.{Computer, CPU, Memory} setup do m = Memory.init(0xFFFF) |> Memory.set_reset_vector(0x8000) c = Computer.init(memory: m) %{c: c} end descri...
0288f72184b35c3decda0108d64195543e2f8766
3,512
[ 511275862 ]
[]
%{ "asciichart": {:hex, :asciichart, "1.0.0", "6ef5dbeab545cb7a0bdce7235958f129de6cd8ad193684dc0953c9a8b4c3db5b", [:mix], [], "hexpm", "edc475e4cdd317599310fa714dbc1f53485c32fc918e23e95f0c2bbb731f2ee2"}, "dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix...
02898c405ff8be2bad4b3a6c9be5c493ad62310e
2,340
[ 969999971 ]
[ "documented" ]
defmodule DeeperHub.Core.Data.Migrations.BxClassesCmtsNotes do @moduledoc """ Migration para criar e remover a tabela bx_classes_cmts_notes. """ alias DeeperHub.Core.Data.Repo alias DeeperHub.Core.Logger require DeeperHub.Core.Logger @doc """ Cria a tabela de bx_classes_cmts_notes. """ def up do ...
0289f22634dcb42f41e7fe124c5159d1d5e7bcac
6,720
[ 101512326 ]
[ "genserver", "macro", "documented" ]
defmodule Git.Repository do @moduledoc """ A process for interacting with a git repository On init this will immediately succeed, but trigger the `handle_continue` message as the first message handler. handle_continue will verify the repository in a new temporary directory. When this process is killed this ...
028a3d1a33f139e9085a919ca0c8ecaecfde8d52
2,074
[ 876144051 ]
[ "liveview", "ecto" ]
defmodule SlaxWeb.Live.Chat.ChatRoomEdit do use SlaxWeb, :live_view alias Slax.Chat def render(assigns) do ~H""" <div class="mx-auto w-96 mt-12"> <.header> <%= @page_title %> <:actions> <.link class="font-normal text-xs text-blue-600 hover:text-blue-700" ...
028a6403b276f0973f9904477401eb4941104402
1,701
[ 129324098 ]
[ "phoenix" ]
defmodule JobPortalWeb.UserController do use JobPortalWeb, :controller alias JobPortal.Accounts alias JobPortal.Accounts.User action_fallback JobPortalWeb.FallbackController def index(conn, _params) do users = Accounts.list_users() render(conn, "index.json", users: users) end def create(conn, ...
028a9eadf246ddd77d543b79d85b7ec80d8fb8aa
18,502
[ 1010403460 ]
[ "test" ]
defmodule ClaudeCodeSDK.StateManagerTest do use ExUnit.Case, async: true alias ClaudeCodeSDK.{StateManager, Step, Message} alias ClaudeCodeSDK.StateManager.{MemoryPersistence, FilePersistence} describe "StateManager with MemoryPersistence" do setup do {:ok, pid} = StateManager.start_link( ...
028aaf278005923d362816a0bed6e8187a185b38
9,385
[ 942468823 ]
[ "documented" ]
defmodule GameBot.Test.Mocks.EventStore do @moduledoc """ Mock implementation of EventStore for testing. This module provides a mock that simulates an event store without requiring a database connection. It's used for unit tests that need to verify event store interactions. This module delegates to GameBo...
028ab956af8d979cd4f6930db5e1f8fd846bf69d
4,350
[ 963230380 ]
[ "typespec", "macro", "documented" ]
defmodule GenAI.Graph.NodeBehaviour do @moduledoc """ Behaviour Graph Node Elements must adhere to. """ alias GenAI.Types.Graph, as: G alias GenAI.Types, as: T # ================================== # Behaviour # ================================== @callback new() :: struct @callback new(options :: te...
028acf6b137022bc5bb7b523f9fd969461c7c854
1,566
[ 912110467 ]
[]
defmodule PaintByNumber do @init_size 1 def palette_bit_size(color_count) do # Please implement the palette_bit_size/1 function determine_bitstring_size(color_count) end defp determine_bitstring_size(number, size \\ @init_size) do if Integer.pow(2, size) >= number do size else dete...
028ad77e7295215729953736c9d9c530c213afa6
1,606
[ 88568459 ]
[ "genserver" ]
defmodule ES.Cache do require Logger use GenServer defmodule State do defstruct store: nil, cache: nil end def start_link do GenServer.start_link(__MODULE__, :ok, name: __MODULE__) end def init(:ok) do cache = :ets.new(:es_cache, [:named_table, :set]) Process.send_after(self(), :gc, 100...
028b1da7133d11d920582aca84651d15165e2e01
4,292
[ 574058266 ]
[]
defmodule Point do defstruct [:x, :y] def new(x, y) do %Point{x: x, y: y} end end defmodule Rope do def make_knots(num_knots) do 1..num_knots |> Enum.map(fn _ -> Point.new(0, 0) end) end def motions([], knots, visited) do {knots, visited} end def motions([motion | rest], knots, visited)...
028c0ecda7913c5404bdce4042a109fe0c47b7bd
1,957
[ 505555912 ]
[ "documented", "ecto" ]
defmodule Concurs.Incricao do @moduledoc """ The Incricao context. """ import Ecto.Query, warn: false alias Concurs.Repo alias Concurs.Incricao.Inscricoes @doc """ Returns the list of inscricao. ## Examples iex> list_inscricao() [%Inscricoes{}, ...] """ def list_inscricao do ...
028c447ed42369ad8d29436c73ca3c21a1513e60
2,113
[ 837813073 ]
[ "typespec", "documented" ]
defmodule Exa.Graf.Traverse.Bfs do @moduledoc """ A graph traversal control implementation for Breadth First Search (BFS). """ alias Exa.Graf.Types, as: G defmodule Bfs do alias Exa.Graf.Types, as: G defstruct queue: [], unvis: MapSet.new() @type t :: %__MODULE__{ queu...
028c6e3f64cc19ea2f2f6d8c472074f37801c663
3,355
[ 895309632 ]
[ "liveview", "ecto" ]
defmodule ImprovedAttributesExampleWeb.LiveCommentLive.Form do use ImprovedAttributesExampleWeb, :live_view alias ImprovedAttributesExample.LiveCatalog alias ImprovedAttributesExample.LiveCatalog.LiveComment @impl true def render(assigns) do ~H""" <.header> <%= @page_title %> <:subtitle>...
028ce9bae250fbca98715825add881d9fe0be71d
4,744
[ 248817168 ]
[ "test" ]
defmodule Membrane.RTP.JitterBuffer.TimestampsCalculationTest do use ExUnit.Case, async: true use Bunch alias Membrane.RTP.BufferFactory alias Membrane.RTP.JitterBuffer @max_rtp_timestamp 0xFFFFFFFF defp action_buffers(actions) do actions |> Enum.filter(&match?({:buffer, _}, &1)) |> Enum.map(...
028cfb6d8a49dfdb7caac7e336ec08118241d6cf
10,051
[ 457467670 ]
[]
%{ "absinthe": {:hex, :absinthe, "1.5.5", "22b26228f56dc6a1074c52cea9c64e869a0cb2427403bcf9056c422d36c66292", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex...
028d3a3f68e2f0122b34b58b4349b16bff656e52
4,076
[ 978576109 ]
[ "documented", "ecto" ]
defmodule PodcastMcp.Accounts.User do use Ecto.Schema import Ecto.Changeset schema "users" do field :email, :string field :password, :string, virtual: true, redact: true field :hashed_password, :string, redact: true field :confirmed_at, :utc_datetime field :authenticated_at, :utc_datetime, vi...
028d4f7904a8109e1d3c30f2b0fb9735eae865f3
1,594
[ 212050029 ]
[ "macro", "documented", "phoenix" ]
defmodule EdgeWeb do @moduledoc """ The entrypoint for defining your web interface, such as controllers, views, channels and so on. This can be used in your application as: use EdgeWeb, :controller use EdgeWeb, :view The definitions below will be executed for every view, controller, etc, so k...
028df56a916b2d984072a96ced1f0b3b89f9a35a
20,340
[ 71608796 ]
[ "macro", "documented" ]
defmodule IEx.Helpers do @moduledoc """ Welcome to Interactive Elixir. You are currently seeing the documentation for the module `IEx.Helpers` which provides many helpers to make Elixir's shell more joyful to work with. This message was triggered by invoking the helper `h()`, usually referred to as `h/0`...
028dfd76748c08d76394b81f72e8e306a505294c
7,467
[ 94802536 ]
[ "typespec", "documented" ]
defmodule EVM.Operation.StackMemoryStorageAndFlow do alias EVM.Helpers alias EVM.Memory alias EVM.Stack alias EVM.ExecEnv alias MathHelper alias EVM.Operation use Bitwise @doc """ Remove item from stack. TODO: Implement opcode ## Examples iex> EVM.Operation.StackMemoryStorageAndFlow.pop(...
028e262cfb7330437276179518709b061e490d21
1,644
[ 192844514 ]
[]
defmodule Bank.Utils.Endpoints do alias Bank.Storage.Users alias Bank.Storage.Acounts alias Bank.Utils.Generator def balances(port, jsonBody) do post('http://localhost:#{port}/balances', jsonBody) end def deposit(port, mapBody) do jsonBody = build_deposit_json_body(mapBody) post('http://lo...
028e37164954f19bea3fbbd9a4cc3bc0daab6cb5
2,226
[ 346469000 ]
[ "typespec", "documented" ]
defmodule Allcoins.Exchanges.CoinbaseClient do # TODO: handle when the connection is closed # Last message: {:gun_down, #PID<0.391.0>, :ws, :closed, [], []} # TODO: handle when the host is false/unreachable @moduledoc """ CoinbaseClient provides an interface to connect in WS to Coinbase crypto-currency feed...
028ec1bab47d0e44f4e71c89881346fa5e7a5cb0
1,772
[ 673595695 ]
[ "liveview" ]
defmodule ElixirGistWeb.UserForgotPasswordLive do use ElixirGistWeb, :live_view alias ElixirGist.Accounts def render(assigns) do ~H""" <div class="flex flex-col items-center justify-center m-gradient"> <h1 class="py-2 text-3xl font-bold text-white font-brand"> Forgot your password? <...
028ecdfc61858cca5272a2601dddaf09d243221f
2,959
[ 931624104 ]
[ "documented", "ecto" ]
defmodule IgBlog.News do @moduledoc """ The News context. """ import Ecto.Query, warn: false alias IgBlog.Repo alias IgBlog.News.Post @doc """ Returns the list of posts. ## Examples iex> list_posts() [%Post{}, ...] """ def list_posts do Repo.all(Post) end def list_posts_...
028ed1f3b6e0ca41aa2ba572e95f435b20319bfd
1,632
[ 183300044 ]
[]
defmodule KeywordValidator.MixProject do use Mix.Project @version "2.1.0" def project do [ app: :keyword_validator, version: @version, elixir: "~> 1.9", start_permanent: Mix.env() == :prod, deps: deps(), description: description(), package: package(), name: "K...
028edbe4140f0901c676ceed3d9d1c161d8c740f
3,161
[ 117802664 ]
[]
%{ "artificery": {:hex, :artificery, "0.2.6", "f602909757263f7897130cbd006b0e40514a541b148d366ad65b89236b93497a", [:mix], [], "hexpm"}, "confex": {:hex, :confex, "3.3.1", "8febaf751bf293a16a1ed2cbd258459cdcc7ca53cfa61d3f83d49dd276a992b4", [:mix], [], "hexpm"}, "cowboy": {:hex, :cowboy, "2.4.0", "f1b72fabe9c8a5fc6...
028f0a96ce69304608266dc4811903155a8e3893
2,529
[ 269890945 ]
[ "phoenix" ]
defmodule MariechenWeb.TagsController do use MariechenWeb, :controller alias Mariechen.Core.Tags alias Mariechen.Core.Tags.ProductPages alias Mariechen.Core.Tags.ProductVariants def get_tags_for_types(conn, %{"types" => types_str}) do res = types_str |> String.split(",") |> Enum.map(fn...
028f31556e380e3e9b3de1623f3f9f6018347663
1,548
[ 134224976 ]
[]
defmodule IslandsEngine.Board do alias IslandsEngine.{Coordinate, Island} def new, do: %{} def position_island(board, key, %Island{} = island) do case overlaps_existing_island?(board, key, island) do true -> {:error, :overlapping_island} false -> Map.put(board, key, island) end end def all_islands_pos...
028fa43b3657ea1db3385035688ef617ec0093f7
3,108
[ 565421534 ]
[ "phoenix", "ecto" ]
defmodule ChangelogWeb.Admin.SearchController do use ChangelogWeb, :controller alias Changelog.{Episode, NewsItem, NewsSource, Person, Podcast, Sponsor, Post, Topic} plug :assign_type when action in [:one] plug Authorize, [Policies.Admin.Search, :type] def all(conn, params = %{"q" => query}) do render(...