@scurrlin/stencil 1.21.0 → 1.21.1

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 +21 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,26 +16,34 @@ 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 178 "Rank Scores":
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 179 "Largest Number":
20
20
 
21
21
  ## Example
22
22
 
23
23
  Solution
24
24
 
25
- ```sql
26
- SELECT score,
27
- DENSE_RANK() OVER(ORDER BY score DESC) AS 'rank'
28
- FROM Scores
29
- ORDER BY score DESC;
25
+ ```python
26
+ class Solution:
27
+ def largestNumber(self, nums: List[int]) -> str:
28
+ array = list(map(str, nums))
29
+ array.sort(key = lambda x: x * 10, reverse = True)
30
+ if array[0] == "0":
31
+ return "0"
32
+ largest = ''.join(array)
33
+ return largest
30
34
  ```
31
35
 
32
36
  Solution with Stencil
33
37
 
34
- ```sql
35
- S s,
36
- D_R() O(O B s D) A 'r'
37
- F S
38
- O B s D;
38
+ ```python
39
+ c S:
40
+ d l(s, n: L[i]) -> s:
41
+ a = l(m(s, n))
42
+ a.s(k = l x: x * 1, r = T)
43
+ i a[0] == "0":
44
+ r "0"
45
+ l = ''.j(a)
46
+ r l
39
47
  ```
40
48
 
41
49
  ## Local Installation
@@ -49,7 +57,7 @@ npm install @scurrlin/stencil
49
57
  Once installed, you can run it with the following command:
50
58
 
51
59
  ```bash
52
- npx stencil path/to/your/file.sql --start <start_line> --end <end_line>
60
+ npx stencil path/to/your/file.py --start <start_line> --end <end_line>
53
61
  ```
54
62
 
55
63
  ## Global Installation
@@ -63,5 +71,5 @@ npm install -g @scurrlin/stencil
63
71
  Once installed, you can run it with the following command:
64
72
 
65
73
  ```bash
66
- stencil path/to/your/file.sql --start <start_line> --end <end_line>
74
+ stencil path/to/your/file.py --start <start_line> --end <end_line>
67
75
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scurrlin/stencil",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
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": {