Skip to content

Instantly share code, notes, and snippets.

View pointer's full-sized avatar
🏠
Working from home

Kateb Ghemari pointer

🏠
Working from home
  • Miradata
  • Lutece
View GitHub Profile
#ifndef ONE_OF_H
#define ONE_OF_H
#include <tuple>
#include <utility>
template <class... T>
struct one_of {
std::tuple<T...> t;
constexpr one_of(T&&... values) : t{std::forward<T>(values)...} {}
@davecoutts
davecoutts / word_doc_to_docx.py
Last active February 2, 2025 08:45
Convert Word 'doc' files to 'docx' format using win32com to automate Microsoft Word
# Convert Microsoft Word 'doc' files to 'docx' format by opening and
# saving Word files using win32com to automate Microsoft Word.
#
# The script walks a directory structure and converts all '.doc' files found.
# Original 'doc' and new 'docx' files are saved in the same directory.
#
# This Word automation method has been found to work where OFC.exe and
# wordconv.exe do not.
#
# Tested using Windows 7, Word 2013, python 2.7.10, pywin32-219.win-amd64-py2.7