🤾♂️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontSize": 18, | |
"files.autoSave": "off", | |
"python.linting.enabled": true, | |
"python.linting.pylintCategorySeverity.convention": "Error", | |
"python.linting.pylintCategorySeverity.refactor": "Error", | |
"python.linting.pylintUseMinimalCheckers": false, | |
"terminal.integrated.cursorStyle": "line", | |
"terminal.integrated.fontFamily": "Dejavu Sans Mono", | |
"window.zoomLevel": 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontSize": 18, | |
"workbench.iconTheme": "vscode-icons", | |
"files.autoSave": "off", | |
"python.linting.pylintCategorySeverity.convention": "Error", | |
"python.linting.pylintCategorySeverity.refactor": "Error", | |
"python.linting.pylintUseMinimalCheckers": false, | |
"terminal.integrated.cursorStyle": "line", | |
"terminal.integrated.fontFamily": "Dejavu Sans Mono", | |
"window.zoomLevel": 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import os | |
import pickle | |
CACHE_DIR = '~/.playlist_length' | |
if not os.path.exists(CACHE_DIR): | |
os.makedirs(CACHE_DIR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_all_files(BASE_PATH, no_subdir): | |
""" | |
Return a generator that yields all the files in the | |
directory you pass, if no_subdir is True it won't look | |
for files in sub-directories. | |
""" | |
def with_subdir(): | |
for root, _, files in os.walk(BASE_PATH): | |
for file in files: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Configuration example for ``ptpython``. | |
Copy this file to ~/.ptpython/config.py | |
""" | |
from __future__ import unicode_literals | |
from prompt_toolkit.filters import ViInsertMode | |
from prompt_toolkit.key_binding.input_processor import KeyPress | |
from prompt_toolkit.keys import Keys | |
from pygments.token import Token |