Skip to main content

CCNUACM DataMocker

Description

This project is a data mocker for CCNUACM. It is written in Python. Source code is available on our Github repo:CCNUACM_DataMocker.

Installation

To install the necessary dependencies, run the following command:

pip3 install ccnuacm-datamocker -U

Usage

Following is a basic example of how to use the data mocker. More examples are avaliable here.

import ccnuacm_datamocker as dm
from ccnuacm_datamocker.data_model import *
import os

dm.set_seed(0)
dm.set_work_dir(".")
dm.set_compiler("D:/mingw/bin/g++.exe")

os.makedirs("./std", exist_ok=True)

open("./std/APlusB.cpp", "w").write(
    """
#include <iostream>

int32_t main() {
  int64_t T;
  std::cin >> T;
  while (T--) {
    int64_t a, b;
    std::cin >> a >> b;
    std::cout << a + b << '\\n';
  }
  return 0;
}
"""
)

ds = DataSet(name="APlusB", std_path="./std/APlusB.cpp")

ds.add(
    RandomInt(low=1, high=100)
    .repeat(times=2, sep=" ")
    .repeat(times=10, sep="\n", show_times=True, h_sep="\n"),
    reputation=2,
)

ds.show()

ds.run()

Contributing

Contributions are welcome. Please submit a pull request or create an issue to discuss the changes you want to make.

License

This project is licensed under the MIT License.

Contact

If you have any questions, please feel free to post an issue.

Release files for ccnuacm-datamocker 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ccnuacm-datamocker 0.0.6
File Size Uploaded
ccnuacm_datamocker-0.0.6.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ccnuacm-datamocker 0.0.6
File Interpreter ABI Platform
ccnuacm_datamocker-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / ccnuacm_datamocker-0.0.6.tar.gz

Download URL ccnuacm_datamocker-0.0.6.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
534bc46ec456b46aec4a32f979b4ca1245ba9d7f7bb6c1d8d54798c88b5208fc
BLAKE2b-256 checksum
How to use checksums
a2274fe6958a7986038f96e88dc9b1098e5aed2cd3ec5d4a375dfc6efcc572b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / ccnuacm_datamocker-0.0.6-py3-none-any.whl

Download URL ccnuacm_datamocker-0.0.6-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8929feeb8301cc0ef621ebadefc5ab7e8b57f52b058a6e90fba8714243073395
BLAKE2b-256 checksum
How to use checksums
bbd491f469be8eacf706f11349ea959e4519ffc1561e57e72a1e3eb504ed4d02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page