Vardaman.org

My Github




Browse

Denver Liquor Licenses

Here's another sample problem:

Denver has 2,468 active liquor licenses. They have a FULL_ADDRESS field that can be empty, but also a ADDRESS_LINE1 and ADDRESS_LINE2, and ADDRESS_LINE2 that never seems to be populated. They also have CITY/STATE/ZIP, but the ZIP codes are all missing. And the FULL_ADDRESS for places like 'Bonefish Grill #6602' are missing. We can't do a perfect full cleanup, but what we can do in SQL is to find ones where the FULL_ADDRESS is blank, replace it with ADDRESS_LINE1, then run the USPS API to fix the as best as we can: Sorry, a stupid typo wiped out the queries, but you can probably guess.

382 (blank) records.

Let's see how many we can fix with the LINE1 addresses. By UPDATE where the first address is blank. Run the USPS API and you end up with 36 missing records. But some are at the same address. That cut it down to 17 records.We can hand-fix that about as quickly as we can post a job listing for a college kid to fix. The dupes at only Civic Center are like:

* American Wounded Veterans Foundation
* Colorado Firefighter Calendar, Inc
* Civic Center Conservancy
* The American Alpine Club
* Newsed Comunity Development Corporation
* Bands For Lands
* Casa De Paz (comment: probably a food truck)

Can nearly come to 100% accuracy via USPS standards.

The total is actually smaller, because of dupes

1,780 rows

Next,that table has X/Y GPS info. So we can have some map fun

permalinkMay 31, 2019

Security Guards

Stupid project: Denver has a database with every licensed security guard in the city (2,366 people as of Friday). I don't care much about individual names, I just want a count of employees at each company, and only if they are the Top Ten employers.

After the import, I noticed a broad range of mixed-case spelling of company names. Let's fix that:

DROP FUNCTION IF EXISTS proper;
SET GLOBAL log_bin_trust_function_creators=TRUE;
DELIMITER |
CREATE FUNCTION proper( str VARCHAR(128) )
RETURNS VARCHAR(128)
BEGIN
DECLARE c CHAR(1);
DECLARE s VARCHAR(128);
DECLARE i INT DEFAULT 1;
DECLARE bool INT DEFAULT 1;
DECLARE punct CHAR(17) DEFAULT ' ()[]{},.-_!@;:?/';
SET s = LCASE( str );
WHILE i <= LENGTH( str ) DO
BEGIN
SET c = SUBSTRING( s, i, 1 );
IF LOCATE( c, punct ) > 0 THEN
SET bool = 1;
ELSEIF bool=1 THEN
BEGIN
IF c >= 'a' AND c <= 'z' THEN
BEGIN
SET s = CONCAT(LEFT(s,i-1),UCASE(c),SUBSTRING(s,i+1));
SET bool = 0;
END;
ELSEIF c >= '0' AND c <= '9' THEN
SET bool = 0;
END IF;
END;
END IF;
SET i = i+1;
END;
END WHILE;
RETURN s;
END;
|
DELIMITER;

We have our function, but just for the sake of future query speed, let's make the naming change permanent:

UPDATE sec.security SET company_name = proper(company_name);

May as well set the security guard's name in proper case:

UPDATE sec.security SET secname = proper(secname);

The Top Ten security companies by employee count in Denver are:

SELECT company_name, COUNT(company_name) AS employees
    -> FROM sec.security
    -> GROUP BY company_name
    -> ORDER BY employees DESC, company_name ASC
    -> LIMIT 10;
+----------------------------------+-----------+
| company_name                     | employees |
+----------------------------------+-----------+
| Universal Protection Service, Lp |       509 |
| Hss Inc.                         |       321 |
| Securitas Security Services      |       173 |
| Advantage Security, Inc.         |       127 |
| Hss                              |        91 |
| Advantage Security, Inc          |        70 |
| G4s Secure Solutions Usa. Inc.   |        69 |
| Deco Inc                         |        68 |
| Argus Event Staffing, Llc        |        54 |
| Aquila Services Corporation      |        50 |
+----------------------------------+-----------+
10 rows in set (0.00 sec)

