Skip to content

Commit 698eb9b

Browse files
committed
feat: update templates
1 parent 9599308 commit 698eb9b

File tree

5 files changed

+10
-36
lines changed

5 files changed

+10
-36
lines changed

.vscode/template.code-snippets

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"using namespace std;",
88
"",
99
"#ifdef STARCEA",
10-
"#include \"debug.hpp\"",
10+
"#include \"../debug.hpp\"",
1111
"#else",
1212
"#define debug(...)",
1313
"#endif",
@@ -34,25 +34,14 @@
3434
""
3535
]
3636
},
37-
"ps-py": {
37+
"py-py": {
3838
"scope": "python",
39-
"prefix": "ps",
39+
"prefix": "py",
4040
"body": [
41-
"from sys import stdin, stdout",
42-
"",
41+
"stdin = open(0)",
4342
"input = lambda: stdin.readline().rstrip()",
44-
"_out: list[str] = []",
45-
"print = lambda *v, sep=\" \", end=\"\\n\": _out.append(sep.join(map(str, v)) + end)",
46-
"",
47-
"",
48-
"def main() -> None:",
49-
" $0",
50-
"",
51-
"",
52-
"if __name__ == \"__main__\":",
53-
" main()",
5443
"",
55-
" stdout.write(\"\".join(_out))",
44+
"$0",
5645
""
5746
]
5847
},

templates/cp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using namespace std;
99

1010
using i64 = int64_t;
1111

12-
constexpr int _PREC = 0;
12+
constexpr int _PREC = 0;
1313

1414
// #define int i64
1515

templates/ps.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

templates/py.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
stdin = open(0)
2+
input = lambda: stdin.readline().rstrip()
3+
4+
# code here

update.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ def language(ext: str) -> str:
3737
def main() -> int | None:
3838
json: dict[str, SnippetSchema] = {}
3939

40-
if path.exists(SNIPPET_FILE):
41-
with open(SNIPPET_FILE, "r") as f:
42-
json = loads(f.read())
43-
4440
for file in listdir(DIR):
4541
full_path = path.join(DIR, file)
4642

0 commit comments

Comments
 (0)