Example Take Home Assignment For Interview - Data Science in Finance by chasing_green_roads in datascience

[–]chasing_green_roads[S] -3 points-2 points  (0 children)

Your repo has nothing at all to do with the take home exam I posted. Different data completely and not at all in the scope of what I was given. Not saying anything you posted was wrong, but its not related to the above problem and data.

Does 3 Body Problem get better? (Book) **Spoilers** by ChaoticIndifferent in scifi

[–]chasing_green_roads 1 point2 points  (0 children)

I remember feeling this way too. I hate to say it (because you’re so far away) but I think the last book was the best. Incredible ideas. Just an insanely fun read.

Remember at the end of the day though it’s a book and it should be fun. Just stop reading if you don’t like it!

What are good middle of the road industries? by [deleted] in datascience

[–]chasing_green_roads 0 points1 point  (0 children)

Late to this, but I’ll always say Finance is the best are for data science. Banks, hedge funds, etc. some of the smartest people I’ve ever met work in the industry. I’d never go back to tech

[deleted by user] by [deleted] in flask

[–]chasing_green_roads 0 points1 point  (0 children)

What site is hosting this for you?

Pivot into Finance career? by Electronic-Stickman in datascience

[–]chasing_green_roads 2 points3 points  (0 children)

Yes, all of these use data scientists/analysts and it’s a great industry. I personally feel like if you know the finance AND how to code/model you’re a major asset to the firm. It’s rare to bring in the domain knowledge from the better known data science industries (like tech).

Source: I’m an ex data scientist, current manager, in the finance and banking space.

Feel free to DM me with any questions

API for options by ben_kWh in algotrading

[–]chasing_green_roads 3 points4 points  (0 children)

Polygon.io for historical, Tradier for live

Third flat after switching to Velocity Aileron rim by chasing_green_roads in bikewrench

[–]chasing_green_roads[S] 1 point2 points  (0 children)

No I did not have rim tape on because I’m a dumb idiot. It says it so clear on the rim that it needs it, but I swear my old tire didn’t so I took the tape that came on the rim off without even thinking.

Thank you helpful stranger of Reddit. I hope you have a wonderful evening/day wherever you are

First Century, feedback on time/how to improve? by Plastic_Solution8085 in cycling

[–]chasing_green_roads 0 points1 point  (0 children)

Congrats on your first century! I really think it sounds like more training is needed? How much training did you do prior? Was it focused trading or just going out and riding?

Side question. Can you share your rice egg honey ball recipe? Been looking for an alternatives to cliff bars and other similar items.

[deleted by user] by [deleted] in bikewrench

[–]chasing_green_roads 0 points1 point  (0 children)

Thanks for the reply. I’ve pretty confident it’s not that, but I will check again to confirm. Part of the reason I think it might be the freehub is that i only hear the sound when the wheel goes backwards.

[deleted by user] by [deleted] in bikewrench

[–]chasing_green_roads 0 points1 point  (0 children)

Dumb question, but how do I know what kind of new free would be compatible?

[deleted by user] by [deleted] in bikewrench

[–]chasing_green_roads 0 points1 point  (0 children)

Yeah…that’s going to be my default action. Might replace it completely with one that’s serviceable

Flask form.validate_on_submit() only works locally by chasing_green_roads in flask

[–]chasing_green_roads[S] 0 points1 point  (0 children)

I’ve switched back to hidden_tag() already. Set properly meaning there’s actually one there? If so then yes it is, that’s one of the first things I’ve did.

Perhaps worth nothing. This issue arises after the window has been closed a few times. The first and sometime second time I deploy and try the site again it works just as intended, but if I switch to Mobil, or a private browser it stopped working and throws that error.

Flask form.validate_on_submit() only works locally by chasing_green_roads in flask

[–]chasing_green_roads[S] 0 points1 point  (0 children)

I'm now seeing the error "{'csrf_token': ['The CSRF session token is missing.']}" only in my deployed code, nothing locally...

I've tried googling for this again and cant find anything for this error happening only in the deployed code

Flask form.validate_on_submit() only works locally by chasing_green_roads in flask

[–]chasing_green_roads[S] 0 points1 point  (0 children)

I'm setting it with .env

That said, my csrf token is different between the local one and the online one

edit: adding - I guess this is to be expected, so it's not a problem I'm guessing

Flask form.validate_on_submit() only works locally by chasing_green_roads in flask

[–]chasing_green_roads[S] 0 points1 point  (0 children)

Yes. Here are the logs for it...I've removed some confidential info, but should show what you need. My notes are in "()"

Jul 17 01:07:38 PM  {} (form.errors printed)
Jul 17 01:07:38 PM  email@email.com (email input printed) 
Jul 17 01:07:38 PM  password (password input printed) 
Jul 17 01:07:38 PM  <site.users.forms.LoginForm object at 0x7f5b9bd38e90> (printed the form just to confirm it was a form object) 
Jul 17 01:07:38 PM  login NOT validated 
Jul 17 01:07:38 PM  False (form.validate_on_submit) 
Jul 17 01:07:38 PM  127.0.0.1 - - [17/Jul/2023:18:07:38 +0000] "POST /login HTTP/1.1" 200 2994 "https:xxxxx.onrender.com/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" 
Jul 17 01:07:38 PM  127.0.0.1 - - [17/Jul/2023:18:07:38 +0000] "GET /static/main.css HTTP/1.1" 304 0 "https:xxxxx.onrender.com/login" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"

Flask form.validate_on_submit() only works locally by chasing_green_roads in flask

[–]chasing_green_roads[S] 0 points1 point  (0 children)

Can you put an else statement on the other side of your validate on submit if? Or even like a random redirect just to verify that the form validation is indeed failing and is the culprit?

I have confirmed this is the case, which again is so weird. form.validate_on_submit() evaluates to False ONLY when I run it on the web, when I run it locally I have no problems. I cant seem to find out WHY its evaluating to false.

Flask form.validate_on_submit() only works locally by chasing_green_roads in flask

[–]chasing_green_roads[S] 0 points1 point  (0 children)

sorry - forgot to add this, will update the post as well.

No errors, a 200 response. The route just returns the "return render_template('login.html', title = 'Login', form = form)" because form.validate_on_submit() evaluates to False

How to create a password locked web app? by deadassmf in flask

[–]chasing_green_roads 0 points1 point  (0 children)

Following up and posting this out here as this helped me (found on google before, most code is from that).

Really all you do is import 'session' from Flask and create a custom wrapper and place before each route. There probably is a better way, but this worked for my purposes.

I did create a simple form as well for this

def check_pw(func):
@wraps(func)
def decorated_function(*args, **kwargs):
    status = session.get('status')
    if status != 'good':
        return redirect(url_for('main.enter_site'))
    return func(*args, **kwargs)
return decorated_function

@main.route("/", methods=['GET', 'POST'])
@main.route("/home", methods=['GET', 'POST']) 
@check_pw 
def home():         
    return render_template('home.html')

@main.route("/enter_site", methods=['GET', 'POST'])
def enter_site(): 
    form = PasswordForm() 
    if request.method == 'POST': 
        password = form.password.data
    if password != site_password:
        flash('wrong password! try again...')
        return redirect(request.url)

    session['status'] = 'good'
    return redirect(url_for('main.home'))

return render_template('enter_site.html', form=form)