CoolFace
Datasetpublic

Ujjwal-Tyagi/moshub

Mos.Hub Code Dataset A comprehensive code dataset compiled from Mos.Hub, Moscow's official code hosting platform operated by the Moscow Government. This dataset is designed to support training code models with authentic Russian development practices and documentation. Overview The Mos.Hub Code Dataset represents a significant code corpus from Russia's governmental and municipal code hosting platform, capturing diverse projects across 297 programming languages. It… See the full description on the dataset page: https://huggingface.co/datasets/Ujjwal-Tyagi/moshub.

sourceHugging Faceotherupdated 5mo agoView on Hugging Face
0likes30downloads
Dataset Card

Mos.Hub Code Dataset

A comprehensive code dataset compiled from Mos.Hub, Moscow's official code hosting platform operated by the Moscow Government. This dataset is designed to support training code models with authentic Russian development practices and documentation.


Overview

The Mos.Hub Code Dataset represents a significant code corpus from Russia's governmental and municipal code hosting platform, capturing diverse projects across 297 programming languages. It serves as a valuable resource for developing multilingual code understanding models reflecting Russian coding practices and standards.

Key Statistics

MetricValue
Total Files15,740,580
Total Repositories16,130
Compressed Size529 MB (Parquet)
Uncompressed Size~29 GB
Programming Languages297
File FormatSingle Parquet file

Dataset Characteristics

Scope and Coverage

This dataset captures code from over 16,000 repositories hosted on Mos.Hub, including:

  • Russian government and public sector code: Repositories from Moscow Government and related organizations, featuring Russian comments and documentation
  • Diverse language ecosystem: Support for 297 distinct programming languages
  • Wide project range: From municipal services to development projects and tools
  • Quality-assured: Binary files and low-quality content have been systematically removed

Programming Languages

The dataset encompasses 297 languages. The 30 most represented languages by file count are:

RankLanguageFile Count
1Ruby8,333,731
2JavaScript1,786,730
3YAML1,757,614
4Vue699,171
5Markdown639,585
6Haml538,837
7GraphQL269,485
8JSON214,354
9PHP191,150
10SVG172,884
11Shell172,451
12Go88,089
13Ignore List87,432
14SCSS80,716
15Python77,532
16C++63,177
17HTML+ERB62,605
18Text48,400
19Jest Snapshot43,638
20HTML42,489
21C38,354
22reStructuredText26,342
23Rust24,818
24E-mail23,993
25XML22,715
26Java14,807
27Gettext Catalog14,429
28C#13,405
29CSS12,657
30Protocol Buffer Text Format12,181

Dataset Structure

Data Fields

Each record contains three fields providing content and metadata:

FieldTypeDescription
file_textstringComplete file content in UTF-8 encoding
languagestringProgramming language identified using github-linguist
file_namestringName of the source file

Sample Record

json
{
    "file_text": "package main\n\nimport \"fmt\"\n\nfunc main() {\n    fmt.Println(\"Hello\")\n}\n",
    "language": "Go",
    "file_name": "main.go"
}

File Format

  • Format: Apache Parquet
  • Structure: Single consolidated file (data.parquet)
  • Encoding: UTF-8
  • Split: All examples are included in a single training split (no validation or test splits)

Data Creation Process

Language Detection Methodology

Programming languages are identified using github-linguist, GitHub's robust library for language detection. This ensures consistent and reliable classification across all files in the dataset.

Source Data

All data originates from public repositories hosted on Mos.Hub, Moscow's official code hosting platform managed by the Moscow Government.

Quality Filtering

The dataset has undergone systematic filtering to ensure quality and usability:

Deduplication
  • Files have been deduplicated to ensure each code file appears only once in the dataset
Binary File Removal
  • Binary files have been systematically excluded from the dataset
  • Only text-based source code files are retained
Text Encoding Validation
  • Files must be valid UTF-8 encoded text to be included
  • Non-text and improperly encoded files are excluded

Usage Considerations

Data Privacy and Security

The dataset may contain sensitive information that requires careful handling:

  • Email Addresses: Present in code comments, documentation, or configuration files
  • Credentials: Accidentally committed API keys or authentication tokens
  • Personal Information: Names, phone numbers, and other identifiable data in comments or documentation

Users should implement appropriate filtering and anonymization when preparing data for model training.

Licensing and Attribution

This dataset has been compiled with careful consideration of the licenses used in source repositories. Any use of code or data derived from this dataset should be done responsibly and ethically.

Users are responsible for:

  • Respecting the intellectual property rights of original authors
  • Using the data responsibly and ethically
  • Understanding any applicable license restrictions
  • Providing appropriate attribution when required

Responsible Use

The dataset should be used with awareness of:

  • The public sector origin of many repositories
  • The importance of code security and data protection
  • Compliance with Russian data protection regulations
  • Ethical considerations in code model training and deployment

Technical Details

Source: Public repositories hosted on Mos.Hub

Annotations: Machine-generated (language detection)

Multilingual Support: Includes multilingual code and documentation with emphasis on Russian content

Task Categories: Text generation, code modeling, language understanding

Tags: Code, Russian language, multilingual, public sector development