@scurrlin/stencil 1.27.8 → 1.27.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 +21 -27
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,40 +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 262 "Trips and Users":
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 263 "Ugly Number":
20
20
 
21
21
  ## Example
22
22
 
23
23
  Solution
24
24
 
25
- ```sql
26
- SELECT request_at AS Day,
27
- ROUND(SUM(status != 'completed') / COUNT(*), 2)
28
- AS 'Cancellation Rate'
29
- FROM Trips
30
- WHERE request_at BETWEEN '2013-10-01' AND '2013-10-03'
31
- AND client_id IN (
32
- SELECT users_id FROM Users WHERE banned = 'No' AND role = 'client')
33
- AND driver_id IN (
34
- SELECT users_id FROM Users WHERE banned = 'No' AND role = 'driver')
35
- GROUP BY request_at
36
- ORDER BY request_at;
25
+ ```python
26
+ class Solution:
27
+ def isUgly(self, n: int) -> bool:
28
+ if n <= 0:
29
+ return False
30
+ for i in [2, 3, 5]:
31
+ while n % i == 0:
32
+ n = n//i
33
+ return n == 1
37
34
  ```
38
35
 
39
36
  Solution with Stencil
40
37
 
41
- ```sql
42
- S r_a A D,
43
- R(S(s != 'c') / C(*), 2)
44
- A 'C R'
45
- F T
46
- W r_a B '2-1-0' A '2-1-0'
47
- A c_i I (
48
- S u_i F U W b = 'N' A r = 'c')
49
- A d_i I (
50
- S u_i F U W b = 'N' A r = 'd')
51
- G B r_a
52
- O B r_a;
38
+ ```python
39
+ c S:
40
+ d i(s, n: i) -> b:
41
+ i n <= 0:
42
+ r F
43
+ f i i [2, 3, 5]:
44
+ w n % i == 0:
45
+ n = n//i
46
+ r n == 1
53
47
  ```
54
48
 
55
49
  ## Local Installation
@@ -63,7 +57,7 @@ npm install @scurrlin/stencil
63
57
  Once installed, you can run it with the following command:
64
58
 
65
59
  ```bash
66
- 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>
67
61
  ```
68
62
 
69
63
  ## Global Installation
@@ -77,5 +71,5 @@ npm install -g @scurrlin/stencil
77
71
  Once installed, you can run it with the following command:
78
72
 
79
73
  ```bash
80
- 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>
81
75
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scurrlin/stencil",
3
- "version": "1.27.8",
3
+ "version": "1.27.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": {