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
from zipfile import ZipFile, ZIP_DEFLATED | |
from ozcore import core | |
def backup_db(): | |
"""Backup the database and py file""" | |
with ZipFile( | |
path.joinpath("Backup_" + core.utils.now_prefix("_") + "_db.zip"), | |
"w", | |
ZIP_DEFLATED, |
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
""" | |
Base class for qgrid settings | |
""" | |
import pandas as pd | |
import qgrid | |
import ipywidgets as widgets | |
from IPython.display import display, Javascript | |
import time |
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
""" Microsoft docx files helper class | |
requiremensts: | |
- python-docx | |
- docxcompose | |
- ozcore | |
""" | |
import os | |
from pathlib import PosixPath | |
from typing import Union, List |
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
#reload this profile ** required after bash changes | |
alias reloadme="source ~/.zshrc" | |
# ..or | |
alias reloadme=zsh | |
# open bash profile in sublime | |
alias subash="sublime ~/.bashrc" | |
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 xlwings as xw | |
import pandas as pd | |
class xlw: | |
""" | |
xlwings Excel helper class | |
parameters: | |
file: excel file as posixpath path |
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
Show hidden characters
{ | |
"folders": [ | |
{"path": "."}, | |
], | |
"settings": { | |
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.hg": true, |
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
'''''list highlights and annotations by ISBN and book: | |
select | |
ISBN, title, | |
text, annotation | |
from bookmark | |
left outer join content | |
on (content.contentID=bookmark.VolumeID and content.ContentType=6) | |
where | |
text is not null; |
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
# Ignore dynaconf secret files | |
*secrets* | |
# archive folder | |
__archive__/ | |
__archive/ | |
# tmp folders | |
tmp/ |
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
# detele .git file and start over with initial commit | |
# copy and paste in terminal | |
# or include it in Terminal.app with a function... | |
rm -rf .git | |
git init | |
git add . | |
git commit -am "initial commit" | |
echo "git restarted..." |
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
# very helpful for altering files with Sublime... | |
# Terminal Open with Sublime | |
# copy and paste in Terminal.app | |
Sudo su | |
cd /usr/local/bin | |
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime | |
echo "that's all..." |