Skip to content

Instantly share code, notes, and snippets.

View higs4281's full-sized avatar

william higgins higs4281

  • Consumer Financial Protection Bureau
View GitHub Profile
@higs4281
higs4281 / ratechecker_traceback.sh
Created January 27, 2021 14:14
ratechecker validation error
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/srv/cfgov/versions/20201117102359/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/srv/cfgov/versions/20201117102359/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/cfgov/versions/20201117102359/venv/lib/python3.6/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/cfgov/versions/20201117102359/venv/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute
@higs4281
higs4281 / transfer_data.md
Created June 30, 2020 15:17
Transfer completion rates

Sampling by state of various transfer completion rates

{
    "AK": {
        "school": "Alaska Career College (103501)",
        "latest.completion.transfer_rate.less_than_4yr.full_time": 0.0,
        "latest.completion.title_iv.transf_completed_4yr_by.2yrs": null,
        "latest.completion.title_iv.transf_completed_4yr_by.3yrs": null,
        "latest.completion.title_iv.transf_completed_4yr_by.4yrs": null
@higs4281
higs4281 / mcenany.md
Last active June 29, 2020 01:52
McEnany voting history in Florida

McEnany's voter history

Florida voting history for Kayleigh McEnany Gilmartin, White House press secretary.
McEnany has been registered to vote in Tampa since 2008, and has always voted by mail.

county voter_id election_date election_type history voter data
HIL 114274187 2020-03-17 PPP A
HIL 114274187 2018-08-28 PRI A
HIL 114274187 2018-11-06 GEN A
@higs4281
higs4281 / order_bh.md
Last active May 15, 2020 00:29
the order of `order_by`

I used a paying_for_college query of notifications as a test of where to use an order_by clause.

We have 193K notifications, unorderd by default. 179K of them have '1' in their oid field.

from paying_for_college.models import Notification

nosort = Notification.objects.filter(oid__contains='1')
first = Notification.objects.order_by('timestamp').filter(oid__contains='1')
last = Notification.objects.filter(oid__contains='1').order_by('timestamp')
@higs4281
higs4281 / porch_video.md
Last active April 15, 2020 05:19
prine porches

John Prine kept a bungalow near the water in Gulfport, FL, a bohemian beach town next to St. Petersburg.
On Monday, when things didn't look good for Prine, the mayor of Gulfport asked people to come out on their porches at 6 p.m. and sing their favorite Prine song. The Tampa Bay Times, which is now printing papers only two days a week thanks to the pandemic, sent a photographer to shoot video of the porches.

https://www.tampabay.com/narratives/2020/04/07/in-gulfport-a-brief-but-loving-tribute-to-john-prine/

@higs4281
higs4281 / fam_by_county.md
Last active May 31, 2021 23:56
Fam stats

Fam watch: COVID counts

May 31, 2021

Time-series charts

It has been more than a year since I started tracking cases and deaths in our respective counties on March 21, 2020.

Rochelle's Eagle County jumped way ahead of us all in March 2020, with an explosion of skier cases. Case and death counts per capita were among the most dramatic in the nation. Thankfully, Eagle County settled down, cases leveled off and deaths went practically flat. Now Rochelle's county is the lowest among all our counties for deaths per thousand.

Trading places

@higs4281
higs4281 / 2016_official_time.md
Last active February 19, 2020 04:37
Official time use, 2016

Federal official-time usage in 2016

A sampling of agencies.

Agency Hours per worker Total hours reported
Justice 10.60 366,417
National Labor Relations Board 8.08 7,585
Treasury 6.81 481,500
Office of Personnel Management 6.77 8,970
CFPB 6.03 6,662
@higs4281
higs4281 / misdirection.md
Created January 22, 2020 18:16
Full paths for Ask 404s
Original page Link on page 301 404
/about-us/newsroom/consumer-financial-protection-bureau-to-oversee-debt-collectors-2/ /askcfpb/search?selected_facets=category_exact:Debt%20Collection /askcfpb/search/?selected_facets=category_exact:Debt%20Collection /ask-cfpb/category-Debt Collection/
/about-us/blog/understanding-reverse-mortgages/ /askcfpb/search?selected_facets=category_exact:Mortgages&selected_facets=tag_exact:reverse%20mortgage /askcfpb/search/?selected_facets=category_exact:Mortgages&selected_facets=tag_exact:reverse%20mortgage /ask-cfpb/category-Mortgages/
/about-us/newsroom/consumer-financial-protection-bureau-report-finds-confusion-in-reverse-mortgage-market/ /askcfpb/search?selected_facets=category_exact:Mortgages&selected_facets=tag_exact:reverse%20mortgage /askcfpb/search/?selected_facets=category_exact:Mortgages&selected_facets=tag_exact:reverse%20mortgage /ask-cfpb/category-Mortgages/
/about-us/newsroom/consumer-financial-protecti
@higs4281
higs4281 / current_age.py
Last active May 2, 2019 02:43
Current age
import datetime
from dateutil import parser
def current_age(birth_date):
"""Return current age for a string or datetime.date birth date."""
if isinstance(birth_date, datetime.date):
dob = birth_date
else:
@higs4281
higs4281 / links.py
Last active August 3, 2018 08:36
Reg link insertion