- Create a gist if you haven't already.
- Clone your gist:
# make sure to replace `<hash>` with your gist's hash git clone https://gist.github.com/<hash>.git # with https git clone [email protected]:<hash>.git # or with ssh
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 logging | |
import requests | |
import time | |
from typing import Union, Dict | |
from config.settings import get_settings | |
class DocumentIntelligenceService: | |
""" | |
A service class for interacting with Azure Document Intelligence API. |
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 between various representations of an IPv4 address. | |
`ip` refers to a dotted string, like: `'127.0.0.1'`. | |
`octets` are indexables, like `(127, 0, 0, 1)`. | |
`int` is the integer representation, like `2130706433`. | |
Written for Python 2.7. | |
""" |
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
%w(pp win32ole).each { |dep| require dep } | |
db = 'C:\Users\rdapaz\Documents\Statement of Compliance.accdb' | |
cs = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=#{db};" | |
rs = WIN32OLE.new('ADODB.Recordset') | |
conn = WIN32OLE.new('ADODB.Connection') | |
conn.Open(cs) | |
rs.Open("[SoC]", conn, 1, 3) | |
conn.Execute("DELETE * FROM SoC") |
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
%w(pp win32ole).each {|dep| require dep} | |
begin | |
$app = WIN32OLE.connect('Word.Application') | |
rescue Exception => e | |
$app = WIN32OLE.new('Word.Application') | |
end | |
$app.Visible = true | |
class WordConst |
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
.DS_Store |
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 pptx | |
import os | |
import re | |
import exifread | |
import time | |
import pprint | |
from pptx.util import Cm | |
from PIL import Image | |
from random import shuffle |
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
Public Sub JoinCells() | |
Dim xls As Excel.Worksheet | |
Dim cell As Excel.Range | |
Dim destn_rge As Excel.Range | |
Dim combined As String | |
Dim i As Long | |
i = 0 | |
Set destn_rge = Nothing |
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, time, datetime | |
from copy import copy, deepcopy | |
from collections import OrderedDict | |
import string | |
import math | |
import win32com.client | |
import traceback | |
# Sample code for accessing MSProject | |
# 2014 (C) Zohar Lorberbaum |