Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
id
stringclasses
3 values
language
stringclasses
3 values
category
stringclasses
3 values
instruction
stringclasses
3 values
code
stringclasses
3 values
explanation
stringclasses
3 values
difficulty
stringclasses
1 value
preview-python-000001
python
basics
ุงูƒุชุจ ูƒูˆุฏ ุจุงูŠุซูˆู† ู„ุญุณุงุจ ู…ุถุฑูˆุจ ุนุฏุฏ.
def factorial(n): result = 1 for value in range(1, n + 1): result *= value return result print(factorial(5))
ูŠุญุณุจ ุงู„ุฏุงู„ุฉ ู…ุถุฑูˆุจ ุงู„ุนุฏุฏ ุจุงุณุชุฎุฏุงู… ุญู„ู‚ุฉ for.
ู…ุจุชุฏุฆ
preview-javascript-000001
javascript
functions
ุงูƒุชุจ ุฏุงู„ุฉ JavaScript ุชุฌู…ุน ุฑู‚ู…ูŠู†.
function add(a, b) { return a + b; } console.log(add(2, 3));
ุชุฌู…ุน ุงู„ุฏุงู„ุฉ ุงู„ุฑู‚ู…ูŠู† ูˆุชุนูŠุฏ ุงู„ู†ุชูŠุฌุฉ.
ู…ุจุชุฏุฆ
preview-sql-000001
sql
projects
ุงูƒุชุจ ุงุณุชุนู„ุงู… SQL ูŠุนุฑุถ ุฃุณู…ุงุก ุงู„ู…ุณุชุฎุฏู…ูŠู†.
SELECT name FROM users;
ูŠุนุฑุถ ุฃุณู…ุงุก ุงู„ู…ุณุชุฎุฏู…ูŠู† ู…ู† ุฌุฏูˆู„ users.
ู…ุจุชุฏุฆ

Dataset evaluation: See EVALUATION.md for schema checks, indexing status, and language-specific quality limits. Viewer note: default is a lightweight preview; select full to load the complete corpus.

Current Hub Validation Status

  • Repository claim: 3,000,000 records
  • Dataset Server indexed rows: 1,239,045
  • Dataset Server estimate: 1,995,159

The 3M target figure is a raw-repository claim and is not yet fully verified by the Hub index. Validate the JSONL files before publishing a definitive record count.

Arabic-to-Code Dataset - 8 Languages

Train an Arabic-speaking code model with a raw target of 3,000,000 Arabic instruction-to-code pairs across 8 programming languages and 40 JSONL files (11.55 GB). The current Hub index exposes 1,239,045 rows and estimates 1,995,159 rows; the raw target still requires a full JSONL audit.

1. Contents

2. Dataset Summary

Attribute Value
Dataset name arabic-to-code-8-langs-3m
Programming languages 8 (Python, JavaScript, Java, C++, HTML/CSS, SQL, PHP, Go)
Files 40 *.jsonl files (8 x 5)
Total records 3,000,000 raw target; 1,239,045 currently indexed; 1,995,159 estimated
Total size 11.55 GB (11,832.2 MB)
Format JSONL, UTF-8, one record per line
Content language Arabic instructions + Arabic code comments + complete runnable code
Suggested tasks Arabic-to-code generation, instruction tuning, code explanation in Arabic, multilingual code LLM
License CC-BY-4.0
Loading load_dataset with streaming=True (recommended)

3. Repository Map

arabic-to-code-8-langs-3m/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ CITATION.cff
โ”œโ”€โ”€ .gitattributes
โ”œโ”€โ”€ 01_Python/          # 375K records
โ”‚   โ”œโ”€โ”€ 01_basics.jsonl      # 75,000
โ”‚   โ”œโ”€โ”€ 02_functions.jsonl   # 75,000
โ”‚   โ”œโ”€โ”€ 03_oop.jsonl         # 75,000
โ”‚   โ”œโ”€โ”€ 04_algorithms.jsonl  # 75,000
โ”‚   โ””โ”€โ”€ 05_projects.jsonl    # 75,000
โ”œโ”€โ”€ 02_JavaScript/      # 375K - same 5 files
โ”œโ”€โ”€ 03_Java/            # 375K
โ”œโ”€โ”€ 04_Cpp/             # 375K
โ”œโ”€โ”€ 05_HTML_CSS/        # 375K
โ”œโ”€โ”€ 06_SQL/             # 375K
โ”œโ”€โ”€ 07_PHP/             # 375K
โ””โ”€โ”€ 08_Go/              # 375K
graph TD
    ROOT[arabic-to-code-8-langs-3m/<br/>3M target records - 11.55GB]
    ROOT --> PY[01_Python<br/>375K]
    ROOT --> JS[02_JavaScript<br/>375K]
    ROOT --> JV[03_Java<br/>375K]
    ROOT --> CP[04_Cpp<br/>375K]
    ROOT --> WEB[05_HTML_CSS<br/>375K]
    ROOT --> SQ[06_SQL<br/>375K]
    ROOT --> PH[07_PHP<br/>375K]
    ROOT --> GO[08_Go<br/>375K]
    PY --> F1[basics/functions/oop/algorithms/projects]
    F1 --> REC[JSON record<br/>instruction - code - explanation]
