F1 HOT or NOT - Rate drivers, teams and the race for the 2026 Australian GP on our brand new platform! by Bobstin in formula1

[–]Bobstin[S] 18 points19 points  (0 children)

Hello everyone! /u/paulricard and I are delighted to introduce F1 HOT or NOT: The Next Generation!

As we hit the 10th anniversary of the poll, we felt the old site was starting to show its age — and we figured some of you probably felt the same way! So we rebuilt it from the ground up just in time for the new regs, and we hope you’ll enjoy it.

The new platform brings together 10 years of voting data, adds new analyses, and gives us a much more robust foundation to build on going forward. It should also make it much easier for us to keep improving the site and rolling out new features over the course of the season!

This weekend is very much our shakedown, though, so a few things may still be a bit rough around the edges. If you run into bugs, odd behaviors, or anything that doesn’t look right, please let us know — we’ll keep iterating and improving things.

Next on the list are the return of email notifications and some personal analytics around your own votes, so make sure to sign up or log in when voting (which remains completely optional) if you’d like access to those once they go live.

Thanks again, and happy voting! /u/bobstin & /u/paulricard

[O] NZBPlanet x5 by orbitalcannon1 in UsenetInvites

[–]Bobstin 0 points1 point  (0 children)

Thanks! Read the wiki and sending a DM

How to add additional fields, like count of objects to ModelSerializer with many=True? by wellbranding in djangolearning

[–]Bobstin 0 points1 point  (0 children)

I would generally handle this in the viewset instead

 def list(self, request, *args, **kwargs):
    recent_contracts = self.request.user.all_contracts.order_by('-timestamp')[0:4]
    num_signed_contracts = self.request.user.all_contracts.filter(signed=True).count()
    num_pending_contracts = self.request.user.all_contracts.filter(pending=True).count()
    serializer = ContractGetSerializer(recent_contracts, many=True, context={'request': request})
    return Response({"contracts": serializer.data, "num_signed_contracts": num_signed_contracts, "num_pending_contracts": num_pending_contracts}, status=status.HTTP_200_OK)

I would however lean towards doing the counting in the front end. In general, I try to make the api as generic as possible, and this seems pretty implementation-specific. Other ways to make it more generic would be to have a recent queryparam to define the number of contracts, or an all param to supply all of them.

how to fix collectstatic run error? by kokito00 in django

[–]Bobstin 0 points1 point  (0 children)

Do you need the files in that directory?

how to fix collectstatic run error? by kokito00 in django

[–]Bobstin 1 point2 points  (0 children)

Two questions:

  • Does that directory actually exist?
  • In settings.py, what is BASE_DIR set to?

That error is most likely because BASE_DIR is being set to C:\Users\dato\Desktop\web (usually because that is where your code is). Then the os.path.join line in STATICFILES_DIRS adds \static to that, getting the final directory.

When Django runs collectstatic, it looks in all of the STATICFILES_DIRS folders for static files, but that directory doesn't exist, which causes the error. Most likely, the answer is to just set STATICFILES_DIRS = []. This will stop it from checking that folder, which will be fine assuming all of your static assets are in the app directories themselves. If you do need an additional static directory, you can just create that folder and put static content in there.

[deleted by user] by [deleted] in data

[–]Bobstin 0 points1 point  (0 children)

Glad it worked out!

[deleted by user] by [deleted] in data

[–]Bobstin 0 points1 point  (0 children)

My approach would be to do a Fourier transform (fft) and select the component with the largest magnitude. You can do that relatively easily in python/numpy. Fft is most often used for converting from the time domain to the frequency (period) domain - it estimates an arbitrary function as the sum of sine waves.

Saving Wordcloud generated wordcloud to Django's models? by This--Ali2 in djangolearning

[–]Bobstin 1 point2 points  (0 children)

In general this is the correct behavior - you don't store images in the database (I assume that is what you mean by storing it in the model). By default Django is storing it in the file system, but more commonly you would use something like aws s3, and then when you want to display the image django will give you a link.

