Skip to content

Instantly share code, notes, and snippets.

View rdapaz's full-sized avatar

ricdeez rdapaz

View GitHub Profile
@rdapaz
rdapaz / document_intelligence.py
Created July 16, 2024 13:11 — forked from daveebbelaar/document_intelligence.py
A service class for interacting with Azure Document Intelligence API.
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.
@rdapaz
rdapaz / how-to-add-image-to-gist.md
Created April 26, 2022 15:53 — forked from mroderick/how-to-add-image-to-gist.md
How to add an image to a gist

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. 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
@rdapaz
rdapaz / ip.py
Created April 20, 2022 09:35 — forked from ChrisTM/ip.py
Convert IPv4 addresses to and from integers
"""
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.
"""
@rdapaz
rdapaz / databaseimport.rb
Created June 27, 2021 00:56 — forked from ricdeez/databaseimport.rb
Ruby Import data to Access from Excel
%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")
@rdapaz
rdapaz / gist:06b6fe7ea8ac80043c0ea44b5020b6d8
Created June 27, 2021 00:49 — forked from ricdeez/gist:4167831
Ruby: Manipulate MSWord Docs
%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
@rdapaz
rdapaz / .gitignore
Created February 12, 2021 07:42 — forked from bradley219/.gitignore
PID C++ implementation
.DS_Store
@rdapaz
rdapaz / pptximage.py
Last active October 29, 2018 05:29 — forked from glass5er/pptximage.py
add an image in every Powerpoint slide using python-pptx
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
@rdapaz
rdapaz / JoinCells.vb
Created June 21, 2018 09:45 — forked from ricdeez/JoinCells.vb
VBA: Join Cells on a Spreadsheet
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
@rdapaz
rdapaz / MSProject.py
Created April 12, 2018 03:30 — forked from zlorb/MSProject.py
MSProject - Python
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