All Projects → luogu-dev → Cyaron

luogu-dev / Cyaron

Licence: lgpl-3.0
CYaRon: Yet Another Random Olympic-iNformatics test data generator

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Cyaron

mnimi
🎲 Mnimi (A Game of Memory Skill)
Stars: ✭ 15 (-98.09%)
Mutual labels:  online
Vue Offline
Offline states and storage for Vue PWA
Stars: ✭ 308 (-60.71%)
Mutual labels:  online
Sentiment analysis fine grain
Multi-label Classification with BERT; Fine Grained Sentiment Analysis from AI challenger
Stars: ✭ 546 (-30.36%)
Mutual labels:  online
Realtime Action Detection
This repository host the code for real-time action detection paper
Stars: ✭ 271 (-65.43%)
Mutual labels:  online
Gdk For Unity
SpatialOS GDK for Unity
Stars: ✭ 296 (-62.24%)
Mutual labels:  online
Mudlet
⚔️ A cross-platform, open source, and super fast MUD client with scripting in Lua
Stars: ✭ 427 (-45.54%)
Mutual labels:  online
livego
直播服务器 hls stream online RTMP AMF HLS HTTP-FLV
Stars: ✭ 30 (-96.17%)
Mutual labels:  online
Jspaint
🎨 Classic MS Paint, REVIVED + ✨Extras
Stars: ✭ 5,972 (+661.73%)
Mutual labels:  online
V Offline
🔌 Simple VueJS component to detect offline & online changes.
Stars: ✭ 307 (-60.84%)
Mutual labels:  online
Subplayer
📝 SubPlayer is a online subtitle editor
Stars: ✭ 517 (-34.06%)
Mutual labels:  online
Tensorflow Style Transfer
A simple, concise tensorflow implementation of style transfer (neural style)
Stars: ✭ 278 (-64.54%)
Mutual labels:  online
Oreilly Kubernetes
O'Reilly Online Training for Kubernetes
Stars: ✭ 295 (-62.37%)
Mutual labels:  online
Jsonplaceholder
A simple online fake REST API server
Stars: ✭ 4,377 (+458.29%)
Mutual labels:  online
AllSQL
AllSQL is an open-source compact browser based SQL Compiler, built using Flutter.
Stars: ✭ 16 (-97.96%)
Mutual labels:  online
Civis
JavaScript 4X game
Stars: ✭ 560 (-28.57%)
Mutual labels:  online
lightsout
🎲 Lights Out Game
Stars: ✭ 23 (-97.07%)
Mutual labels:  online
Servuo
An Ultima Online server emulator written in C# .NET
Stars: ✭ 378 (-51.79%)
Mutual labels:  online
Openspades
Compatible client of Ace of Spades 0.75
Stars: ✭ 769 (-1.91%)
Mutual labels:  online
Code Dot Org
The code powering code.org and studio.code.org
Stars: ✭ 631 (-19.52%)
Mutual labels:  online
Microsoft Activation Scripts
A collection of scripts for activating Microsoft products using HWID / KMS38 / Online KMS activation methods with a focus on open-source code, less antivirus detection and user-friendliness.
Stars: ✭ 9,286 (+1084.44%)
Mutual labels:  online

Project CYaRon

CYaRon Yet Another Random Olympic-iNformatics test data generator

By Luogu 项目地址: https://github.com/luogu-dev/cyaron

你是否遇到以下情况:

  • 希望在5分钟内写出一组随机数据,并方便地使用它们对拍几个程序
  • 希望生成一个合适的随机图或者树,且有一定强度
  • 希望生成一组随机数列或者向量,且不能重复。

那么,你可以借助 CYaRon 和 Python ,来快速生成一组数据。目前支持的特性有:

  • 建一个随机图(简单图或者非简单图,有向图或无向图,带权图或者无权图)
  • 建一个随机树(链状、随机树、或者菊花图,而且可以设定树的强弱)
  • 生成一组允许相同或者互相不同的多维向量(可以较快速度生成10^6组、范围到10^9的向量或者数列)
  • 根据函数解析式生成数列
  • 生成一些随机多边形,并且可以求面积、周长等
  • 从字典生成随机字符串、单词、句子、段落
  • 使用以上功能生成的数据和您其他地方下载的测试数据方便地进行程序对拍

快速上手指南

稳定版本可以从pip获取: pip install cyaron,在此之前,需要准备好Python。

最新开发版可以克隆GitHub源代码: git clone https://github.com/luogu-dev/cyaron.git

请您查看CYaRon文档CYaRon基本入门来学习如何使用CYaRon。

若您发现文档中有缺漏,请提出Issue并暂时根据examples和源代码进行YY。

CYaRon基于Python。若您对Python不熟悉,可看快速入门教程

之后计划实现云Generator,即只需提供写好的脚本以及std,上传到服务器,即可下载一个测试数据的压缩包,真正实现5分钟生成一个测试数据!

希望各位大佬一起来协助改进这个项目。希望这个项目可以帮助大家节省时间!

使用范例

#!/usr/bin/env python

from cyaron import * # 引入CYaRon的库

_n = ati([0, 7, 50, 1E4]) # ati函数将数组中的每一个元素转换为整形,方便您可以使用1E4一类的数来表示数据大小
_m = ati([0, 11, 100, 1E4]) 

# 这是一个图论题的数据生成器,该题目在洛谷的题号为P1339
for i in range(1, 4): # 即在[1, 4)范围内循环,也就是从1到3
    test_data = IO(file_prefix="heat", data_id=i) # 生成 heat[1|2|3].in/out 三组测试数据

    n = _n[i] # 点数
    m = _m[i] # 边数
    s = randint(1, n) # 源点,随机选取一个
    t = randint(1, n) # 汇点,随机选取一个
    test_data.input_writeln(n, m, s, t) # 写入到输入文件里,自动以空格分割并换行

    graph = Graph.graph(n, m, weight_limit=5) # 生成一个n点,m边的随机图,边权限制为5
    test_data.input_writeln(graph) # 自动写入到输入文件里,默认以一行一组u v w的形式输出

    test_data.output_gen("D:\\std_binary.exe") # 标程编译后的可执行文件,不需要freopen等,CYaRon自动给该程序输入并获得输出作为.out

贡献

所有的贡献者请查看光荣榜页面,衷心感谢他们对CYaRon项目的付出。

欢迎您对 CYaRon 做出贡献。若您有希望加入的功能,可以给我们提出 Issue ,或者自己动手实现,然后发起 Pull Request。

有关于如何做出贡献的更详细内容,请查看如何做出贡献

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].