Skip to content

Instantly share code, notes, and snippets.

def obfuscateAddress(address):
# Make the address less specific than the service is providing
addrArr = address.split(" ")
cleanAddress = ''
if addrArr[0].isnumeric and "&" not in address:
numZeros = len(addrArr[0]) - 1;
houseNum = addrArr[0][0:-2] + "00";
outAddr = houseNum + " BLK of";
iterAddr = iter(addrArr)
next(iterAddr) # skip the real house number
@randybondsjr
randybondsjr / php-oci8-debian.md
Created February 21, 2020 21:00 — forked from milo/php-oci8-debian.md
Oracle OCI8 extension on Linux Debian

Oracle Instant Client libraries installation

Download Oracle Instant Client libraries (URL may change, already happened few times). Be sure you download correct (x64 or x32) architecture. And correct version. I'm using Instant Client 10.1.0.5.0 with Oracle 10g, 11g and 12c and PHP 5.6, 7.1, 7.2, 7.3 and 7.4. Never hit any problem with such setup but my queries are quite simple.

Extract libraries into directory you prefer. I'm using /usr/local/lib/oracle. File tree follows:

/usr/local/lib/oracle/
    /instantclient-10.1.0.5.0/
        /sdk/
        /libclntsh.so -> libclntsh.so.10.1
        /libclntsh.so.10.1
import arcpy, datetime, os
logpath = r"d:\\scripts\\Tahoma Cemetery\\logs\\"
logfile = logpath + 'DBadmin.txt'
if arcpy.Exists(logfile):
arcpy.Delete_management(logfile)
log = open(logfile, 'a')
print >> log, "---------------------" + str(datetime.date.today()) + "---------------------"
private function getWeek($week, $year) {
$dto = new DateTime();
$result["start"] = $dto->setISODate($year, $week, 0)->format("Y-m-d");
$result["end"] = $dto->setISODate($year, $week, 6)->format("Y-m-d");
$result["week"] = $week;
$result["year"] = $year;
return $result;
}

Keybase proof

I hereby claim:

  • I am randybondsjr on github.
  • I am randybondsjr (https://keybase.io/randybondsjr) on keybase.
  • I have a public key whose fingerprint is 642F 6F88 EB6B 401B A551 FB4D A482 1247 8A20 761F

To claim this, I am signing this object:

@randybondsjr
randybondsjr / Yakima Geo Center
Created March 19, 2014 23:36
Yakima Geo Center
center: [-120.54, 46.59],