Skip to content

Instantly share code, notes, and snippets.

@jm96441n
Created July 31, 2023 15:32
Show Gist options
  • Save jm96441n/1fb25e81ee6dd6ce28d0b630a52a0a11 to your computer and use it in GitHub Desktop.
Save jm96441n/1fb25e81ee6dd6ce28d0b630a52a0a11 to your computer and use it in GitHub Desktop.
#! /usr/bin/zsh
dir=$1
sess=grind3
mkdir ./$sess/$dir
cd ./$sess/$dir
touch __init__.py
touch main.py
echo 'from dataclasses import dataclass
from typing import Any, List, Optional # noqa
import ipdb # type: ignore # noqa
class Solution:
pass
@dataclass
class TestCase:
input: list[int]
expected_output: list[int]
def main():
testCases = [
TestCase(input=[], expected_output=[]),
]
s = Solution()
for tc in testCases:
actual = s.
assert actual == tc.expected_output, f"\\nExpected\\n\\t{tc.expected_output}\\nGot\\n\\t{actual}\\nFrom\\n\\t{tc.input}"
print("All passed!")
"""
Constraints:
Ideas:
Test Cases:
"""
' >main.py
echo "from $sess.$dir.main import main
main()" >../__main__.py
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment