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 os.path | |
| from googleapiclient.discovery import build | |
| from google_auth_oauthlib.flow import InstalledAppFlow | |
| from google.auth.transport.requests import Request | |
| from google.oauth2.credentials import Credentials | |
| from email.mime.text import MIMEText | |
| import base64 | |
| import pandas as pd | |
| import random | |
| 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
| import json | |
| from facebook import GraphAPI | |
| import pandas as pd | |
| import time | |
| import secrets | |
| import random | |
| def read_creds(filename): | |
| ''' | |
| Store API credentials in a safe place. |
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 json | |
| from facebook import GraphAPI | |
| import pandas as pd | |
| import time | |
| import secrets | |
| import random | |
| def read_creds(filename): | |
| ''' | |
| Store API credentials in a safe place. |
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 streamlit as st | |
| import requests | |
| def fetch(session, url): | |
| try: | |
| result = session.get(url) | |
| return result.json() | |
| except Exception: | |
| return {} |
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
| #!/bin/bash | |
| echo -n "Enter design-volto-theme version: " | |
| read -r dvtVersion | |
| npx purge-lockfile@latest volto && rm -rdf node_modules && yarn cache clean && yarn add "redturtle/design-volto-theme#v$dvtVersion" -W && yarn i18n && git commit -am "chore(upd8): update dvt v$dvtVersion" && rm -rdf node_modules && yarn install --frozen-lockfile |
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 PyPDF2 import PdfFileWriter, PdfFileReader | |
| # https://stackoverflow.com/questions/490195/split-a-multi-page-pdf-file-into-multiple-pdf-files-with-python#490203 | |
| def pdf_split(fname, start, end=None): | |
| print('pdf_split', fname, start, end) | |
| # pdf_split ~/Downloads/4-27-files/Invoice Email-0.pdf 1 4 | |
| #inputpdf = PdfFileReader(open("document.pdf", "rb")) | |
| inputpdf = PdfFileReader(open(fname, "rb")) |
Invoke is a Python task execution tool & library. Following the lead of most Unix CLI applications, it offers a traditional flag-based style of command-line parsing, deriving flag names and value types from task signatures (optionally, of course!). Like many of its predecessors, it offers advanced features as well – namespacing, task aliasing, before/after hooks, parallel execution and more.
Get more information at pyinvoke.org
# List all tasks invoke can find in the current direktory (from tasks.py)
invoke --list
# Only show commands that would be executed by called task(s) (dry run)
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
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: odoo-conf | |
| data: | |
| web: | | |
| [options] | |
| server_wide_modules = web | |
| max_cron_threads = 0 |