pie title Records by language (375K each)
    "Python" : 375000
    "JavaScript" : 375000
    "Java" : 375000
    "C++" : 375000
    "HTML/CSS" : 375000
    "SQL" : 375000
    "PHP" : 375000
    "Go" : 375000

4. Languages Table (8 folders)

# Folder Language Records Size What is inside
1 01_Python Python 375,000 ~1,536 MB Scripts, functions, OOP classes, algorithms, full apps - all runnable
2 02_JavaScript JavaScript 375,000 ~1,403 MB Node.js + browser code, functions, classes, DOM examples
3 03_Java Java 375,000 ~1,527 MB Full Main.java programs, collections, OOP
4 04_Cpp C++ 375,000 ~1,533 MB Full g++-ready programs with STL
5 05_HTML_CSS HTML/CSS 375,000 ~1,437 MB Complete responsive RTL Arabic pages with JS
6 06_SQL SQL 375,000 ~1,520 MB CREATE + INSERT + SELECT scripts (Postgres/MySQL)
7 07_PHP PHP 375,000 ~1,432 MB CLI-ready .php scripts
8 08_Go Go 375,000 ~1,444 MB go run-ready programs
Total 8 folders โ€” 3,000,000 11,832.2 MB (11.55 GB) โ€”

5. Categories Table (5 files per language)

Per language; multiply by 8 for the global total (each file = 75,000 per language = 600,000 globally).

# File Records/lang Global (x8) Content (10 task families each)
1 01_basics.jsonl 75,000 600,000 Sum, factorial, prime check, multiplication table, average, temperature, vowels, reverse string, circle area, leap year
2 02_functions.jsonl 75,000 600,000 Add, max, filter evens, frequency, merge, email validation, password strength, slugify, age calc, pagination
3 03_oop.jsonl 75,000 600,000 Student, bank account, car, employee, library, animal inheritance, cart, hospital, course, inventory
4 04_algorithms.jsonl 75,000 600,000 Bubble sort, binary search, Fibonacci, BFS, Dijkstra, Quicksort, Mergesort, knapsack, KMP, LCS
5 05_projects.jsonl 75,000 600,000 Task manager, calculator, login system, mini shop, clinic booking, library system, sales dashboard, Arabic chatbot, payroll, portfolio site

6. Record Schema

Field Type Example Description
id string python-basics-000001 Unique ID: language-category-number
language string python One of 8 languages
category string basics One of basics/functions/oop/algorithms/projects
instruction string (Arabic) ุงูƒุชุจ ูƒูˆุฏ ุจุงูŠุซูˆู† ูƒุงู…ู„... Arabic task description with N and variable
code string def solve_omar... Complete runnable code with Arabic comments
explanation string (Arabic) ู‡ุฐุง ุงู„ุญู„ ุจู„ุบุฉ ุจุงูŠุซูˆู†... Long Arabic explanation + complexity + tests
difficulty string ู…ุจุชุฏุฆ/ู…ุชูˆุณุท/ู…ุชู‚ุฏู… Beginner / intermediate / advanced (cycled)

Example (shortened):

{
  "id": "python-basics-000001",
  "language": "python",
  "category": "basics",
  "instruction": "ุงูƒุชุจ ูƒูˆุฏ ุจุงูŠุซูˆู† ูƒุงู…ู„ ูˆู‚ุงุจู„ ู„ู„ุชุดุบูŠู„ ูŠู‚ูˆู… ุจุงู„ู…ู‡ู…ุฉ ุงู„ุชุงู„ูŠุฉ: ุญุณุงุจ ู…ุถุฑูˆุจ ุนุฏุฏ...",
  "code": "# ู…ุซุงู„ 1 ...\ndef solve_omar(...):\n ... \nif __name__ == \"__main__\":\n    main()\n",
  "explanation": "ู‡ุฐุง ุงู„ุญู„ ุจู„ุบุฉ ุจุงูŠุซูˆู† ูŠุดุฑุญ ... ุงู„ุชุนู‚ูŠุฏ ุงู„ุฒู…ู†ูŠ ... ุญุงู„ุงุช ุงุฎุชุจุงุฑ ...",
  "difficulty": "ู…ุชูˆุณุท"
}

