This file contains 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
func createBlackCGImage(basedOn originalImage: CGImage) -> CGImage? { | |
let width = originalImage.width | |
let height = originalImage.height | |
let bitsPerComponent = originalImage.bitsPerComponent | |
let bytesPerRow = originalImage.bytesPerRow | |
let colorSpace = originalImage.colorSpace ?? CGColorSpace(name: CGColorSpace.sRGB)! | |
let bitmapInfo = originalImage.bitmapInfo | |
// Create an empty context with the same parameters as the original image | |
guard let context = CGContext(data: nil, |
This file contains 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
SELECT * FROM ( | |
SELECT | |
`dutchess_tax_roll`.`parcel_location_address`, | |
`dutchess_tax_roll`.`primary_owner`, | |
`dutchess_tax_roll`.`street_address`, | |
`dutchess_tax_roll`.`loc_st_name`, | |
`dutchess_tax_roll`.`city_state_zip_code`, | |
levenshtein(`dutchess_tax_roll`.`parcel_location_address`, `dutchess_tax_roll`.`street_address`) as lev_distance | |
FROM `state_boe_active_012219` | |
RIGHT JOIN `dutchess_tax_roll` ON ( |
This file contains 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
SELECT | |
`dutchess_tax_roll`.`parcel_location_address`, | |
`dutchess_tax_roll`.`primary_owner`, | |
`dutchess_tax_roll`.`street_address`, | |
`dutchess_tax_roll`.`loc_st_name`, | |
`dutchess_tax_roll`.`city_state_zip_code` | |
FROM `state_boe_active_012219` | |
RIGHT JOIN `dutchess_tax_roll` ON ( | |
`dutchess_tax_roll`.`parcel_location_address` = `state_boe_active_012219`.`CUSTOM_STREET_ADDRESS` | |
) |
This file contains 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
SELECT | |
`dutchess_tax_roll`.`parcel_location_address`, | |
`dutchess_tax_roll`.`primary_owner`, | |
`dutchess_tax_roll`.`street_address`, | |
`dutchess_tax_roll`.`loc_st_name`, | |
`dutchess_tax_roll`.`city_state_zip_code` | |
FROM `state_boe_active_012219` | |
RIGHT JOIN `dutchess_tax_roll` ON ( | |
`dutchess_tax_roll`.`parcel_location_address` = `state_boe_active_012219`.`CUSTOM_STREET_ADDRESS` | |
) |
This file contains 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
UPDATE `state_boe_active_012219` | |
SET `state_boe_active_012219`.`CUSTOM_STREET_ADDRESS` = CONCAT(`state_boe_active_012219`.`RADDNUMBER`, ' ',`state_boe_active_012219`.`RSTREETNAME`) |
This file contains 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
SELECT * from `state_boe_012219` | |
WHERE | |
(`state_boe_012219`.`CLEANED_VOTER_HISTORY` LIKE '%GE16%') AND | |
(`state_boe_012219`.`CLEANED_VOTER_HISTORY` LIKE '%GE18%') AND | |
(`state_boe_012219`.`CLEANED_VOTER_HISTORY` NOT LIKE '%GE17%') |
This file contains 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
UPDATE `state_boe_012219` SET `state_boe_012219`.`CLEANED_VOTER_HISTORY` = 'GE18GE17GE16PP16GE12GE10GE08PP08GE06GE05GE04GE03GE02' WHERE `state_boe_012219`.`COUNTYVRNUMBER` = '918273'; | |
UPDATE `state_boe_012219` SET `state_boe_012219`.`CLEANED_VOTER_HISTORY` = 'GE18GE03GE02' WHERE `state_boe_012219`.`COUNTYVRNUMBER` = '817623'; |
This file contains 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
SELECT | |
`state_boe_012219`.`COUNTYVRNUMBER`, | |
`state_boe_012219`.`VOTER_HISTORY` | |
FROM `state_boe_012219` | |
WHERE (`state_boe_012219`.`STATUS` = 'ACTIVE') |
This file contains 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
CREATE TABLE `state_boe` ( | |
`LASTNAME` varchar(255) DEFAULT NULL, | |
`FIRSTNAME` varchar(255) DEFAULT NULL, | |
`MIDDLENAME` varchar(255) DEFAULT NULL, | |
`NAMESUFFIX` varchar(255) DEFAULT NULL, | |
`RADDNUMBER` varchar(255) DEFAULT NULL, | |
`RHALFCODE` varchar(255) DEFAULT NULL, | |
`RAPARTMENT` varchar(255) DEFAULT NULL, | |
`RPREDIRECTION` varchar(255) DEFAULT NULL, | |
`RSTREETNAME` varchar(255) DEFAULT NULL, |
This file contains 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
command regex jo 's/(.+)/po print(String(data: try! JSONSerialization.data(withJSONObject: %1, options: .prettyPrinted), encoding: .utf8 )!)/' | |
command regex jobj 's/(.+)/po [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:%1 options:nil error:nil] encoding:nil]/' |
NewerOlder