Skip to content

Commit c975986

Browse files
committed
Added snippets
1 parent bb39777 commit c975986

File tree

4 files changed

+326
-0
lines changed

4 files changed

+326
-0
lines changed

.vscode/java.code-snippets

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7+
// Placeholders with the same ids are connected.
8+
// Example:
9+
// "Print to console": {
10+
// "scope": "javascript,typescript",
11+
// "prefix": "log",
12+
// "body": [
13+
// "console.log('$1');",
14+
// "$2"
15+
// ],
16+
// "description": "Log output to console"
17+
// }
18+
"Solution class": {
19+
"scope": "java",
20+
"prefix": "cse: Solution class",
21+
"body": [
22+
"public class ${1:${TM_FILENAME_BASE}} {",
23+
"\tpublic static void main(String[] args) {",
24+
"\t\t",
25+
"\t}",
26+
"}"
27+
]
28+
},
29+
"JUnit5 SolutionTest class": {
30+
"scope": "java",
31+
"prefix": "cse: JUnit5 SolutionTest class",
32+
"body": [
33+
"import static org.junit.jupiter.api.Assertions.*;",
34+
"",
35+
"import java.time.Duration;",
36+
"import org.junit.jupiter.api.Test;",
37+
"import org.junit.jupiter.api.AfterEach;",
38+
"import org.junit.jupiter.api.BeforeEach;",
39+
"",
40+
"public class ${1:${TM_FILENAME_BASE}} {",
41+
"\t",
42+
"\tSolution solution;",
43+
"\t",
44+
"\t@BeforeEach",
45+
"\tpublic void setUp() throws Exception {",
46+
"\t\tsolution = new Solution();",
47+
"\t}",
48+
"\t",
49+
"\t@AfterEach",
50+
"\tpublic void tearDown() throws Exception {",
51+
"\t\tsolution = null;",
52+
"\t}",
53+
"\t",
54+
"\t@Test",
55+
"\tpublic void MainFunction() {",
56+
"\t\tassertTimeout(Duration.ofMillis(700), () -> {",
57+
"\t\t\t String[] args = new String[0];",
58+
"\t\t\t assertAll(() -> Solution.main(args));",
59+
"\t\t});",
60+
"\t}",
61+
"\t",
62+
"\t@Test",
63+
"\tpublic void TrivialCase1() {",
64+
"\t\t// input = ;",
65+
"\t\tassertTimeout(Duration.ofMillis(700), () -> {",
66+
"\t\t\t// expected = ;",
67+
"\t\t\t// actual = Solution.;",
68+
"\t\t\t// assertEquals(expected, actual);",
69+
"\t\t});",
70+
"\t}",
71+
"}"
72+
]
73+
}
74+
}

.vscode/json.code-snippets

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7+
// Placeholders with the same ids are connected.
8+
// Example:
9+
// "Print to console": {
10+
// "scope": "javascript,typescript",
11+
// "prefix": "log",
12+
// "body": [
13+
// "console.log('$1');",
14+
// "$2"
15+
// ],
16+
// "description": "Log output to console"
17+
// }
18+
19+
"Problem Metadata": {
20+
"scope": "json",
21+
"prefix": "cse: problem-metadata",
22+
"body": [
23+
"{",
24+
"\t\"type\": \"Coding\\Systems Design\\Puzzle\\Behavioral\\Reading\\Course\",",
25+
"\t\"name\": \"\",",
26+
"\t\"skip_for_problems_list\": \"True\",",
27+
"\t\"origin\": {",
28+
"\t\t\"name\": \"Notes - Blog Post\\Notes - Book\\Notes - Article\\Notes - Book Chapter\",",
29+
"\t\t\"link\": \"\"",
30+
"\t},",
31+
"\t\"companies\": [",
32+
"\t\t\"\",",
33+
"\t\t\"\"",
34+
"\t],",
35+
"\t\"categories\": [",
36+
"\t\t{",
37+
"\t\t\t\"name\": \"\",",
38+
"\t\t\t\"children\": [",
39+
"\t\t\t\t{",
40+
"\t\t\t\t\t\"name\": \"\",",
41+
"\t\t\t\t\t\"children\": []",
42+
"\t\t\t\t}",
43+
"\t\t\t]",
44+
"\t\t},",
45+
"\t\t{",
46+
"\t\t\t\"name\": \"Difficulty\",",
47+
"\t\t\t\"children\": [",
48+
"\t\t\t\t{",
49+
"\t\t\t\t\t\"name\": \"Easy\\Medium\\Hard\",",
50+
"\t\t\t\t\t\"children\": []",
51+
"\t\t\t\t}",
52+
"\t\t\t]",
53+
"\t\t}",
54+
"\t],",
55+
"\t\"tags\": [",
56+
"\t\t\"\",",
57+
"\t\t\"\"",
58+
"\t],",
59+
"\t\"buckets\": [",
60+
"\t\t\"\",",
61+
"\t\t\"\"",
62+
"\t]",
63+
"}"
64+
],
65+
"description": "metadata schema"
66+
}
67+
}