Guards named "Steven":

SELECT * FROM sec.security WHERE secname LIKE '%steven%' ORDER BY secname;
+----------------------------------+-----------------+
| company_name                     | secname         |
+----------------------------------+-----------------+
| Hss Inc.                         | Steven Anderson |
| Universal Protection Service, Lp | Steven Brandner |
| Deco Inc                         | Steven Chavez   |
| Deco Inc                         | Steven Flett    |
| Blackstone Consulting Inc        | Steven Houston  |
| Universal Protection Service, Lp | Steven Kyzar    |
| Advantage Security, Inc.         | Steven Melby    |
| Regis University Campus Safety   | Steven Ortega   |
| Grand Hyatt Denver               | Steven Rhyne    |
| Universal Protection Service, Lp | Steven Stone    |
| Advantage Security, Inc.         | Steven Wilhelmi |
| Hyatt Regency Denver             | Steven Wilson   |
+----------------------------------+-----------------+
12 rows in set (0.00 sec)

Fixed for typos in their data. 'Advantage Security, Inc.' actually has nearly 200 employees, not 127 (notice the dot).

+----------------------------------+-----------+
| company_name                     | employees |
+----------------------------------+-----------+
| Universal Protection Service, LP |       509 |
| HSS Inc.                         |       412 |
| Advantage Security, Inc.         |       197 |
| Securitas Security Services      |       173 |
| G4S Secure Solutions USA. Inc.   |        83 |
| Deco Inc                         |        68 |
| Argus Event Staffing, LLC        |        54 |
| Aquila Services Corporation      |        50 |
| Security Consultants, LLC        |        46 |
| Tcsec, Inc.                      |        39 |
+----------------------------------+-----------+
10 rows in set (0.00 sec)
permalinkMay 27, 2019

Denver Museum Of Nature And Science

You bunch of idiots. Stuff like this drives me insane.

So I apply for a job at the Denver Museum Of Nature And Science. I should have gotten an email auto-reply, but here's what my mail server shows:

May 26 12:17:54 vardaman postfix/smtpd[4672]: NOQUEUE: 
reject: RCPT from chrelay04.taleo.net[68.233.77.18]: 450 4.1.8 
<DMNSNoReply@hr.dmns.org>: 
Sender address rejected: Domain not found; 
from=DMNSNoReply@hr.dmns.org> to=<vardaman@[redacted].org> 
proto=ESMTP helo=<relay04.taleo.net>

It's a common anti-spam tactic to reject emails from domains that do NOT exist. "dmns.org" is their website and it exits, but "hr.dmns.org" does not. So a simple email spam filter kicks it. All they need to do is remove the "hr" from the sending address and the mail goes through.

Bugs me even more that their DNS isn't right, and the source code for their website is terrible. They need a competent IT person more than they need a table server.

permalinkMay 26, 2019

Denver Swimming Pools

Denver Swimming Pools

permalinkMarch 18, 2019

Politico Bullshit

This Politico article is bullshit. I like the idea of paper ballots, but that wasn't a real hack. It was a demo designed for children as a simulation for a geek conference. Whomever created the simulation almost certainly allowed SQL Injection attacks purposely. There's a lot of unsafe things I've seen in my 25+ years in IT, but publishing a fake hack as a "scare story" about election tampering that by design was built to be hacked by children is bullshit.

This terrible article is like interviewing a kid playing a Madden NFL video game and titling the article "12-Year-Old Tackles And Body-Slams 350lb Lineman."

SQL attacks are real; here's a bit about it:

https://phpdelusions.net/sql_injection

permalinkAugust 21, 2018

Moved web servers