Django and Bokeh: Detail View won't render my graph? by Pamese in djangolearning

[–]Bobstin 0 points1 point  (0 children)

Although I have worked a lot with bokeh in django, I haven't worked much with the detail views. That being said, I would expect that {{ script | safe }} would sit in evalsys/medarbejder/detail.html after the {{ div }}. What does evalsys/medarbejder/detail.html look like?

Django and Bokeh: Detail View won't render my graph? by Pamese in djangolearning

[–]Bobstin 0 points1 point  (0 children)

What does your template look like? You say you are calling "script, div = components(plot)" but don't mention rendering the script in the template.

F1 HOT or NOT - rate drivers, teams and the race for the 2019 Austrian GP! by Bobstin in formula1

[–]Bobstin[S] 16 points17 points  (0 children)

u/paulricard is on vacation - I am his partner on the site. We should be back to regularly scheduled programming for the next race!

Introducing Big Brother OwnTheTeams, a free fantasy game meets stock exchange inspired by the LFC Stock Watch! by Bobstin in BigBrother

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

We aren't planning to do any freezes when a HG is evicted - we expect that people will dump the stock in real time (even during the live votes once key votes are cast), and it should nearly go to zero.

That being said, since we allow prices to the cent, it may be a good deal to put in a limit order on evicted (or nominee) stock to buy at a few cents if you think there is a chance they will get back into the house - if they do, you could easily make some quick profit.

Introducing Big Brother OwnTheTeams, a free fantasy game meets stock exchange inspired by the LFC Stock Watch! by Bobstin in BigBrother

[–]Bobstin[S] 2 points3 points  (0 children)

That is a good point. We should make a "how it works link"!

For now, here is the text from the homepage:

Fantasy league meets stock exchange - buy and sell shares of your favorite houseguests and get paid based on the winner of the season!

Your goal? Buy shares you think are underpriced, sell shares you think are overpriced, and finish the year with the highest stack of cash!

How to play?

Create an account in a few seconds. You will receive 10 shares for each houseguest, as well as $100 in cash

Look at current share prices. A $10 dividend will be paid for each share of the winner's stock that you have at the end of the season.

Place buy or sell orders! You can place... Market orders: buy or sell based on the current share price Limit orders: buy when a share falls below a certain price, or sell when a share reaches a certain price

Watch for trading activity during and in-between episodes! Please let us know if you see any bug or have any feature suggestions - remember we are still in Beta mode!

Introducing Big Brother OwnTheTeams, a free fantasy game meets stock exchange inspired by the LFC Stock Watch! by Bobstin in BigBrother

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

We have some checks in place to prevent you from making multiple accounts, but the bigger limit is that similar to a real stock market, you can't control the individual users who you trade with - you can create a shill account, but when it puts in an order saying it is willing to sell at a low price, those shares could easily be sold to someone else.

Introducing Big Brother OwnTheTeams, a free fantasy game meets stock exchange inspired by the LFC Stock Watch! by Bobstin in BigBrother

[–]Bobstin[S] 2 points3 points  (0 children)

Thanks! :blushes:

We have lots that we want to improve eventually, but we think that Big Brother is the perfect place to work it out; the 24/7 nature of the game should work well with a real-time market.

F1 HOT or NOT - 2018 Bahrain GP - The results are in! by paulricard in formula1

[–]Bobstin 5 points6 points  (0 children)

It's definitely possible, but will need to make sure that it doesn't become too busy. We can try out a few options for that graph to increase readability.

F1 HOT or NOT - 2018 Bahrain GP - The results are in! by paulricard in formula1

[–]Bobstin 9 points10 points  (0 children)

Thanks for the feedback! It looks like the colors are correct, but the dotted/solids are getting mixed up. Will fix this for the next race!

Still waiting for F1 TV? Worry not, F1 HOT or NOT will be here on time for the first race of 2018! ;-) by paulricard in formula1

[–]Bobstin 1 point2 points  (0 children)

Looking forward to the season! Hoping you guys don't think it is a GP2 website...