Created
July 31, 2023 15:32
-
-
Save jm96441n/1fb25e81ee6dd6ce28d0b630a52a0a11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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