Python samples were executed during validation (returncode 0).

7. Loading and Training Usage

7.1 Stream the full dataset (recommended)

from datasets import load_dataset
ds = load_dataset("ISLAM-PO/arabic-to-code-8-langs-3m", "full", split="train", streaming=True)
print(next(iter(ds)))
py = ds.filter(lambda x: x["language"] == "python")

7.2 One language only

from datasets import load_dataset
ds_py = load_dataset("json", data_files={"train": "hf://datasets/ISLAM-PO/arabic-to-code-8-langs-3m/01_Python/*.jsonl"}, split="train", streaming=True)

7.3 Instruction-tuning format (for training your Arabic code model)

def to_prompt(row):
    return {
        "prompt": f"ุงู„ู…ุณุชุฎุฏู…: {row['instruction']}\nุงู„ู…ุณุงุนุฏ:\n",
        "completion": f"{row['code']}\n\n# ุงู„ุดุฑุญ:\n{row['explanation']}",
    }
# Use with TRL SFTTrainer or axolotl / unsloth chat template

7.4 Fine-tune sketch (Transformers + TRL)

# pip install transformers datasets trl peft
from datasets import load_dataset
from trl import SFTTrainer
ds = load_dataset("json", data_files={"train": "hf://datasets/ISLAM-PO/arabic-to-code-8-langs-3m/01_Python/01_basics.jsonl"}, split="train")
# map with to_prompt(), then SFTTrainer(..., dataset_text_field="prompt")

8. Generation and Reproduction

Generated by generate_code_dataset.py (task pools x per-language code builders x Arabic padding).

python generate_code_dataset.py --demo                              # 4,000 records, ~11 MB
python generate_code_dataset.py --full --per-language 375000 --total-gb 10
Parameter Default Meaning
--per-language 375000 Records per language (x8 = 3M target total)
--total-gb 10 Target size; per-record bytes auto-computed

9. Considerations and Limitations

Topic Details
Synthetic data Template-generated. Great for bootstrapping an Arabic code model, but mix with real repos (e.g. The Stack, CodeAlpaca-Arabic) before production.
Correctness Python samples smoke-tested. Other languages follow the same logic but run your own validator for Java/C++/Go/SQL before release.
Repetition Tasks cycle over 10 families per category with varied N/vars/UIDs. Deduplicate + add real-world seeds for final eval.
Security No secrets included. Generated table names contain numeric suffixes only. Never train on private keys.
Size 11.55 GB - use streaming or per-language loads.

10. Contributors

Role Name Contribution
Owner & concept ISLAM-PO Arabic-code training idea, 8 languages + 10 GB requirement
Generation & docs Muse Spark (AI Assistant) generate_code_dataset.py, templates, validation, docs
Code review (open) Open call Native devs: verify Java/C++/Go/SQL samples, add idiomatic patterns

11. License

CC-BY-4.0. Commercial use allowed with attribution. See LICENSE.

12. Citation

@dataset{arabic_to_code_2026,
  title   = {Arabic-to-Code Dataset: 8 Languages, 3M target Records},
  author  = {ISLAM-PO and Contributors},
  year    = {2026},
  publisher = {Hugging Face},
  version = {1.0.0},
  url     = {https://huggingface.co/datasets/ISLAM-PO/arabic-to-code-8-langs-3m},
  note    = {3,000,000 records, 40 JSONL files, 11.55 GB, CC-BY-4.0}
}

13. Push to Hugging Face Hub

pip install huggingface_hub datasets
huggingface-cli login
cd arabic-to-code-8-langs-3m
git init; git lfs install; git lfs track "*.jsonl"
huggingface-cli repo create arabic-to-code-8-langs-3m --type dataset --yes
git remote add origin https://huggingface.co/datasets/ISLAM-PO/arabic-to-code-8-langs-3m
git add README.md LICENSE CITATION.cff .gitattributes
git commit -m "docs: code dataset card"; git push origin main
git add 01_Python 02_JavaScript; git commit -m "data: batch 1"; git push origin main
# repeat for remaining languages

Last updated: 2026-09-03 | Version: 1.0.0 | Status: complete generation target; verify indexed count before publication / 11.55 GB

Downloads last month
382