Code Monkey home page Code Monkey logo

weather-milliseconds's Introduction

Experiment to render the weather forecast as fast as possible. Goal is sub 100ms. ~40 milliseconds if you're in NYC.

Set-up

python3 -m venv venv && source venv/bin/activate && pip3 install -r requirements.txt && FLASK_APP=app.py FLASK_DEBUG=1 python -m flask run --port=5001

Good resources

Production setup

# Use a screen
# [not needed after venv installed] sudo python3 -m venv venv
screen
source venv/bin/activate
sudo -H pip3 install -r requirements.txt
sudo FLASK_APP=app.py python3 -m flask run --port=5001

Ctrl a p to detatch from the screen

Production reset

(To find python processes:)
ps -ef | grep python
sudo kill -9 23826
("23826" is whatever the number is returned that you want to kill)
screen
sudo git pull
sudo python3 -m venv venv
source venv/bin/activate
sudo -H pip3 install -r requirements.txt
sudo FLASK_APP=app.py python3 -m flask run --port=5001

weather-milliseconds's People

Contributors

dependabot[bot] avatar jiwendi avatar juliannorton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

weather-milliseconds's Issues

Display the source (weather station or location) that the data is returning for

image

Right now, it just says "weather" in the H1. The solution to this ticket should so some indication as to where the source of the data is for. For example, if it's for "new york, ny" it should say that, or KNYC weather station, so that the data can be trusted and validated.

Current header:
https://github.com/JulianNorton/weather-milliseconds/blob/master/templates/index.html#L8

Current weather data source:
https://github.com/JulianNorton/weather-milliseconds/blob/master/app.py#L37

Make default location correctly KNYC

What's the current situation?

The weather is being returned for "Hoboken, NJ"

What do you recommend?

The weather should return from the weather station KNYC, 10025, which is New York.

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.