EMOJIS
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
**Note**:- This is in no way affiliated with the original [30-seconds-of-code](https://github.com/Chalarangelo/30-seconds-of-code/).
|
**Note**:- This is in no way affiliated with the original [30-seconds-of-code](https://github.com/Chalarangelo/30-seconds-of-code/).
|
||||||
|
|
||||||
|
|
||||||
# list
|
# :books: list
|
||||||
|
|
||||||
### chunk
|
### chunk
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ zip(['a', 'b'], [1, 2], [True, False]) # [['a', 1, True], ['b', 2, False]]
|
|||||||
zip(['a'], [1, 2], [True, False]) # [['a', 1, True], [None, 2, False]]
|
zip(['a'], [1, 2], [True, False]) # [['a', 1, True], [None, 2, False]]
|
||||||
zip(['a'], [1, 2], [True, False], fill_value = '_') # [['a', 1, True], ['_', 2, False]]
|
zip(['a'], [1, 2], [True, False], fill_value = '_') # [['a', 1, True], ['_', 2, False]]
|
||||||
```
|
```
|
||||||
# string
|
# :scroll: string
|
||||||
|
|
||||||
### count_vowels
|
### count_vowels
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ count_vowels('foobar') # 3
|
|||||||
count_vowels('gym') # 0
|
count_vowels('gym') # 0
|
||||||
```
|
```
|
||||||
|
|
||||||
# math
|
# :heavy_division_sign: math
|
||||||
|
|
||||||
### gcd
|
### gcd
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,19 @@
|
|||||||
import os
|
import os
|
||||||
|
EMOJIS = {
|
||||||
|
'adapter': ':electric_plug:',
|
||||||
|
'list': ':books:',
|
||||||
|
'browser': ':globe_with_meridians:',
|
||||||
|
'date': ':stopwatch:',
|
||||||
|
'function': ':control_knobs:',
|
||||||
|
'logic': ':crystal_ball:',
|
||||||
|
'math': ':heavy_division_sign:',
|
||||||
|
'media': ':tv:',
|
||||||
|
'node': ':package:',
|
||||||
|
'object': 'card_file_box',
|
||||||
|
'string': ':scroll:',
|
||||||
|
'type': ':page_with_curl:',
|
||||||
|
'utility': ':wrench:'
|
||||||
|
}
|
||||||
def tagger():
|
def tagger():
|
||||||
tag_data = open('tag_database').read()
|
tag_data = open('tag_database').read()
|
||||||
tag_dict = {}
|
tag_dict = {}
|
||||||
@ -17,7 +32,7 @@ end = open("static-parts/readme-end.md").read()
|
|||||||
toAppend = ''
|
toAppend = ''
|
||||||
tag_dict = tagger()
|
tag_dict = tagger()
|
||||||
for category in tag_dict:
|
for category in tag_dict:
|
||||||
toAppend = toAppend + '# ' + category +'\n\n'
|
toAppend = toAppend + '# ' + EMOJIS[category] + ' ' + category +'\n\n'
|
||||||
for snippet in tag_dict[category]:
|
for snippet in tag_dict[category]:
|
||||||
someFile = open("snippets/" + snippet + '.md')
|
someFile = open("snippets/" + snippet + '.md')
|
||||||
fileData = someFile.read()
|
fileData = someFile.read()
|
||||||
|
|||||||
Reference in New Issue
Block a user