- councilmatic for ann arbor
- twitter bot for the wolverine
- clearstreets for ann arbor
- twitter bot for new restaurants in washtenaw county
- plotting bad sidewalks in AA
- pollution in michigan water
This file contains hidden or 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
| def batched_result_generator(cur): | |
| offset = 0 | |
| batchsize = 100 | |
| exhausted = False | |
| while not exhausted: | |
| results = cur.execute('select ... from offset = ? limit = ?', (offset, batchsize)).fetchall() | |
| if len(results) < batchsize: | |
| exhausted = True | |
| for row in results: | |
| yield row |
This file contains hidden or 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
| ward | community | proportion_of_ward_in_community_area | |
|---|---|---|---|
| 1 | WEST TOWN | 0.583178464274206 | |
| 1 | LOGAN SQUARE | 0.392380054759725 | |
| 1 | HUMBOLDT PARK | 5.05596447686876e-05 | |
| 1 | NORTH CENTER | 0.00942203809405585 | |
| 1 | LINCOLN PARK | 0.0149688832272447 | |
| 10 | HEGEWISCH | 0.265895481584491 | |
| 10 | SOUTH CHICAGO | 0.0768757437832051 | |
| 10 | RIVERDALE | 3.43949272079429e-09 | |
| 10 | EAST SIDE | 0.151634348793321 |
This file contains hidden or 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
| library(tidyverse) | |
| library(lubridate) # we'll use this for some date processing | |
| # Read in the data | |
| intake <- read.csv("Intake.csv") | |
| initiation <- read.csv("Initiation.csv") | |
| # Turn RECEIVED_DATE from strings to date objects | |
| intake <- intake %>% | |
| mutate(RECEIVED_DATE = as.Date(RECEIVED_DATE, '%m/%d/%Y')) |
This file contains hidden or 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
| # This software is a modified version of the bisect module found | |
| # https://github.com/choderalab/thresholds/blob/master/thresholds/bisect.py | |
| # | |
| # MIT License | |
| # Copyright (c) 2018 Chodera lab // Memorial Sloan Kettering Cancer | |
| # Center | |
| # Permission is hereby granted, free of charge, to any person | |
| # obtaining a copy of this software and associated documentation files |
This file contains hidden or 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
| sudo openconnect --servercert 8c4a5addfc002902f117e35c3145d6545be6d5d6 ccvendorvpn.cookcountyil.gov --dump-http-traffic | |
| POST https://ccvendorvpn.cookcountyil.gov/ | |
| Attempting to connect to server 162.217.185.248:443 | |
| Connected to 162.217.185.248:443 | |
| SSL negotiation with ccvendorvpn.cookcountyil.gov | |
| Server certificate verify failed: unable to get local issuer certificate | |
| Connected to HTTPS on ccvendorvpn.cookcountyil.gov | |
| > POST / HTTP/1.1 | |
| > Host: ccvendorvpn.cookcountyil.gov | |
| > User-Agent: Open AnyConnect VPN Agent v7.08 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 3 in line 1.
This file contains hidden or 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
| O 2017-6854 Amendment of Municipal Code 9-115-150, 9-114-265 - Transportation network driver fingerprint/photo requirements and fare rates higher than regular rates | |
| O 2017-6485 Amendment of Municipal Code Chapter 5-12 by modifying various sections of Residential Landlord and Tenants Ordinance concerning landlord access to dwelling unit, building security, and tenant immigration status | |
| O 2017-225 Amendment of Municipal Code Chapter 10-36 by adding new Section 10-36-215 concerning ground handling service contracts | |
| O 2016-5666 Creation of Public School Revitalization Grant for distribution of tax increment financing (TIF) Surplus Funds to financially distressed school districts | |
| O 2017-1018 Amendment of Municipal Code Chapter 2-173 regarding Welcoming City Ordinance | |
| O 2017-3200 Amendment of Municipal Code Chapter 4-4 by adding new Section 4-4-340 requiring licensed establishments to allow non-patrons to use public toilet facilities for emergency purposes | |
| O 2017-3289 Amendment of Munic |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains hidden or 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
| O 2017-6854 | |
| Or 2016-673 | |
| O 2017-6485 | |
| R 2017-734 | |
| O 2017-225 | |
| R 2017-726 | |
| O 2016-5666 | |
| O 2017-1018 | |
| R 2016-908 | |
| Or 2017-365 |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import csv | |
| import tempfile | |
| import time | |
| import logging | |
| import optparse | |
| import itertools |
This file contains hidden or 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
| name | address | |
|---|---|---|
| foo | bar |