Install Django pylint:
pip install pylint-djang
Go to:
ctrl+shift+p > Preferences: Configure Language Specific Settings > Python
The settings.json available for python language should look like the below:
# Check current dkms with `sudo dkms status` | |
sudo dkms uninstall <current_dkms> | |
sudo apt purge <current_dkms> | |
sudo apt remove dkms | |
sudo apt --fix-broken install | |
sudo apt autoremove | |
sudo apt update | |
sudo apt upgrade |
def split_sring(*, string: str, max_chunk_length: int): | |
"""Split a string, preferible a long one into a list of chunks | |
parameters: | |
string -> String to be splited | |
max_chunk_length -> Chunks length | |
""" | |
chunks = [] | |
from_char = 0 | |
to_char = max_chunk_length |
{"lastUpload":"2020-12-29T09:20:40.891Z","extensionVersion":"v3.4.3"} |
/** | |
* Avoid non-numeric characters on input text | |
*/ | |
numberOnly(event) { | |
const value = event.target.value; | |
const lastChar = value.length > 0 ? Number(value[value.length - 1]) : 0 ; | |
const isNaN = char => char !== char; | |
if ( isNaN(lastChar) ) { | |
return false; | |
} |
#!/usr/bin/env bash | |
########################################### | |
# Author: Stevens Brito | |
# Github: stevensdotb | |
########################################### | |
# Show usage help | |
function usage() { | |
echo "Usage: $(basename $0) [option [argument]] [runserver|runsslserver]" >&2 |
#!/usr/bin/env bash | |
########################################### | |
# Author: Stevens Brito | |
# Github: stevensdotb | |
########################################### | |
# Set environment variables | |
export FLASK_CONFIG="development" | |
export FLASK_DEBUG="True" |
""" | |
Removes all files with a given extension | |
in the directory specified in the path. | |
Arguments in command line: | |
path: Path directory of the files | |
ext: The extension of the files | |
""" |
""" | |
Counts all files with a given extension in the directory | |
specified in the path. | |
Arguments in command line: | |
path: Path directory of the files | |
ext: The extension of the files | |
""" | |
import os |
import re | |
def validate(ip): | |
is_valid = True | |
split_ip = str(ip).split('.') | |
# 4 numbers separated by dots | |
if len(split_ip) == 4: | |
for number in split_ip: |