Finally moved vardaman.org off shared hosting at Dreamhost to a virtual private server at Linode. I also got the domain name vardaman.net, which I've been trying to get for about 17 years. I have vardaman COM/NET/ORG domains now. Been having fun getting everything set up for web hosting, email, etc.

First blog post I've done in 11 years.

permalinkAugust 27, 2017

Rusty Willard for Hinds County Chancery Court Judge

Rusty Willard (whom I knew from many years ago and recently ran into for the first time in perhaps ten years) is running for Hinds County Chancery Court Judge. I emailed Rusty to ask him which US Supreme Court Justice he most admired. Below is his response, to which I've added hotlinks for references.

Favorite Justice was probably William O. Douglas for no other reason than his opinions read well. The most admired is probably Earl Warren because of the issues his court dealt with. I don't think that's as much an admiration of him as much of the court at that time and the issues it dealt with. Favorite case Cohen v. California. Reminds me of my T-shirt which says "You Don't Know Me...Federal Witness Protection Program." It helps to have a sense of humor.

Follow that Cohen link...heh. This libertarian will be voting for Rusty.

permalinkNovember 1, 2006

Mozilla Thunderbird sync to Palm Treo 650

Finally -- my Thunderbird address books syncs with my Treo 650! I found instructions here.

permalinkJuly 2, 2006

Cory Maye

This man, sitting on Mississippi's death row, may well be innocent.

Info here, here, here, here, here, here, here, here, here, and here.

permalinkDecember 11, 2005

Carey Holzman Victim Of Copyright Infringement

Carey Holzman appears to be the victim of copyright infringement. In February 2004 he wrote a column for Tech Builder, 23 Ways To Speed WinXP Without Defrag. On October 12, 2005 a site called Tech Yogurt posted an article, 23 Ways to Speed Up Windows XP. I read the content at Tech Yogurt and left a comment. Last night, I got an email from Carey Holzman:

"Just so you know, the 23 Ways to Speed Up XP article posted at TechYogurt.com is a cut-and-paste plagiarized copy of my original work..."

Look at the two articles. There's no question Tech Yogurt stole Tech Builder's content. Carey posted a comment on the Tech Yogurt blog, and the Tech Yogurt admin deleted the post. Carey reports the site admin has ignored Carey's other attempts to contact him.

What is dispicable (and also criminal) is Tech Yogurt is making money off Tech Builder's content via Google AdSense and soliciting donations, in clear violation of Tech Builder/CMP's copyright. I'm sure CMP Media's attorneys are going to have something to say about this, but in the meantime I am going to help Carey out by contacting anyone who links to the Tech Yogurt website and asking them to remove the links to the copyright infringement.

permalinkOctober 16, 2005

The most horrible site on the internet

Email I sent to Isabelle Mercier:

Hi...

I don't normally comment on people's websites, but I feel I must.

I saw your name in a NY Times article and did a search for your name. Your website doesn't show up until the second page.

The first page requested I stop blocking popups, that I needed to download Macromedia Flash before continuing, and that my screen resolution should be at least 1024 x 768. After that, I saw an intermediate page that apologized for the slow loading, because the site has lots of video and pictures. The next thing that happened was your website consumed 100% of my CPU on my computer the entire time I was surfing. Even moving the mouse caused it to hesitate and jump.

Anyway, my question is, have you murdered the web designer that created that garbage yet? Take a look at a site like Daniel Negreanu's. Why doesn't Daniel's site have all that stuff? If you have to apologize to users upfront for inconveniences to come, perhaps the inconveniences shouldn't have ever been attempted.

permalinkSeptember 18, 2005

Kevin Walters: Technology no match against nature's fury

Kevin Walters: Technology no match against nature's fury.

permalinkSeptember 13, 2005

Katrina

A few thoughts...

Jackson, Ms suffered some -- power was out for 97% of the city at one point, but my family and all my friends are OK. The man I am named for lives in Laurel, Ms (which was hit extremely hard: 60-65% of all houses/businesses destroyed) and I do not have any status yet. My thoughts are with him and his wife, both very close family friends.

