Skip to content

Instantly share code, notes, and snippets.

Prompt: Generate spec.json for Python Coding Exercises (Autoโ€‘Grader)

Use this prompt to produce a single JSON spec for autoโ€‘grading Python exercises. It standardizes runtime limits and includes a rich palette of AST/output checks. Copyโ€‘paste the entire block into your AI and only replace the placeholders in the EXERCISE section at the bottom.


Output Rules

  • Output only valid JSON โ€” no markdown, comments, or explanations.
  • Schema (strict):

import numpy as np

A = np.random.randint(1, 10, (2, 2)) B = np.random.randint(1, 10, (1, 2))

V1 = np.concatenate((A, B), axis=0) V2 = np.concatenate((A, B.T), axis=1) V3 = np.concatenate((A, B), axis=None)

print("A:\n", A, "\nB:\n", B, "\nV1:\n", V1, "\nV2:\n", V2, "\nV3:\n", V3)

@tmindiashvili1
tmindiashvili1 / gist:4b70db691fa080e84067810240793833
Created November 27, 2024 15:40
mindiashvili_tamazi_quiz_2.py
import numpy as np
A = np.random.randint(1, 10, (2, 2))
B = np.random.randint(1, 10, (1, 2))
V1 = np.concatenate((A, B), axis=0)
V2 = np.concatenate((A, B.T), axis=1)
V3 = np.concatenate((A, B), axis=None)
print("A:\n", A, "\nB:\n", B, "\nV1:\n", V1, "\nV2:\n", V2, "\nV3:\n", V3)
{
"success": {
"sms_sent_successfully": "แƒ™แƒแƒ“แƒ˜ แƒฌแƒแƒ แƒ›แƒแƒขแƒ”แƒ‘แƒ˜แƒ— แƒ’แƒแƒ˜แƒ’แƒ–แƒแƒ•แƒœแƒ",
"verified": "แƒ—แƒฅแƒ•แƒ”แƒœ แƒฌแƒแƒ แƒ›แƒแƒขแƒ”แƒ‘แƒ˜แƒ— แƒ’แƒแƒ˜แƒแƒ แƒ”แƒ— แƒ•แƒ”แƒ แƒ˜แƒคแƒ˜แƒ™แƒแƒชแƒ˜แƒ",
"profile_updated": "แƒžแƒ แƒแƒคแƒ˜แƒšแƒ˜ แƒฌแƒแƒ แƒ›แƒแƒขแƒ”แƒ‘แƒ˜แƒ— แƒ’แƒแƒœแƒแƒฎแƒšแƒ“แƒ",
"use_round_finished": "แƒ แƒแƒฃแƒœแƒ“แƒ˜ แƒ“แƒแƒกแƒ แƒฃแƒšแƒ“แƒ"
},
"error": {
"incorrect_phone": "แƒ’แƒ—แƒฎแƒแƒ•แƒ— แƒกแƒฌแƒแƒ แƒแƒ“ แƒจแƒ”แƒ˜แƒงแƒ•แƒแƒœแƒแƒ— แƒขแƒ”แƒšแƒ”แƒคแƒแƒœแƒ˜แƒก แƒœแƒแƒ›แƒ”แƒ แƒ˜",
"question_answer_expired": "แƒ™แƒ˜แƒ—แƒฎแƒ•แƒแƒก แƒ’แƒแƒฃแƒ•แƒ˜แƒ“แƒ แƒ“แƒ แƒ",
{
"hello": "แƒ’แƒแƒ›แƒแƒ แƒฏแƒแƒ‘แƒ!",
"login": "แƒแƒ•แƒขแƒแƒ แƒ˜แƒ–แƒแƒชแƒ˜แƒ",
"register": "แƒ แƒ”แƒ’แƒ˜แƒกแƒขแƒ แƒแƒชแƒ˜แƒ",
"confirm": "แƒ“แƒแƒ“แƒแƒกแƒขแƒฃแƒ แƒ”แƒ‘แƒ",
"resend": "แƒ—แƒแƒ•แƒ˜แƒ“แƒแƒœ แƒ’แƒแƒ’แƒ–แƒแƒ•แƒœแƒ",
"send_again": "แƒฎแƒ”แƒšแƒแƒฎแƒšแƒ แƒ’แƒแƒ’แƒ–แƒแƒ•แƒœแƒ",
"back": "แƒฃแƒ™แƒแƒœ",
"accept": "แƒ•แƒ”แƒ—แƒแƒœแƒฎแƒ›แƒ”แƒ‘แƒ˜",
"confidentiality_policy": "แƒ™แƒแƒœแƒคแƒ˜แƒ“แƒ”แƒœแƒชแƒ˜แƒแƒšแƒฃแƒ แƒแƒ‘แƒ˜แƒก แƒžแƒแƒšแƒ˜แƒขแƒ˜แƒ™แƒแƒก",
@tmindiashvili1
tmindiashvili1 / code.py
Last active October 16, 2024 15:03
code.py
# This is a sample Python script.
# Press โŒƒR to execute it or replace it with your code.
# Press Double โ‡ง to search everywhere for classes, files, tool windows, actions, and settings.
# def print_hi(name):
# # Use a breakpoint in the code line below to debug your script.
# print(f'Hi, {name}') # Press โŒ˜F8 to toggle the breakpoint.
#
https://docs.google.com/presentation/d/1wjF8hOwZpNWBf6BFixEgQYshoVeE1yhB/edit#slide=id.p8
<div class="card w-75 shadow-lg" style="max-width: 500px; margin: 50px auto;">
<div class="card-header text-center font-weight-bold">
<h5 class="card-title mb-0">ADS Scheduler</h5>
</div>
<div class="card-body">
<form action="/submit-datetime" method="POST">
<div class="row">
<div class="col-md-6">
<!-- Email Field -->
const express = require('express');
const puppeteer = require('puppeteer');
const bodyParser = require('body-parser');
const expressLayouts = require('express-ejs-layouts')
const path = require('path');
// Import electron-reload and watch for changes in the specified directory
// require('electron-reload')(path.join(__dirname), {
// // Optional configuration
// electron: path.join(__dirname, 'node_modules', '.bin', 'electron') // Path to electron binary
// });