.vscode/markdown.code-snippets

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7+
// Placeholders with the same ids are connected.
8+
// Example:
9+
// "Print to console": {
10+
// "scope": "javascript,typescript",
11+
// "prefix": "log",
12+
// "body": [
13+
// "console.log('$1');",
14+
// "$2"
15+
// ],
16+
// "description": "Log output to console"
17+
// }
18+
19+
"Problem Definition": {
20+
"scope": "markdown",
21+
"prefix": "cse: problem-definition",
22+
"body": [
23+
"# Problem Definition",
24+
"",
25+
"## Description",
26+
"",
27+
"## Discussion",
28+
"",
29+
"### Approach",
30+
"",
31+
"#### Time Complexity",
32+
"",
33+
"#### Space Complexity",
34+
"",
35+
"### Alternate Approach 1",
36+
"",
37+
"#### Time Complexity - Alternate Approach 1",
38+
"",
39+
"#### Space Complexity - Alternate Approach 1",
40+
"",
41+
"## Notes",
42+
"",
43+
"## References",
44+
""
45+
]
46+
},
47+
"YouTube Video - ": {
48+
"scope": "markdown",
49+
"prefix": "cse: YouTube Video",
50+
"body": [
51+
"[YT Video - - ]()"
52+
]
53+
},
54+
"YouTube Video - Tushar Roy": {
55+
"scope": "markdown",
56+
"prefix": "cse: YouTube Video - Tushar Roy",
57+
"body": [
58+
"[YT Video - Tushar Roy - ]()"
59+
]
60+
},
61+
"YouTube Video - Vivekanand Khyade": {
62+
"scope": "markdown",
63+
"prefix": "cse: YouTube Video - Vivekanand Khyade",
64+
"body": [
65+
"[YT Video - Vivekanand Khyade - ]()"
66+
]
67+
},
68+
"Geeks for Geeks post": {
69+
"scope": "markdown",
70+
"prefix": "cse: Geeks for Geeks post",
71+
"body": [
72+
"[Geeks for Geeks - ]()"
73+
]
74+
},
75+
"ProgramCreek post": {
76+
"scope": "markdown",
77+
"prefix": "cse: ProgramCreek post",
78+
"body": [
79+
"[ProgramCreek - ]()"
80+
]
81+
},
82+
"LeetCode discussion": {
83+
"scope": "markdown",
84+
"prefix": "cse: LeetCode discussion",
85+
"body": [
86+
"[LeetCode discussion - ]()"
87+
]
88+
},
89+
"LeetCode article": {
90+
"scope": "markdown",
91+
"prefix": "cse: LeetCode article",
92+
"body": [
93+
"[LeetCode article]()"
94+
]
95+
},
96+
"LeetCode solution": {
97+
"scope": "markdown",
98+
"prefix": "cse: LeetCode solution",
99+
"body": [
100+
"[LeetCode solution]()"
101+
]
102+
},
103+
"LeetCode top submission": {
104+
"scope": "markdown",
105+
"prefix": "cse: LeetCode sample submission",
106+
"body": [
107+
"LeetCode sample submission - X ms"
108+
]
109+
},
110+
"GitHub": {
111+
"scope": "markdown",
112+
"prefix": "cse: GitHub",
113+
"body": [
114+
"[GitHub - ]()"
115+
]
116+
},
117+
"StackOverflow": {
118+
"scope": "markdown",
119+
"prefix": "cse: StackOverflow",
120+
"body": [
121+
"[StackOverflow - ]()"
122+
]
123+
},
124+
"PlantUml": {
125+
"scope": "markdown",
126+
"prefix": "cse: plantuml",
127+
"body": [
128+
"```plantuml",
129+
"@startuml",
130+
"@enduml",
131+
"```"
132+
]
133+
}
134+
}

.vscode/python.code-snippets

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
3+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
4+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
5+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
6+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
7+
// Placeholders with the same ids are connected.
8+
// Example:
9+
// "Print to console": {
10+
// "scope": "javascript,typescript",
11+
// "prefix": "log",
12+
// "body": [
13+
// "console.log('$1');",
14+
// "$2"
15+
// ],
16+
// "description": "Log output to console"
17+
// }
18+
"Solution": {
19+
"scope": "python",
20+
"prefix": "cse: solution",
21+
"body": [
22+
"class Solution:",
23+
"\tdef method(self):",
24+
"\t\t",
25+
"def main():",
26+
"\tsolution = Solution()",
27+
"",
28+
"if __name__ == '__main__':",
29+
"\tmain()"
30+
]
31+
},
32+
"TestSolution": {
33+
"scope": "python",
34+
"prefix": "cse: test_solution",
35+
"body": [
36+
"import solution",
37+
"import unittest",
38+
"",
39+
"class TrivialCase(unittest.TestCase):",
40+
"\t\tdef test_trivial_case_1(self):",
41+
"\t\t\t\t\"\"\"\"trivial case 1\"\"\"",
42+
"\t\t\t\texpected = ",
43+
"\t\t\t\tsol = solution.Solution()",
44+
"\t\t\t\tactual = sol.",
45+
"\t\t\t\tself.assertEqual(expected, actual)",
46+
"",
47+
"if __name__ == \"__main__\":",
48+
"\t\tunittest.main()"
49+
]
50+
}
51+
}

0 commit comments

Comments
 (0)