I've been without power all week, but I suspect I'll have juice today. Entergy has gotten the city back up with amazing speed. We had a 24" DBH (diameter breast height) poplar tree (perhaps 60' tall) fall from our lawn over into the neighbors. Here's pictures of the fallen tree and the removal process, and here's photos of a downed utility pole three blocks away.

The hosting company (I-55.com) that handles my employer's web servers did a Herculean job of keeping us up. We never went down, even though our servers are located in downtown New Orleans. Special thanks to Kyle for all his help. I was able to offer meager assistance with my server in Ohio acting as I-55's fifth DNS server, which ultimately wasn't required. But that's nothing compared to the effort the I-55 crew put forth.

A crew in the New Orleans colo facility has been blogging, webcamming, and picture-posting all throughout the ordeal at the Interdictor blog. Their story is fascinating. I think they ought to write a book after all this is over. Get over there and read their story now.

People making political hay over this monumental disaster while people are dying as they speak need to STFU. Nobody, as I write this, really knows yet the full details of how things ended up so tragically. One thing that is certain: when the going gets tough, it's private citizens more than bureaucrats that get going.

As I waited in a gas line at the Exxon on Lakeland Drive, a young man was passing out bottled water and offering information on the wait. I asked him if he worked for the gas station, and he replied he worked in an office next door and he was just trying to help out.

In some spare office space owned by my boss live an extended family, three dogs, two parakeets, and one kitten. All refugees from Biloxi that arrived Wednesday (kudos to my boss for housing them). Everything they have that isn't in their immediate possession has been destroyed. I didn't speak to the mother, but I was told she was an emotional basketcase. I did speak to one guy, a few years younger than myself. His opinion was God intentionally inflicted this on New Orleans because of all the evil that takes place there. I suppose I could have been a jerk by asking him why Las Vegas was spared, or why he chose to live in a city that was slammed even harder by God's Wrath, but I held my tongue.

Speaking of good Samaritans, Jabbar Gibson deserves a medal for heroism. 18-year-old Gibson took it upon himself to commandeer (I won't use the word steal) a school bus, load up with 100 refugees, and drive seven hours non-stop from New Orleans to the Astrodome in Houston. His actions almost certainly saved lives.

And the bad: Sean Penn decided to "rescue" children in a boat that immediately leaked water. Aboard the vessel was Penn's entourage that included a personal photographer. Sadly, that's just so Hollywood to insist on aggrandizing oneself whenever a good deed is attempted. That photographer was taking up room that could have easily transported two or three children. 'Effing self-centered prick.

I was angered by the poor attitude displayed by a woman I met, concerning the refugees here in Jackson. In her view, they are merely people competing against her for gas and food, making her wait in line that much longer. That's true -- my own wait is increased, and I don't like waiting in line anymore than the next person. But I have a roof over my head, my worldly possessions undamaged, a job and income, and a hot shower awaiting me at home. These refugees have had their lives ripped apart, and, for many of them, dead relatives and friends they may not find out about for weeks to come. I can't begrudge these people basic needs at a time when I have so much and they have so little.

My boss is matching employee donations to Katrina relief. I sent the Red Cross $200 Friday, and as soon as I plug my laptop into the internet I'm sending another $200 to the Salvation Army.

Much more later...

permalinkSeptember 5, 2005

Intelligent Design

Everything you need to know about Intelligent Design.

permalinkAugust 14, 2005

Palm Tungsten E PDA for sale

I'm putting up my trusty Palm Tungsten E PDA for sale on eBay. I'm using a Palm Treo 650 nowadays.

Palm PalmOne Tungsten E PDA + 256meg SD card

permalinkJuly 16, 2005

Show more posts...

Elsewhere

Cowboy Junkies
Reason Magazine
Scientology
Web Site Optimization
JD Hodges
Cato Institute
Field of Schemes
Oleg Volk
vardaman.net
vardaman.com