Dataset Viewer
Auto-converted to Parquet Duplicate
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
00000ee267e279ac588a5044b6b576e9537de48c
1,807
[ 417664530, 444472658 ]
[ "documented" ]
defmodule Legendary.CoreWeb.ErrorHelpers do @moduledoc """ Conveniences for translating and building error messages. """ use Phoenix.HTML def error_class(form, field) do if Keyword.get_values(form.errors, field) |> Enum.any?() do "error" else "" end end @doc """ Generates tag ...
0000115ec3cfb681daca8bf4df114d6493f6767f
1,796
[ 673137173 ]
[ "liveview" ]
defmodule Pax.Plugins.Breadcrumbs do use Pax.Interface.Plugin use Phoenix.Component import Pax.Components import Pax.Util.String @default_placement [:show_header_primary, :edit_header_primary, :new_header_primary, :delete_header_primary] @default_truncate_length 25 @impl true def init(_callback_module...
000018c45f803a3108f03cb2f248069c67d47933
3,246
[ 245239469 ]
[ "typespec", "documented" ]
defmodule Usps.Shipment do @moduledoc """ Get tracking information about a shipment """ import XmlBuilder, only: [element: 2, element: 3] import SweetXml alias Usps.Configuration alias Usps.Operation @type shipment :: %{ number: nil | binary(), status: nil | binary(), cate...
000021c9e835f94067fd89b41c950ce02fa726b2
9,012
[ 996364241 ]
[ "documented" ]
defmodule DeeperHub.Core.Data.Schemas.EntityData do @moduledoc """ Schema para a tabela entity_data do CMS dinâmico. Gerencia os dados reais armazenados usando padrão EAV (Entity-Attribute-Value). """ use DeeperHub.Core.Data.SchemaBase, table_name: "entity_data", primary_key: :id alias DeeperHub.C...
000028a973d767a125e31f112cac40654bb7966b
1,630
[ 796426596 ]
[ "liveview", "phoenix" ]
defmodule PlanningPokerWeb.Endpoint do use Phoenix.Endpoint, otp_app: :planning_poker # 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...
00002b57b2cfb0a08b68b17db682711ab6369cbc
1,500
[ 423243340 ]
[ "macro", "test", "documented", "ecto" ]
defmodule MCT.DataCase do @moduledoc """ This module defines the setup for tests requiring access to the application's data layer. You may define functions here to be used as helpers in your tests. Finally, if the test case interacts with the database, we enable the SQL sandbox, so changes done to the d...
000055fd06d2989d8ee1b5ab4c0599a02eaba011
1,725
[ 937621150 ]
[ "genserver" ]
defmodule ArchiveGHRepos.List do {:ok, _} = Application.ensure_all_started(:req) use GenServer @impl true def init(token \\ nil) do {:ok, %{ url_fun: fn gh_org -> "https://api.github.com/orgs/#{gh_org}/repos" end, token: token }} end @impl true def handle_call({:all_repos, g...
000064785c438220aec20bd68721617684baae49
4,276
[ 193244709, 101434552, 198908023 ]
[ "typespec", "documented" ]
defmodule GoogleApi.CommentAnalyzer.V1alpha1.Model.AnalyzeCommentRequest do @moduledoc """ The comment analysis request message. LINT.IfChange ## Attributes * `clientToken` (*type:* `String.t`, *default:* `nil`) - Opaque token that is echoed from the request to the response. * `comment` (*type:* `Google...
00007f33d799df0e21af34b02f2cdbd0ae537ba4
1,914
[ 276464294 ]
[]
defmodule TodaySocial.MixProject do use Mix.Project def project do [ app: :today_social, version: "0.1.0", elixir: "~> 1.7", elixirc_paths: elixirc_paths(Mix.env()), compilers: [:phoenix, :gettext] ++ Mix.compilers(), start_permanent: Mix.env() == :prod, aliases: alias...
00009b98bd7094c6471be8e961c63154ef8fa838
1,686
[ 457855573 ]
[]
import Config config :pingsite, PingSite.Repo, username: "postgres", password: "hackme", hostname: "localhost", database: "pingsite_dev", show_sensitive_data_on_connection_error: true, pool_size: 10 config :pingsite, PingSiteWeb.Endpoint, phoenix_profiler: [server: PingSite.Profiler], https: [ por...
0000f8effdb786196441aac501b367c402c5d259
15,458
[ 521810418 ]
[]
%{ "castore": {:hex, :castore, "0.1.18", "deb5b9ab02400561b6f5708f3e7660fc35ca2d51bfc6a940d2f513f89c2975fc", [:mix], [], "hexpm", "61bbaf6452b782ef80b33cdb45701afbcf0a918a45ebe7e73f1130d661e66a06"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [...
0001106aaab3505f98d61968818930b98a87310d
1,778
[ 95085372 ]
[]
# 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. use Mix.Config # General application configuration config :mywallet, ecto_repos: [Mywallet.Repo] ...
00019934d4ae725db228d5169b7e715d0095f1a1
1,718
[ 106213670, 106211954, 115815537 ]
[ "genserver" ]
defmodule MainApplication do use GenServer @convergence 90 def start_process(numNodes, topo, algo, mainPid) do IO.puts "Starting #{topo} topology with #{numNodes} nodes" {:ok, _pid} = GenServer.start_link(__MODULE__, [numNodes, topo, algo, mainPid], name: :manager) end def init(config) do [num...
0001ac23d20988efe79a367ba3e919d99d726332
6,654
[ 632584748 ]
[ "liveview", "phoenix", "documented" ]
defmodule GetThingsDoneWeb.UserAuth do use GetThingsDoneWeb, :verified_routes import Plug.Conn import Phoenix.Controller alias GetThingsDone.Accounts # Make the remember me cookie valid for 60 days. # If you want bump or reduce this value, also change # the token expiry itself in UserToken. @max_age ...
00024662ed0bf300f197bfb2889009469bc376ef
2,331
[ 432524514 ]
[ "genserver", "liveview", "documented" ]
defmodule UserdocsDesktopWeb.PageLive.Show do @moduledoc "Shows a page, will eventually include element and annotation CRUD operations" use UserdocsDesktopWeb, :live_view alias Schemas.Elements.Element alias UserdocsDesktopWeb.Root alias UserdocsDesktopWeb.LiveHelpers alias UserdocsDesktopWeb.RootSubscrip...
00035cc9be31d8f58a323d502270fda02ed45b55
8,045
[ 271873331, 632926645 ]
[]
%{ "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, "chatterbox": {:hex, :ts_chatterbox, "0.13.0", "6f059d97bcaa758b8ea6fffe2b3b81362bd06b639d3ea2bb0883355...
00037f62d1066dd2c7fb15ce2946e8611a874508
4,060
[ 402134949 ]
[ "test" ]
defmodule Exercism.Alias.NeedForSpeedTest do use ExUnit.Case import ExUnit.CaptureIO alias Exercism.Alias.NeedForSpeed describe "print_race" do @tag task_id: nil test "prints a race with no cars" do race = %NeedForSpeed.Race{ title: "Need For Speed 2021", total_distance_in_meter...
0003a04ae7062f61acd90a5d8e2a7eb09f1dbc90
2,201
[ 433484844 ]
[ "typespec", "test" ]
defmodule ExCubicIngestion.S3ScanTest do use ExUnit.Case, async: true alias __MODULE__.FakeAws alias ExCubicIngestion.S3Scan describe "list_objects_v2/2" do test "single page" do stream = S3Scan.list_objects_v2("bucket", prefix: "prefix/", lib_ex_aws: FakeAws) assert [ %{prefix...
000416eb63dd9baa895a95319a92cd412d87b26a
1,993
[ 344147620 ]
[ "test", "ecto" ]
defmodule EventApp.UpdatesTest do use EventApp.DataCase alias EventApp.Updates describe "updates" do alias EventApp.Updates.Update @valid_attrs %{update: "some update"} @update_attrs %{update: "some updated update"} @invalid_attrs %{update: nil} def update_fixture(attrs \\ %{}) do {:...
0004390278da6b8a31f9a52abfe90f4ad46b92a8
5,176
[ 76956742 ]
[]
%{"bbmustache": {:hex, :bbmustache, "1.0.4", "7ba94f971c5afd7b6617918a4bb74705e36cab36eb84b19b6a1b7ee06427aa38", [:rebar], []}, "cf": {:hex, :cf, "0.2.2", "7f2913fff90abcabd0f489896cfeb0b0674f6c8df6c10b17a83175448029896c", [:rebar3], []}, "connection": {:hex, :connection, "1.0.4", "a1cae72211f0eef17705aaededacac3eb...
00044234e38879a8f7ba364b600fad7438373800
5,334
[ 193244709, 101434552, 198908023 ]
[ "typespec", "documented" ]
defmodule GoogleApi.RemoteBuildExecution.V2.Model.BuildBazelRemoteExecutionV2Action do @moduledoc """ An `Action` captures all the information about an execution which is required to reproduce it. `Action`s are the core component of the [Execution] service. A single `Action` represents a repeatable action that can ...
000518f7ef88ccd1579c0a691dac125540920094
17,265
[ 674827810, 846193522 ]
[]
%{ "amqp": {:hex, :amqp, "3.3.0", "056d9f4bac96c3ab5a904b321e70e78b91ba594766a1fc2f32afd9c016d9f43b", [:mix], [{:amqp_client, "~> 3.9", [hex: :amqp_client, repo: "hexpm", optional: false]}], "hexpm", "8d3ae139d2646c630d674a1b8d68c7f85134f9e8b2a1c3dd5621616994b10a8b"}, "amqp_client": {:hex, :amqp_client, "3.12.4", "...
000523013d6dc0d700a92601505323a8f3931b5d
2,816
[ 324620561 ]
[ "test" ]
defmodule Excontainers.ExUnit.TestsIsolationTest do use ExUnit.Case import Support.DockerTestUtils import Support.ExUnitTestUtils import ExUnit.CaptureIO test "containers are re-created for each test" do defmodule SampleTestWithIsolatedContainers do use ExUnit.Case import Excontainers.ExUnit...
0005a5685628349de09e2aa615570d0451c4413a
1,653
[ 67948155, 64800791, 65724742, 66568267 ]
[]
defmodule SeatSaver.Mixfile do use Mix.Project def project do [app: :seat_saver, version: "0.0.1", elixir: "~> 1.2", elixirc_paths: elixirc_paths(Mix.env), compilers: [:phoenix, :gettext] ++ Mix.compilers, build_embedded: Mix.env == :prod, start_permanent: Mix.env == :prod, a...
0005bf3bc86ee427edaea7fc6a1eec5bf9271d5a
7,877
[ 419820423 ]
[ "test" ]
defmodule VelocityWeb.Resolvers.SimulatePtoTest do use VelocityWeb.ConnCase, async: true # credo:disable-for-this-file @simulate_pto_mutation """ mutation SimulatePto($startDate: Date!, $endDate: Date!, $user: InputUser!, $accrualPolicy: InputPtoAccrualPolicy!, $takenEvents: [InputTakenEvent], $manualEvents...
0005eb582c686dae1bb60cc5404dc0f39a1a5e69
16,902
[ 381987064 ]
[ "test" ]
defmodule Membrane.RTC.SIPEndpointTest do use ExUnit.Case import Membrane.ChildrenSpec alias Membrane.RTC.Engine alias Membrane.RTC.Engine.Endpoint.File, as: FileEndpoint alias Membrane.RTC.Engine.Endpoint.File.TrackConfig alias Membrane.RTC.Engine.Endpoint.HLS alias Membrane.RTC.Engine.Endpoint.HLS.{HL...
00065246ed24387c33f45d850fa24bef44511d66
2,178
[ 226573349 ]
[]
use Mix.Config # Configure your database config :todo_phoenix, TodoPhoenix.Repo, username: "postgres", password: "postgres", database: "todo_phoenix_dev", hostname: "localhost", show_sensitive_data_on_connection_error: true, pool_size: 10 # For development, we disable any cache and enable # debugging and ...
00065d8aa1267d1c207b4bc5dc5eff30120e8ef6
1,505
[ 376390340 ]
[ "phoenix" ]
defmodule FootballApiWeb.ConfederationController do use FootballApiWeb, :controller alias FootballApi.Organizations alias FootballApi.Organizations.Confederation action_fallback FootballApiWeb.FallbackController def index(conn, _params) do confederations = Organizations.list_confederations() render...
0006b7e2ba921278b7bb06da18eb41ed97a21bdc
2,397
[ 406155044, 441830115 ]
[ "typespec", "documented" ]
defmodule Lotus.Gen.Helpers do @moduledoc """ Helper functions to create and render files """ @type artifact() :: %{} @doc """ List artifacts (directory and files) that need to be generated. For the purpose of wrapping a new component. """ @spec list_artifacts(map()) :: map() def list_artifacts(%{ ...
0006d1a81dbf65eeb37590b43d3ca84ef24685c6
3,211
[ 588348046 ]
[ "liveview", "test" ]
defmodule RetroBoardWeb.BoardLiveTest do use RetroBoardWeb.ConnCase import Phoenix.LiveViewTest import RetroBoard.BoardsFixtures @create_attrs %{title: "some title"} @update_attrs %{title: "some updated title"} @invalid_attrs %{title: nil} defp create_board(_) do board = board_fixture() %{board...
000794b55ca42218a38bb175de2683ef4a588ffd
1,962
[ 153312992, 153720874, 153394287 ]
[ "test", "ecto" ]
defmodule TaskTracker.UsersTest do use TaskTracker.DataCase alias TaskTracker.Users describe "users" do alias TaskTracker.Users.User @valid_attrs %{admin: true, email: "some email"} @update_attrs %{admin: false, email: "some updated email"} @invalid_attrs %{admin: nil, email: nil} def user...
00080ac5c3ba380176c475fc2324d9f9dcd38b8c
4,344
[ 985853139 ]
[]
# Generated by Mochi compiler v0.10.25 on 2025-07-13T11:50:16Z defmodule Main do def main do # company_type :: list(map()) company_type = [%{ct_id: 1, kind: "production companies"}, %{ct_id: 2, kind: "other"}] # info_type :: list(map()) info_type = [%{it_id: 10, info: "languages"}] # title :: list...
000852d80788d98c13aedaba7424a53f0f894681
1,547
[ 281029696 ]
[ "typespec", "documented" ]
defmodule Account.Http.Transfer do @moduledoc false @required_body %{ amount: &is_number/1, currency: &is_atom/1, recipient_account_id: &is_number/1 } @spec execute(map(), number()) :: {number(), map()} def execute(%{} = entry_body, account_id) do parsed_body = Helpers.parse_body_request(ent...
00087592db2fc5b04ac30ac53f89807c2ce28afb
2,664
[ 610107322 ]
[ "liveview", "macro", "documented", "phoenix" ]
defmodule PasswordGeneratorPhxWeb do @moduledoc """ The entrypoint for defining your web interface, such as controllers, components, channels, and so on. This can be used in your application as: use PasswordGeneratorPhxWeb, :controller use PasswordGeneratorPhxWeb, :html The definitions below wi...
0008f6a06c2c0bd9ad1d78d1881f7cde9ae11514
3,199
[ 434254847 ]
[ "documented" ]
defmodule Day03 do @moduledoc """ Documentation for `Day03`. """ def sum_bits([first_line | _] = lines) do initial_bits = List.duplicate(0, Enum.count(first_line)) lines |> Enum.reduce(initial_bits, fn line, acc -> Enum.zip_with(acc, line, fn x, y -> x + y end) end) |> then(& {&1...
000a6bab4dbf0723177f1d82c09517b85ae5e361
1,853
[ 58178674 ]
[ "supervisor", "documented" ]
defmodule Exdb do use Application require Logger @port 4040 @doc false def start(_type, _args) do import Supervisor.Spec #Exdb.Server.start_link() Logger.info "Starting ExDB" children = [ supervisor(Task.Supervisor, [[name: Exdb.TaskSupervisor]]), worker(Task, [Exdb,...
000a8c4186fa4af70dba51592cb1d72fa6c7351f
2,320
[ 66467062, 67251634, 87683657, 99106424, 99126072, 125414041, 207847106, 297237670, 77253880, 86030418, 95605888, 100505295, 77785313, 86063602, 96350285, 63643631, 70405590, 72784914, 96857265, 97959122, 71519558, 73516692, 80629259, 86415043, 242077992, 65229557, ...
[ "documented", "ecto" ]
defmodule Mix.Tasks.Ecto.Gen.Migration do use Mix.Task import Macro, only: [camelize: 1, underscore: 1] import Mix.Generator import Mix.Ecto @shortdoc "Generates a new migration for the repo" @moduledoc """ Generates a migration. The repository must be set under `:ecto_repos` in the current app co...
000ae5c6a04222f6e8ccd6549af359707f9d8b71
2,974
[ 583462031 ]
[ "supervisor" ]
defmodule TrelloAppWeb.Telemetry do use Supervisor import Telemetry.Metrics def start_link(arg) do Supervisor.start_link(__MODULE__, arg, name: __MODULE__) end @impl true def init(_arg) do children = [ # Telemetry poller will execute the given period measurements # every 10_000ms. Lear...
000b103072c98338586875952ae89911a3228dad
3,577
[ 164356495 ]
[ "typespec", "documented" ]
defmodule Kojin.Pod.PodObject do @moduledoc """ Module for defining plain old data objects, independent of target language """ alias Kojin.Pod.{PodField, PodObject, PodTypeRef, PodTypes} use TypedStruct @typedoc """ A plain old data object, with an `id`, a `doc` comment and a list of fields. """ ...
000b261096aa9e2cf9bf2ec4ae55c81d1fbd9a69
2,347
[ 608743094 ]
[ "documented", "ecto" ]
defmodule Osuuspuutarha.Orders do @moduledoc """ The Orders context. """ import Ecto.Query, warn: false alias Osuuspuutarha.Repo alias Osuuspuutarha.Orders.Order alias Osuuspuutarha.ConfirmationSender alias Osuuspuutarha.Mailer @doc """ Returns the list of orders. ## Examples iex> list...
000bbe5c2fab9ce4dbaa1638e8db6cc9c05b7917
1,874
[ 656946312 ]
[]
# This file is responsible for configuring your application # and its dependencies with the aid of the Config module. # # This configuration file is loaded before any dependency and # is restricted to this project. # General application configuration import Config config :warp, ecto_repos: [Warp.Repo] # Configures...
000c43f12ffc69200db751fc4252b273984a6051
2,254
[ 854895872 ]
[ "test", "ecto" ]
defmodule Tasks.CatalogTest do use Tasks.DataCase alias Tasks.Catalog describe "products" do alias Tasks.Catalog.Product import Tasks.CatalogFixtures @invalid_attrs %{description: nil, price: nil, title: nil} test "list_products/0 returns all products" do product = product_fixture() ...
000ca0cdd8bc612cebce2f7d93dc88d4c4b4ab65
3,611
[ 97252713 ]
[ "macro", "documented" ]
defmodule Arguments do @moduledoc """ Arguments provides a module with argument parsing through `YourArguments.parse(incoming)` `use Arguments` There are two styles of arguments allowed - `command` - `$ cmd new project` - `flag` - `$ cmd --dir /etc` These two styles can be mixed, but the ...
000d0b7079390c45716fb612ba4bf34f54cd89f3
1,987
[ 813470654 ]
[]
# This file is responsible for configuring your application # and its dependencies with the aid of the Config module. # # This configuration file is loaded before any dependency and # is restricted to this project. # General application configuration import Config config :dev_jobs, ecto_repos: [DevJobs.Repo], gen...
000d0e0d0f77427564a92c38bd2118af2a5571f4
2,444
[ 265701271 ]
[ "liveview", "macro", "documented", "phoenix" ]
defmodule PersonalLibraryWeb 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 PersonalLibraryWeb, :controller use PersonalLibraryWeb, :view The definitions below will be executed for ev...
000db825542375de2ffe366e372c30e03836fba4
1,705
[ 210992973 ]
[ "phoenix", "ecto" ]
defmodule TestWeb.OrderController do use TestWeb, :controller alias Test.Orders alias Test.Orders.Order def index(conn, _params) do orders = Orders.list_orders() render(conn, "index.html", orders: orders) end def new(conn, _params) do changeset = Orders.change_order(%Order{}) render(conn,...
End of preview. Expand in Data Studio

Curated Elixir Stack v3

A curated, syntax-verified Elixir source code dataset derived from HuggingFaceCode/stack-v3-full. This was also an exploration for me to learn how datasets are curated.

Dataset Summary

  • Source: Derived directly from the public Elixir partition of The Stack v3 by BigCode.
  • File Count: ~564,000 files.
  • Target Size Bounds: Filtered to files between 1.5 KB and 25 KB post-cleaning.
  • Syntax Parsing: Validated using tree-sitter-elixir (AST parse validation to drop truncated code and merge conflicts).
  • Architectural Tags: Tagged via pattern matching across common Elixir domains (test, phoenix, liveview, genserver, supervisor, ecto, documented, typespec, macro).
  • Metadata Preserved: Original content_id and originating repo_ids are preserved in the Parquet schema to maintain source attribution and traceability back to original repositories.

Important Notice: Automated Filtering & Sanitization Limitations

Please read before using this dataset:

  1. No Guarantee of PII Removal: Personal Identifiable Information (such as email addresses, IP addresses, or potential secret keys) was processed strictly via automated regular expressions and replaced with sentinel tokens (<EMAIL>, <IP_ADDRESS>, <SECRET_TOKEN>, <PRIVATE_KEY>). These heuristics are non-exhaustive and are not guaranteed to catch all sensitive or personal information.
  2. No Guarantee of Complete License/Header Stripping: Automated comment parsing was applied to remove common top-of-file copyright preambles to reduce repetitive legal boilerplate. Some non-standard, malformed, or mid-file license blocks may remain.
  3. No Code Endorsement or Security Auditing: Files in this dataset originate from public third-party repositories. The maintainers of this curated derivative have not audited the code for security vulnerabilities, malware, or runtime fitness.

Disclaimer of Warranties & Limitation of Liability

THIS DATASET IS PROVIDED "AS IS" AND "AS AVAILABLE," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT.

IN NO EVENT SHALL THE CURATORS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE DATASET, THE USE OR REDISTRIBUTION OF THE DATASET, OR ANY UPSTREAM DATA DERIVED FROM THE STACK V3.

Downstream users, developers, and model trainers are solely responsible for ensuring that their use of this data complies with applicable data privacy laws, intellectual property rights, and third-party repository licenses.


Provenance, Attribution & Upstream Licensing

  • This dataset is an independent derivative of The Stack v3 created by BigCode.
  • Individual code records retain the respective open-source licenses of their source repositories as indexed by BigCode. Refer to the repo_ids column for source repository links.
  • Use of this dataset must adhere to ethical AI norms and acceptable use guidelines as defined by BigCode.

Opt-Out and Takedown Requests

This dataset fully respects the developer opt-out framework established by BigCode.

If you are a copyright holder or developer and wish to have your code or repository removed from this curated derivative:

  1. Open an issue in the Community tab of this repository with our repository URL and/or the relevant content_id.

Upon notification, the requested records will be purged from the source files in the subsequent release.

Downloads last month
19