@scurrlin/stencil 1.22.8 → 1.22.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,28 +16,36 @@ Whether you are studying for technical interviews, or just starting your coding
16
16
 
17
17
  Most people when they attempt to memorize something study the full text and then attempt to regurgitate it on a blank page. Shocking, I know... but what if there was a step in between? What if memorization and pattern recognition weren't all or nothing games? This is where Stencil comes in.
18
18
 
19
- Stencil is a language-agnostic memorization tool that strips code files down to their first letters while preserving spacing, capitalization, and punctuation. The "stencil" of the file is designed to act as a bridge between having something partially memorized and fully memorized. Below is an example of Stencil in action using LeetCode problem 197 "Rising Temperature":
19
+ Stencil is a language-agnostic memorization tool that strips code files down to their first letters while preserving spacing, capitalization, and punctuation. The "stencil" of the file is designed to act as a bridge between having something partially memorized and fully memorized. Below is an example of Stencil in action using LeetCode problem 198 "House Robber":
20
20
 
21
21
  ## Example
22
22
 
23
23
  Solution
24
24
 
25
- ```sql
26
- SELECT w1.id
27
- FROM Weather w1
28
- JOIN Weather w2
29
- ON DATE_SUB(w1.recordDate, INTERVAL 1 DAY) = w2.recordDate
30
- WHERE w1.temperature > w2.temperature;
25
+ ```python
26
+ class Solution:
27
+ def rob(self, nums: List[int]) -> int:
28
+ rob1, rob2 = 0, 0
29
+
30
+ for n in nums:
31
+ temp = max(n + rob1, rob2)
32
+ rob1 = rob2
33
+ rob2 = temp
34
+ return rob2
31
35
  ```
32
36
 
33
37
  Solution with Stencil
34
38
 
35
- ```sql
36
- S w.i
37
- F W w
38
- J W w
39
- O D_S(w.r, I 1 D) = w.r
40
- W w.t > w.t;
39
+ ```python
40
+ c S:
41
+ d r(s, n: L[i]) -> i:
42
+ r, r = 0, 0
43
+
44
+ f n i n:
45
+ t = m(n + r, r)
46
+ r = r
47
+ r = t
48
+ r r
41
49
  ```
42
50
 
43
51
  ## Local Installation
@@ -51,7 +59,7 @@ npm install @scurrlin/stencil
51
59
  Once installed, you can run it with the following command:
52
60
 
53
61
  ```bash
54
- npx stencil path/to/your/file.sql --start <start_line> --end <end_line>
62
+ npx stencil path/to/your/file.py --start <start_line> --end <end_line>
55
63
  ```
56
64
 
57
65
  ## Global Installation
@@ -65,5 +73,5 @@ npm install -g @scurrlin/stencil
65
73
  Once installed, you can run it with the following command:
66
74
 
67
75
  ```bash
68
- stencil path/to/your/file.sql --start <start_line> --end <end_line>
76
+ stencil path/to/your/file.py --start <start_line> --end <end_line>
69
77
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scurrlin/stencil",
3
- "version": "1.22.8",
3
+ "version": "1.22.9",
4
4
  "description": "A memorization tool that strips code down to first letters and punctuation only.",
5
5
  "main": "src/index.js",
6
6
  "bin": {