Building a personal data warehouse in Snowflake for fun and no profit
thomasdziedzic0.com
thomasdziedzic0.com
Given you posted at your calculated time of 11:00 UTC on a Sunday, will be interesting to see how it does. It’s at 13 right now.
Snowflake charges $2 per credit in compute costs on their standard plan and $40/TB/month in storage. See https://www.snowflake.com/pricing/ for more details. Since the beginning of my trial, I have used 9 credits and 40GB of storage. So I have used about (9 * 2) + ((40 / 1000) * 40) = $19.60 worth of resources so far. This isn't terrible but I must caution you that Snowflake costs could balloon pretty fast. That's why I also set up a resource monitor on my account to stop all warehouses when the number of credits reaches 20. https://docs.snowflake.com/en/user-guide/resource-monitors.h...
I would recommend if you were going to go my route, to setup resource monitors, and only use XSMALL warehouses which consume 1 credit / hour. Snowflake sizes warehouses in t-shirt sizes, and the credits consumed doubles each size up. So XSMALL = 1 credit per hour, SMALL = 2, MEDIUM = 4, LARGE = 8, XLARGE = 16, 2XLARGE = 32, 3XLARGE = 64 and 4XLARGE = 128.
Do you find the advice to reboot the VM after making a security change useful?
It will certainly work but from my understanding it should be able to change that setting and alter the users login such that you only need to logout and back in. Maybe I am mistaken?
I try very hard to avoid reboots - it may be distracting for a focused article like this - so curious what others think.
That was why the reboot was needed.
This is based on past experiences where I've configured a VM, then a year later needed to make changes but been terrified of a reboot because I can't remember if it's likely to keep working or not!
FYI that stock regexp is buggy and e.g. will match $42.36 which obviously isn't a symbol.
Indeed, symbols are tough enough to nail correctly e.g. people not including the $, symbols with periods, etc.
Offhand, I'd build a little neural net classifier (e.g. https://fasttext.cc/ ) and train this on a slew of example-posts that are/aren't about stonks. To get training data, use regexps and then run through them by hand (20+ per minute per hour = 1200/hour, or outsource to amazon mturk $0.25 per 10, incl verification = $30/1200). Also, there's probably easy ones you can classify 100% correctly with regexps, to increase the training set size.
I'm happy to help if you like.
with lead as (
select id, lead(id, 1) over (order by id) as lead_by_one
from gaps_table),
gaps as (
select id + 1 as start_gap,
lead_by_one - 1 as end_gap
from lead where lead_by_one - id > 1)
select generate_series(start_gap, end_gap) as missing_ids from gaps
So if Snowflake has a generating function similar to generate_series, it should do the trick.I could probably have written my own javascript udf equivalent of generate_series though.
Likewise, when calculating the correlations, that should be done on returns and not prices.
If I am wearing 100 shares, whether it went from $5 to $10 or $100 to $105, it's the same pnl.
Is this normal in AWS? On most systems I worked with it's not true, you just need to start a new session - a reboot is not necessary.
Unfortunately it doesn't have native support for code highlighting besides html/css/js. I ended up using prism.js https://prismjs.com/ to highlight my code. The graphs are just screenshots that I've uploaded as pictures.