text stringlengths 0 53.5k |
|---|
# -*- 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-... |
Final Pretrain
CrowdMind/Final-Pretrain is a text-only, configuration-based collection for pretraining. Each listed subset is independently loadable. The dedup-ctx-* configurations combine only the explicitly listed sources, taking the listed cap from each source; multilingual combines up to 10,000 records from each requested language of multilingual CC News.
Contents
| Source | Included configuration(s) | Sampling |
|---|---|---|
Lambent/elementary-1024-fineweb-edu-sample |
elementary-1024-fineweb-edu-sample |
All rows |
AkshithAI/fineweb-edu-dedup-ctx-2048 |
fineweb-edu-dedup-ctx-2048 |
All rows |
AkshithAI/fineweb-edu-dedup-ctx-4096 |
fineweb-edu-dedup-ctx-4096 |
All rows |
AkshithAI/fineweb-edu-dedup-ctx-8192 |
fineweb-edu-dedup-ctx-8192 |
All rows |
bcckfdn/synthetic-long-context-16k-v1 |
synthetic-long-context-16k-v1 |
All rows |
sade-adrien/redpajama_v2_32k |
redpajama-v2-32k |
All train rows |
CodedotAI/code_clippy_github |
code-clippy-github--all-mit |
All rows from all-mit |
IFM/Pretrain-Behaviors |
One configuration per each of the seven source subsets, named ifm-pretrain-behaviors--<source-subset> |
Up to 20,000 rows per source subset |
| NVIDIA Nemotron Pretraining Specialized v1, v1.1, and v1.2 | One configuration per each of the 6, 5, and 4 source subsets, named nemotron-<release>--<source-subset> |
Up to 20,000 rows per source subset |
intfloat/multilingual_cc_news |
multilingual |
Up to 10,000 rows each from German, Spanish, French, Italian, Japanese, and Chinese |
tokyotech-llm/swallow-code-v2, config swallowcode-v2 |
dedup-ctx-1024 |
Up to 10,000 rows |
AkshithAI/starcoderdata-typescript-ctx-2048 and AkshithAI/starcoderdata-python-ctx-2048 |
dedup-ctx-2048 |
Up to 5,000 rows from each source |
AkshithAI/starcoderdata-typescript-ctx-4096 and AkshithAI/starcoderdata-python-ctx-4096 |
dedup-ctx-4096 |
Up to 5,000 rows from each source |
AkshithAI/starcoderdata-typescript-ctx-8192 and AkshithAI/starcoderdata-python-ctx-8192 |
dedup-ctx-8192 |
Up to 5,000 rows from each source |
AkshithAI/fineweb-finepdfs-edu-ctx-6144 and AkshithAI/dclm-edu-ctx-4096 |
dedup-ctx-16384 |
Up to 5,000 rows from each source |
AkshithAI/starcoderdata-typescript-ctx-6144, AkshithAI/starcoderdata-python-ctx-6144, and AkshithAI/fineweb-edu-dedup-ctx-6144 |
dedup-ctx-32768 |
Up to 5,000 rows from each source |
semran1/fineweb-edu-book-4 |
dedup-ctx-65536 |
Up to 10,000 rows |
Schema and sampling
Every configuration has one text string column. The builder reads the upstream text-bearing field (text, content, or maintext) and rejects ambiguous schemas rather than silently choosing a field. The selected rows are the source stream's first rows; no randomization, filtering, relabeling, or new annotation is performed.
Provenance and licensing
This collection does not claim authorship of the underlying datasets. Licenses, attribution obligations, acceptable-use restrictions, and redistribution permissions differ by source and configuration. Users must review and comply with each linked upstream dataset card and license before using or redistributing the data.
- Downloads last month
- 313