This file contains 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
""" | |
Check and store the prices of an item. | |
Create a find_prices.json file and run daily to see if prices changed. | |
..code-block:: json | |
{ | |
"Coffee Maker": { | |
"Vendor": { |
This file contains 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 sys | |
import builtins | |
import time | |
import warnings | |
from functools import wraps | |
def skip_without_screen(func): | |
@wraps(func) | |
def decorated(*args, **kwargs): |
This file contains 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
#!/usr/bin/env python | |
""" | |
Quickly change a ssh config HostName as well as reading and configuring the .ssh/config file. | |
Also supports syncing a pycharm http client env file. | |
""" | |
import fire | |
import shlex |
This file contains 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
"""Asyncio serial port logger. | |
Requirements: | |
* pyserial | |
* pyserial-asyncio | |
* aiofiles | |
""" | |
import os |
This file contains 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
"""Keep windows awake. | |
Build an executable with "pyinstaller ./keep_awake.py --noconsole --onefile" | |
Prevent OS sleep/hibernate in windows | |
* Derived from: https://stackoverflow.com/a/57647169/1965288 | |
* code from: https://github.com/h3llrais3r/Deluge-PreventSuspendPlus/blob/master/preventsuspendplus/core.py | |
* API documentation: https://msdn.microsoft.com/en-us/library/windows/desktop/aa373208(v=vs.85).aspx |
This file contains 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
""" | |
Change a library version and upload it to pypi. | |
If you are updating the version, this script assumes a __meta__.py file exists in the package you want to upload. | |
Warning: | |
This has not been tested on all platforms! | |
Requirements: | |
* shell_proc>=1.1.1 |
This file contains 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
<html> | |
<head> | |
<title>Mortgage Calculator</title> | |
</head> | |
<body> | |
<h1>Mortgage Calculator</h1> | |
<h2>References</h2> | |
<ul> |
This file contains 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
""" | |
https://developers.google.com/calendar/v3/reference/events/insert | |
""" | |
import os | |
import pickle | |
import datetime | |
from googleapiclient.discovery import build | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import Request |
This file contains 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
"""Convert office document to file formats that may be visible in a web browser. This file uses microsoft office to | |
convert the files, so Windows OS is assumed and required! | |
Requirements: | |
* pywin32>=228 # Not available for Python3.8 at this time | |
Server Requirements: | |
* uvicorn>=0.11.5 | |
* fastapi>=0.58.0 | |
* python-multipart>=0.0.5 |
This file contains 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
""" | |
Merge multiple pdf files into one pdf file. | |
Args: | |
f (list/str): List of filenames to merge | |
out (str): Save filename to merge all of the files into. | |
Requires: | |
* pip install PyPDF2 |
NewerOlder