GithubHelp home page GithubHelp logo

jeremylichtman / weather_guarantee Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 17 KB

Find out if the 680 News weather guarantee has been broken

License: GNU General Public License v3.0

PHP 100.00%

weather_guarantee's Introduction

weather_guarantee

Find out if the 680 News weather guarantee has been broken.

The Toronto news radio station, 680 News, has an ongoing contest where they guarantee the high temperature of the day, and if it is off by more than 3C, then the next day they pull a name from a set of entry tickets. The problem is that the winner then needs to call into the station (otherwise they continue adding to the pot as if nobody won), and there's no alert system (i.e. you have to be tuned into the station to know if the guarantee was broken).

The script in this repo scrapes the guaranteed high temp off of 680 News' website, and then grabs a "probable" (see below) high temp for the day off of the Environment Canada site. If the two differ by more than 3C, it outputs 'T'. Otherwise, 'F'. This script is obviously intended to be used chained to some other process (i.e. via a bash script, or some such), but could easily be modified to send an email alert instead.

Note: there's no way to cover off all of the possibilities in terms of weather conditions. If you run the script towards the end of the day, you can probably get the correct high of the day from Environment Canada, but it isn't clear whether that's the temp that 680 News is checking against. Also, temperatures can suddenly jump up and down, even in the evening, so it is completely possible that this will miss the true high of the day.

What I'm saying here is this: please do not consider this to be an infallible way of actually determining if the weather guarantee was broken. If you miss out on winning a prize as a result of relying on this, it is your problem, and in using this script (or any down the chain modification thereof), you are implicitly accepting that fact!!!

weather_guarantee's People

Contributors

jeremylichtman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.