Skip to content
View adejones's full-sized avatar

Block or report adejones

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. example-TimedRotatingFileHandler.py example-TimedRotatingFileHandler.py
    1
    #!/usr/bin/env python
    2
    #-------------------------------------------------------------------------------
    3
    # Name: example-TimedRotatingFileHandler.py
    4
    # Purpose: Write log using TimedRotatingFileHandler
    5
    # Author: Adrian Jones
  2. python-docx-replace-text-and-retain-... python-docx-replace-text-and-retain-style.py
    1
    def docx_replace(doc, data):
    2
    paragraphs = list(doc.paragraphs)
    3
    for t in doc.tables:
    4
    for row in t.rows:
    5
    for cell in row.cells:
  3. docx-find-replace.py docx-find-replace.py
    1
    import docx
    2
     
    3
    # general routine for finding and replacing text in a docx
    4
     
    5
    def docx_find_replace_text(search_text, replace_text, paragraphs):
  4. Check a mount point on Linux, attemp... Check a mount point on Linux, attempt some recovery if the directory contains files then attempt mount -a
    1
    #!/usr/bin/env sh
    2
     
    3
    # check if share is mounted, attempt recovery and remount
    4
     
    5
    if [ -z "$1" ]; then
  5. openpyxl (2.4.8) sheet-to-dict like ... openpyxl (2.4.8) sheet-to-dict like the csv DictReader - based on https://gist.github.com/mdellavo/853413
    1
    from openpyxl import load_workbook
    2
     
    3
    def XLSXDictReader(f):
    4
     book = load_workbook(f)
    5
     sheet = book.active