text stringlengths 301 97.6k |
|---|
# -*- coding: utf-8 -*-
"""
AvailableTaskPCMatch Resource for assigning subtasks to available machines
based on status, labels, and preconditions in a QA automation system.
This module implements a Flask-RESTful resource that finds the next available
(subtask, machine) pair for execution, ensuring data consistency wit... |
"""
Module: word_classifier_repository.py
This module defines the `WordClassifierRepository` class, which is responsible for classifying a given word
based on its part of speech and associated linguistic properties (e.g., tense, number, gender) using a dictionary
data source. It leverages a repository pattern and inte... |
"""
Substitution Cipher Decoder
This script reads an encrypted text file and decodes it using a predefined substitution cipher.
The cipher swaps specific letters according to a fixed mapping (e.g., 's' β 'z', 'a' β 'e', 'r' β 'b').
The script demonstrates file handling, string manipulation, and character-level process... |
from typing import Tuple
def get_three_integers(prompt: str = "Enter an integer") -> Tuple[int, int, int]:
"""
Prompts the user three times to input integers.
Args:
prompt (str): Base prompt message for input.
Returns:
Tuple[int, int, int]: Three integers entered by the user.
Ra... |
"""
Module: is_square.py
A robust implementation of a function to determine whether a given number
is a perfect square of a natural number (non-negative integer), demonstrating
defensive programming techniques.
This function handles:
- Negative numbers (returns False)
- Floating-point numbers (accepts but warns)
- No... |
"""
Regex Number Summation Tool
This script reads text files, extracts all numbers using regular expressions,
and computes their sum. It demonstrates file handling, regex pattern matching,
and robust data processing in Python.
The primary use case is solving problems where numbers are embedded in text,
such as log fi... |
"""
Reddit Top Video Creator
This script automates the creation of a YouTube-style video from the top weekly posts
on a specified Reddit subreddit (e.g., r/mildlyinteresting). It:
1. Fetches top posts with images
2. Downloads and resizes images to 1920x1080
3. Generates text-to-speech (TTS) narration for titles
4. Com... |
"""
Last Word Problem (Google Code Jam 2016 Qualification Round)
Given a string S, construct the "last word" by starting with the first letter,
then for each subsequent letter, placing it at the beginning or end of the current word
to maximize the lexicographical value.
Example:
Input: "CAB"
Step 1: word = "C... |
from math import ceil
from typing import List, Tuple
def is_balanced(num: int) -> bool:
"""
Check if a number is 'balanced'. A number is balanced if the sum of the digits in the first half
is equal to the sum of the digits in the second half. For odd-length numbers, the middle digit
is included in bot... |
"""
Graph Autoencoder for Heterogeneous Graph Representation Learning
This script implements a two-stage training pipeline for a graph autoencoder
that learns node embeddings from both execution and file dependency graphs.
The model uses an attention-based encoder and a deep neural network decoder
to reconstruct node ... |
"""
FizzBuzz λ¬Έμ ν΄κ²° νλ‘κ·Έλ¨
μ΄ νλ‘κ·Έλ¨μ 1λΆν° μ£Όμ΄μ§ μκΉμ§μ μ μλ₯Ό μΆλ ₯νλ, λ€μ κ·μΉμ λ°λΌ κ°μ λ³νν©λλ€:
- 3μ λ°°μ: "Fizz"
- 5μ λ°°μ: "Buzz"
- 3κ³Ό 5μ 곡배μ (μ¦, 15μ λ°°μ): "FizzBuzz"
- κ·Έ μΈ: μ«μ μ체
μ΄ κ΅¬νμ κ°λ
μ±, μ μ§λ³΄μμ±, νμ₯μ±μ κ³ λ €νμ¬ μμ±λμμ΅λλ€.
"""
from typing import Generator, Union
def fizzbuzz_value(n: int) -> str:
"""
μ£Όμ΄μ§ μ μμ λν FizzBuzz κ°μ κ³μ°νμ¬ λ¬Έμμ΄λ‘ λ°ν... |
#!/usr/bin/python3
"""
Ultimate Tic-Tac-Toe AI Agent using Alpha-Beta Pruning with Heuristic Evaluation
This agent plays Ultimate Tic-Tac-Toe (a 3x3 grid of 3x3 boards) against an opponent.
It uses an Alpha-Beta search algorithm with a custom heuristic to evaluate board states
and determine the best move within a time... |
"""
gPhoton Sky Mapping Script
This script demonstrates how to use the `gMap` function from the `gPhoton` package
to generate a sky map (image) from GALEX photon data. It creates both a time-resolved
count map and a co-added (total) count map for a specified region of the sky.
The script is structured to be reusable,... |
"""
Plagiarism Checker Tool (plag-check)
This script performs a basic plagiarism detection by:
1. Reading text line-by-line from an input file.
2. For each non-empty line, it searches for the top 3 relevant web URLs using a search query.
3. Fetches content from those URLs and compares them to the original line using f... |
"""
User Management Views for Django Application
This module defines class-based views and helper functions for handling user-related
functionality such as viewing, updating, and redirecting users based on their group membership.
It leverages Django's authentication system and class-based views for clean, reusable cod... |
"""
MS Stream Video Downloader CLI
This script provides a command-line interface to download videos from Microsoft Stream
using user credentials and a video URL. It leverages a custom `Downloader` class and
automatically cleans up temporary cookie files before initiating the download.
The script expects two required ... |
"""
diag_spec_generator.py
This script generates `.opb` (pseudo-Boolean optimization) and `.key` (variable mapping) files
for a digital circuit verification problem involving multiplication and comparison of two `n`-bit numbers.
The problem models:
- Two input bit vectors `x` and `y` of length `numBits`
- Their produ... |
"""
Traffic Analysis Tool for Detecting Reverse Meterpreter Sessions
=================================================================
This script analyzes live network traffic using `scapy` and `netfilterqueue` to detect potential
reverse Meterpreter sessions (both `reverse_https` and `reverse_tcp`) based on behavior... |
from typing import Optional, Any
class Node:
"""
A class representing a node in a singly linked list.
Each node contains data and a reference to the next node in the list.
"""
def __init__(self, data: Any):
"""
Initialize a node with the given data.
Args:
dat... |
"""
Program to count the number of zeros in a tuple.
This script demonstrates multiple approaches to count the occurrences of the value 0
in a given tuple. It includes error handling, type annotations, and is written in a
clean, Pythonic style for educational purposes.
"""
from typing import Tuple, Union
def count_... |
"""
Holonomic Constraint Dynamics Test: Simulating and Comparing Torque and State Derivatives
This script evaluates the dynamics of a robotic system under holonomic constraints (e.g., ground contact)
by comparing the predicted state derivative (from a dynamic model) with the actual observed change in state
during simu... |
"""
Dijkstra's Algorithm for Shortest Path in an Undirected Weighted Graph
This script solves a problem where we are given an undirected, weighted tree (a special case of a graph),
and we need to answer multiple queries about the sum of shortest distances from a fixed source node
to two given nodes. The solution uses ... |
"""
Gradient Descent Optimization Example
This script demonstrates the use of gradient descent to minimize a simple quadratic function.
It includes visualization of the optimization path and detailed logging.
Function: f(x) = x^2 - 4x + 6
Derivative: f'(x) = 2x - 4
Minimum occurs at x = 2, f(2) = 2
"""
import numpy ... |
"""
Module: stats.py
Description: A comprehensive statistics module to compute median, mode, and mean of a list of numbers.
Author: Assistant
Date: 2024
This module demonstrates proper Python practices including:
- Type hints
- Docstrings
- Error handling
- Immutability (avoiding in-place sorting)
- Code modularity an... |
"""
Sports App Views Module
This module contains the Django views for handling user authentication and navigation
in a sports management application. It includes login, logout, and home page logic,
with role-based redirection (athletes, coaches) after login.
The views use Django's authentication system and custom dec... |
"""
Logistic Regression with L1 and L2 Regularization
=================================================
This script implements logistic regression using gradient descent,
with optional L1 (Lasso) and L2 (Ridge) regularization for binary classification.
It evaluates performance using accuracy, precision, recall, and F1-... |
End of preview. Expand in Data Studio
Zenyx Swallow Code v2 (Python)
847,259 Rewritten Python Documents, About 1.77 Billion Tokens
Pre-Training Text β’ Qwen3-235B Rewrites of The Stack v2 β’ Apache-2.0
π§ The Zenyx Dataset Family: Which Dataset Should You Use?
Every Zenyx dataset lives under Arko007 and follows one convention: a messages column holding a JSON string of chat turns (roles system, user, assistant, tool), optional tools, and a src tag naming the family. The tables below route you to the right repo.
π§± General SFT and training collections
| Dataset | Format | Volume | What it is | Best suited for |
|---|---|---|---|---|
Arko007/zenyx-sft-v2 |
Clean Parquet (train + validation) | 191,002 conversations, ~29.1M tokens | 45 domains of multi-turn, agentic, coding and reasoning chat; audited and de-duplicated | Standard supervised fine-tuning |
Arko007/Zenyx-100M-SFT-synth |
JSONL + Parquet archive | 209k accepted + 114k rejected rows, ~41M tokens | Raw generation traces and the log of every rejected row | Studying synthetic-data pipelines and failure modes |
Arko007/Zenyx-100M-SFT-data |
Pre-tokenised NumPy .npz shards (+ Parquet view) |
149,571 sequences of 2,049 tokens (208.2M trained tokens) | 15-source mixture, already tokenised, with loss masks | Zero-overhead GPU training of Zenyx-100M |
Arko007/zenyx-curated |
Parquet, 38 families | 2,520,243 rows | Filtered, de-duplicated, script-checked public and Zenyx-made sources | Building your own SFT mix family by family |
Arko007/zenyx-v3-synthetic-sft-v4 |
JSONL shards | 101,523 samples | Distilled reasoning, code and math dialogues from five public sources | Reasoning-heavy SFT |
Arko007/zenyx-v2-SFT-dataset |
Parquet, one config per source | about 187M rows (14 source sets) | Raw Nemotron SFT / RL, Cascade and math collections used for Zenyx V2 | Large-scale research on source data |
π― Instruction following, behaviour and constraints
| Dataset | Format | Volume | What it is | Best suited for |
|---|---|---|---|---|
Arko007/zenyx-instruct-exact |
Parquet, 33 configs | ~250M templated rows | Rule-based exact-instruction data; every answer computed by code | Exact counts, formats, letters, multi-question, follow-ups, rules that persist |
Arko007/zenyx-exact-mix |
Parquet, 5 group configs | 1,183,373 rows, ~180M tokens | Trainer-ready, de-duplicated subset of zenyx-instruct-exact | Dropping the exact-instruction data straight into a training mix |
Arko007/zenyx-constraint-write |
Parquet + JSONL | 394,998 rows, ~98.1M tokens | Exact-rule writing: word lengths, letter counts, lipograms, acrostics | Controllable, rule-exact text generation |
Arko007/zenyx-haiku-opus |
Parquet, 4 configs + raw JSONL | weak_games 2,496 / rest 14,843 / opus 40 / train 16,836 rows | Hand-written and solver-made behaviour data from Claude Haiku and Opus, in one repo | Calibration, tool recovery, games, multi-turn behaviour |
Arko007/zenyx-false-belief |
Parquet | 7,194 rows (v2) | Correcting false beliefs and false premises kindly, with true facts | Honesty and theory-of-mind behaviour |
Arko007/zenyx-frontier-handwritten |
JSONL, several rounds | about 15,000 multi-turn rows | Hand-written and repaired multi-turn dialogues in 55 reasoning domains | High-density multi-turn and tool arbitration supervision |
π οΈ Agents, tools and conversation
| Dataset | Format | Volume | What it is | Best suited for |
|---|---|---|---|---|
Arko007/zenyx-agentic-loops |
JSONL (accepted + rejects) | simulated-tool rollouts, counts in status/ |
Tool-use loops with executed simulated tools and verified rollouts | Agent-loop behaviour: errors, empty results, asking, confirming, polling |
Arko007/zenyx-spark-r11 |
Parquet, 8 families | 462,033 rows | Round-11 families: celebrity facts, dates, comprehension, slang, greetings, needle retrieval, STEM, code translation | Short, factual and conversational behaviour |
Arko007/zenyx-spark-r11-calib |
JSONL | 836 accepted rows | Small calibration run of the round-11 generators | Diagnostics only |
Arko007/zenyx-r11-extra |
Parquet, 3 folders | 95,334 rows | Math with executed code, casual chat and roleplay, rebuilt from three public sources | Tool-augmented math and conversational variety |
π’ Reasoning, arithmetic and puzzles
| Dataset | Format | Volume | What it is | Best suited for |
|---|---|---|---|---|
Arko007/zenyx-arithmetic-100m |
Parquet, 21 shards | 100,000,000 rows | Exact integer arithmetic with verified step-by-step scratchpads | Teaching procedures instead of guessed results |
Arko007/zenyx-arc-synth |
Parquet (train + validation) | 597,098 + 2,000 tasks | Programmatically generated ARC-style grid puzzles, correct by construction | Spatial and inductive reasoning |
π― Quick navigation
- Standard fine-tuning on clean chat, agent and coding data β
zenyx-sft-v2 - A big, mixable pool, chosen family by family β
zenyx-curated - Exact counts, formats, letters, several questions in one prompt, one-word follow-ups, rules that must persist β
zenyx-instruct-exact(everything) orzenyx-exact-mix(trainer-ready subset) - Rule-exact writing (letter counts, lipograms, acrostics) β
zenyx-constraint-write - Calibration, tool recovery, games and multi-turn behaviour from Claude β
zenyx-haiku-opus - Agent loops with executed tools β
zenyx-agentic-loops - Arithmetic procedures at scale β
zenyx-arithmetic-100m; grid reasoning βzenyx-arc-synth - Pre-tokenised shards for the Zenyx-100M trainer β
Zenyx-100M-SFT-data
The models these datasets were built for: Arko007/Zenyx-100M-Base (Zenyx-Mini, about 151M parameters).
π Knowledge, STEM, code and specialised data (added 30 Nov 2026)
π Dataset Overview
Python documents from stage5-auto-format/python of tokyotech-llm/swallow-code-v2, the Apache-2.0 successor of Swallow-Code v1 (which carries the Llama 3.3 licence). The documents are Python files from The Stack v2 that Qwen3-235B rewrote into cleaner, documented code.
π At a Glance
| Metric | Value |
|---|---|
| Rows | 847,259 |
| Format | plain text, one text column per document (not chat) |
| Files | 29 Parquet files |
| Estimated tokens | about 1.77B |
| Source files used | 4 of about 150 (so about 1 epoch of this subset) |
| Size on the Hub | about 1.76 GB |
π Sources and Licences
| Source | Upstream licence | Used for |
|---|---|---|
tokyotech-llm/swallow-code-v2 |
Apache-2.0 | all documents (stage5-auto-format, Python) |
β οΈ Notes and Limits
- Plain pre-training text, no chat template.
- Rewritten code is not executed or tested here.
π Quick Start
import json
from datasets import load_dataset
ds = load_dataset("Arko007/zenyx-swallow-code-v2", split="train")
row = ds[0]
print(row["text"][:500])
License and citation
Apache-2.0, following the source dataset.
@dataset{zenyx_swallow_code_v2_2026,
author = {Arko and Zenyx AI Contributors},
title = {Zenyx Swallow Code v2 (Python)},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/Arko007/zenyx-swallow-code-v2}}
}
- Downloads last month
- 14