├── server ├── __init__.py ├── core │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── admin.py │ ├── static │ │ ├── favicon.ico │ │ ├── css │ │ │ └── app.c9128dab.css │ │ ├── index.html │ │ ├── js │ │ │ ├── app.a6306686.js │ │ │ └── app.a6306686.js.map │ │ └── RedisLabs_Illustration.svg │ ├── apps.py │ ├── urls.py │ ├── views.py │ ├── templates │ │ └── index.html │ └── companies_redis.py ├── configuration │ ├── __init__.py │ ├── .env.example │ ├── urls.py │ ├── asgi.py │ ├── wsgi.py │ └── settings.py ├── index.py ├── manage.py └── companies_data.json ├── client ├── .browserslistrc ├── vue.config.js ├── babel.config.js ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── assets │ │ └── logo.png │ ├── plugins │ │ └── vuetify.js │ ├── main.js │ ├── App.vue │ └── components │ │ ├── RankSelectionModal.vue │ │ └── Example.vue ├── .gitignore ├── README.md ├── .eslintrc.js └── package.json ├── Procfile ├── docs ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── YTThumbnail.png └── screenshot001.png ├── images ├── django-python.png └── app_preview_image.png ├── requirements.txt ├── google-cloud-run ├── requirements.txt ├── build_script ├── app.json └── Dockerfile ├── .gitignore ├── docker_compose.yaml ├── app.json ├── now_build_staticfiles.sh ├── vercel.json ├── marketplace.json └── README.md /server/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/configuration/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /server/core/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /server/core/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /server/core/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /server/core/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /client/vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "transpileDependencies": [ 3 | "vuetify" 4 | ] 5 | } -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: python server/manage.py collectstatic --noinput; server/manage.py runserver 0.0.0.0:$PORT 2 | -------------------------------------------------------------------------------- /docs/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/docs/1.png -------------------------------------------------------------------------------- /docs/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/docs/2.png -------------------------------------------------------------------------------- /docs/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/docs/3.png -------------------------------------------------------------------------------- /docs/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/docs/4.png -------------------------------------------------------------------------------- /client/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /docs/YTThumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/docs/YTThumbnail.png -------------------------------------------------------------------------------- /docs/screenshot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/docs/screenshot001.png -------------------------------------------------------------------------------- /images/django-python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/images/django-python.png -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/client/public/favicon.ico -------------------------------------------------------------------------------- /client/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/client/src/assets/logo.png -------------------------------------------------------------------------------- /images/app_preview_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/images/app_preview_image.png -------------------------------------------------------------------------------- /server/core/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/server/core/static/favicon.ico -------------------------------------------------------------------------------- /client/src/plugins/vuetify.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Vuetify from 'vuetify/lib/framework'; 3 | 4 | Vue.use(Vuetify); 5 | 6 | export default new Vuetify({ 7 | }); 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.1 2 | Django==3.1.6 3 | django-cors-headers==3.7.0 4 | python-dotenv==0.15.0 5 | pytz==2021.1 6 | redis==3.5.3 7 | sqlparse==0.4.1 8 | whitenoise==5.2.0 9 | -------------------------------------------------------------------------------- /google-cloud-run/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.1 2 | Django==3.1.6 3 | django-cors-headers==3.7.0 4 | python-dotenv==0.15.0 5 | pytz==2021.1 6 | redis==3.5.3 7 | sqlparse==0.4.1 8 | whitenoise==5.2.0 9 | -------------------------------------------------------------------------------- /google-cloud-run/build_script: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euxo pipefail 3 | 4 | export PARENT_PATH=$(cd ../ && pwd) 5 | 6 | docker build -t ${IMAGE_URL} -f ${PARENT_PATH}/google-cloud-run/Dockerfile ${PARENT_PATH} -------------------------------------------------------------------------------- /server/configuration/.env.example: -------------------------------------------------------------------------------- 1 | DJANGO_DEBUG=False 2 | DJANGO_ALLOWED_HOSTS=* 3 | 4 | REDIS_URL=redis://127.0.0.1:6379/0 5 | REDIS_HOST=127.0.0.1 6 | REDIS_PORT=6379 7 | REDIS_DB=0 8 | REDIS_PASSWORD=12345 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### Python ### 2 | # Virtual enviroment 3 | venv/ 4 | 5 | ### Python ### 6 | # Byte-compiled / optimized / DLL files 7 | __pycache__/ 8 | *.py[cod] 9 | 10 | .DS_Store 11 | 12 | .env 13 | 14 | static_root/ 15 | 16 | -------------------------------------------------------------------------------- /client/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import vuetify from './plugins/vuetify'; 4 | 5 | Vue.config.productionTip = false 6 | 7 | new Vue({ 8 | vuetify, 9 | render: h => h(App) 10 | }).$mount('#app') 11 | -------------------------------------------------------------------------------- /server/index.py: -------------------------------------------------------------------------------- 1 | import os, sys 2 | 3 | from django.core.wsgi import get_wsgi_application 4 | 5 | sys.path.append(os.path.dirname(__file__)) 6 | 7 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'configuration.settings') 8 | 9 | app = get_wsgi_application() 10 | -------------------------------------------------------------------------------- /server/core/apps.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from django.apps import AppConfig 4 | from django.conf import settings 5 | 6 | from .companies_redis import RedisClient 7 | 8 | 9 | class CoreConfig(AppConfig): 10 | name = 'core' 11 | 12 | def ready(self): 13 | RedisClient().set_init_data() 14 | -------------------------------------------------------------------------------- /docker_compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | redis: 5 | image: redis:latest 6 | container_name: redis.redisleaderboard.docker 7 | restart: unless-stopped 8 | ports: 9 | - 127.0.0.1:${REDIS_PORT}:6379 10 | networks: 11 | - global 12 | networks: 13 | global: 14 | external: true 15 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /server/configuration/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from django.conf.urls import url, include 3 | from django.views.static import serve 4 | from django.conf import settings 5 | 6 | urlpatterns = [ 7 | path('', include('core.urls')), 8 | url(r'^static/(?P.*)$', serve, {'document_root': settings.STATIC_ROOT}) 9 | ] 10 | -------------------------------------------------------------------------------- /server/core/static/css/app.c9128dab.css: -------------------------------------------------------------------------------- 1 | [data-v-6d7466c0] .v-data-table>.v-data-table__wrapper>table>thead>tr>th{color:#444}[data-v-6d7466c0] .v-data-table{color:#212529;font-weight:500}#app{font-family:Noto Sans JP,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#2c3e50;margin-top:60px;background:#f4f4f4}pre{background:#f6f8fa;padding:3px 5px;display:inline} -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Django(python) Redis leader board", 3 | "description": "Show how the redis works with Django(python)", 4 | "repository": "https://github.com/", 5 | "logo": "https://redis.io/images/redis-white.png", 6 | "keywords": ["python", "py", "redis"], 7 | "addons": ["rediscloud:30"], 8 | "buildpacks": [ 9 | { 10 | "url": "heroku/python" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # client 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | yarn lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /client/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint' 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /server/configuration/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for configuration project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'configuration.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /server/configuration/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for configuration project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'configuration.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /now_build_staticfiles.sh: -------------------------------------------------------------------------------- 1 | # now_build_staticfiles.sh 2 | 3 | # Install Python 3.6 since it is missing in the Now build environment 4 | yum install -y https://centos6.iuscommunity.org/ius-release.rpm 5 | yum install -y python36u 6 | 7 | # Install pip 8 | curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py 9 | python3.6 get-pip.py 10 | 11 | # Install project requirements 12 | pip3 install -r google-cloud-run/requirements.txt 13 | 14 | # Build staticfiles 15 | python3.6 server/manage.py collectstatic 16 | -------------------------------------------------------------------------------- /google-cloud-run/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Django(python) Redis leader board", 3 | "description": "Show how the redis works with Django(python)", 4 | "repository": "https://github.com/", 5 | "logo": "https://redis.io/images/redis-white.png", 6 | "keywords": ["python", "py", "redis"], 7 | "build": { 8 | "skip": true 9 | }, 10 | "hooks": { 11 | "prebuild": { 12 | "commands": [ 13 | "echo 'build Dockerfile'", 14 | "bash build_script" 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /server/core/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from django.conf.urls import url 3 | 4 | from core import views 5 | 6 | urlpatterns = [ 7 | path('api/rank/update', views.UpdateCompanyView.as_view()), 8 | path('api/rank/reset', views.ResetInitDataView.as_view()), 9 | path('api/list/inRank', views.CompaniesRankView.as_view()), 10 | path('api/list/getBySymbol', views.GetBySymbolCompaniesView.as_view()), 11 | url(r'^api/list/(?Pall|top10|bottom10)', views.GetBySortKeyCompaniesView.as_view()), 12 | path('', views.index, name='index'), 13 | ] -------------------------------------------------------------------------------- /vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "name": "RedisRateLimitingPython", 4 | "builds": [{ 5 | "src": "server/index.py", 6 | "use": "@vercel/python", 7 | "config": { 8 | "maxLambdaSize": "25mb" 9 | } 10 | }, { 11 | "src": "now_build_staticfiles.sh", 12 | "use": "@vercel/static-build", 13 | "config": { 14 | "distDir": "server/static_root" 15 | } 16 | }], 17 | "routes": [{ 18 | "src": "/api/rank/(.*)", 19 | "dest": "server/index.py" 20 | }, 21 | { 22 | "src": "/api/list/(.*)", 23 | "dest": "server/index.py" 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /google-cloud-run/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use an official Python image. 2 | # https://hub.docker.com/_/python 3 | FROM python:3.9 4 | 5 | WORKDIR /usr/src/app/ 6 | 7 | RUN pwd 8 | 9 | COPY . . 10 | 11 | RUN pip install -r google-cloud-run/requirements.txt 12 | 13 | # Copy local code to the container image. 14 | 15 | # Service must listen to $PORT environment variable. 16 | # This default value facilitates local development. 17 | ARG REDIS_URL_ADDRESS 18 | 19 | ENV REDIS_URL=$REDIS_URL_ADDRESS 20 | ENV PORT 8080 21 | 22 | # Setting this ensures print statements and log messages 23 | # promptly appear in Cloud Logging. 24 | ENV PYTHONUNBUFFERED TRUE 25 | 26 | RUN python3 server/manage.py collectstatic 27 | 28 | CMD exec python3 server/manage.py runserver 0.0.0.0:$PORT -------------------------------------------------------------------------------- /server/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'configuration.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Redis-Leaderboard-Demo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build && mv ./dist ../server/core/static", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "core-js": "^3.6.5", 13 | "country-flags-svg": "^1.1.0", 14 | "vue": "^2.6.11", 15 | "vuetify": "^2.2.11" 16 | }, 17 | "devDependencies": { 18 | "@vue/cli-plugin-babel": "~4.5.0", 19 | "@vue/cli-plugin-eslint": "~4.5.0", 20 | "@vue/cli-service": "~4.5.0", 21 | "babel-eslint": "^10.1.0", 22 | "eslint": "^6.7.2", 23 | "eslint-plugin-vue": "^6.2.2", 24 | "sass": "^1.19.0", 25 | "sass-loader": "^8.0.0", 26 | "vue-cli-plugin-vuetify": "~2.0.9", 27 | "vue-template-compiler": "^2.6.11", 28 | "vuetify-loader": "^1.3.0" 29 | } 30 | } -------------------------------------------------------------------------------- /client/src/App.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | 28 | 45 | -------------------------------------------------------------------------------- /client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /server/core/views.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | from django.http import HttpResponse 4 | from django.views import View 5 | from django.shortcuts import render 6 | 7 | from .companies_redis import CompaniesRanks 8 | 9 | 10 | class CompaniesRankView(View): 11 | def get(self, request): 12 | start_index = request.GET.get('start') 13 | end_index = request.GET.get('end') 14 | return HttpResponse(CompaniesRanks().get_zrange(start_index, end_index), status=200) 15 | 16 | 17 | class GetBySortKeyCompaniesView(View): 18 | def get(self, request, sort_key): 19 | return HttpResponse(CompaniesRanks().get_ranks_by_sort_key(sort_key), status=200) 20 | 21 | 22 | class GetBySymbolCompaniesView(View): 23 | def get(self, request): 24 | symbols = request.GET.getlist('symbols[]') 25 | return HttpResponse(CompaniesRanks().get_ranks_by_symbols(symbols), status=200) 26 | 27 | 28 | class UpdateCompanyView(View): 29 | def get(self, request): 30 | amount = request.GET.get('amount') 31 | symbol = request.GET.get('symbol') 32 | CompaniesRanks().update_company_market_capitalization(amount, symbol) 33 | return HttpResponse(json.dumps({'success': True}), status=200) 34 | 35 | 36 | class ResetInitDataView(View): 37 | def get(self, request): 38 | CompaniesRanks().set_init_data() 39 | return HttpResponse(json.dumps({'success': True}), status=200) 40 | 41 | 42 | def index(request): 43 | context = {} 44 | return render(request, 'index.html', context) 45 | -------------------------------------------------------------------------------- /server/core/static/index.html: -------------------------------------------------------------------------------- 1 | Redis-Leaderboard-Demo
-------------------------------------------------------------------------------- /server/core/templates/index.html: -------------------------------------------------------------------------------- 1 | Redis-Leaderboard-Demo
-------------------------------------------------------------------------------- /marketplace.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_name": "Basic Redis leaderboard example in Python (Django)", 3 | "description": "Showcases how to implement leaderboard application in Python (Django)", 4 | "type": "Building Block", 5 | "contributed_by": "Redis", 6 | "repo_url": "https://github.com/redis-developer/basic-redis-leaderboard-demo-python", 7 | "preview_image_url": "https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/images/app_preview_image.png", 8 | "download_url": "https://github.com/redis-developer/basic-redis-leaderboard-demo-python/archive/master.zip", 9 | "hosted_url": "", 10 | "quick_deploy": "true", 11 | "deploy_buttons": [ 12 | { 13 | "heroku": "https://heroku.com/deploy?template=https://github.com/redis-developer/basic-redis-leaderboard-demo-python" 14 | }, 15 | { 16 | "vercel": "https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fredis-developer%2Fbasic-redis-leaderboard-demo-python&env=REDIS_ENDPOINT_URI,REDIS_PASSWORD&envDescription=REDIS_ENDPOINT_URI%20is%20required%20at%20least%20to%20connect%20to%20Redis%20clouding%20server" 17 | }, 18 | { 19 | "Google": "https://deploy.cloud.run/?git_repo=https://github.com/redis-developer/basic-redis-leaderboard-demo-python.git&dir=google-cloud-run" 20 | } 21 | ], 22 | "language": [ 23 | "Python" 24 | ], 25 | "redis_commands": [ 26 | "HSET", 27 | "ZADD", 28 | "ZREVRANGE", 29 | "ZRANGE", 30 | "ZREVRANGE", 31 | "ZSCORE", 32 | "ZINCRBY", 33 | "ZCOUNT" 34 | ], 35 | "redis_use_cases": [ 36 | "Leaderboard" 37 | ], 38 | "redis_features": [], 39 | "app_image_urls": [ 40 | "https://github.com/redis-developer/basic-redis-leaderboard-demo-python/blob/master/docs/screenshot001.png?raw=true" 41 | ], 42 | "youtube_url": "https://www.youtube.com/watch?v=zzinHxdZ34I", 43 | "special_tags": [], 44 | "verticals": [ 45 | "Gaming" 46 | ], 47 | "markdown": "https://raw.githubusercontent.com/redis-developer/basic-redis-leaderboard-demo-python/master/README.md" 48 | } -------------------------------------------------------------------------------- /client/src/components/RankSelectionModal.vue: -------------------------------------------------------------------------------- 1 | 63 | 64 | 131 | 132 | -------------------------------------------------------------------------------- /server/configuration/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for configuration project. 3 | Generated by 'django-admin startproject' using Django 3.1.6. 4 | For more information on this file, see 5 | https://docs.djangoproject.com/en/3.1/topics/settings/ 6 | For the full list of settings and their values, see 7 | https://docs.djangoproject.com/en/3.1/ref/settings/ 8 | """ 9 | 10 | import os 11 | from pathlib import Path 12 | from dotenv import load_dotenv 13 | 14 | from django.core.management.utils import get_random_secret_key 15 | 16 | 17 | # load dotenv config 18 | load_dotenv() 19 | 20 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 21 | BASE_DIR = Path(__file__).resolve().parent.parent 22 | 23 | 24 | # Quick-start development settings - unsuitable for production 25 | # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ 26 | 27 | # SECURITY WARNING: keep the secret key used in production secret! 28 | SECRET_KEY = get_random_secret_key() 29 | 30 | # SECURITY WARNING: don't run with debug turned on in production! 31 | DEBUG = os.getenv('DJANGO_DEBUG', False) 32 | 33 | ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', ['127.0.0.1', 'localhost', '.vercel.app', 'a.run.app', '.a.run.app', '.herokuapp.com']) 34 | 35 | CORS_ORIGIN_ALLOW_ALL = True 36 | 37 | # Application definition 38 | 39 | INSTALLED_APPS = [ 40 | 'corsheaders', 41 | 'django.contrib.admin', 42 | 'django.contrib.auth', 43 | 'django.contrib.contenttypes', 44 | 'django.contrib.sessions', 45 | 'django.contrib.messages', 46 | 'django.contrib.staticfiles', 47 | 'core.apps.CoreConfig' 48 | ] 49 | 50 | MIDDLEWARE = [ 51 | 'corsheaders.middleware.CorsMiddleware', 52 | 'django.middleware.common.CommonMiddleware', 53 | 'django.middleware.security.SecurityMiddleware', 54 | 'django.contrib.sessions.middleware.SessionMiddleware', 55 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 56 | 'django.contrib.messages.middleware.MessageMiddleware', 57 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 58 | ] 59 | 60 | ROOT_URLCONF = 'configuration.urls' 61 | 62 | TEMPLATES = [ 63 | { 64 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 65 | 'DIRS': [ 66 | os.path.join(BASE_DIR, 'templates'), 67 | ], 'APP_DIRS': True, 68 | 'OPTIONS': { 69 | 'context_processors': [ 70 | 'django.template.context_processors.debug', 71 | 'django.template.context_processors.request', 72 | 'django.contrib.auth.context_processors.auth', 73 | 'django.contrib.messages.context_processors.messages', 74 | ], 75 | }, 76 | }, 77 | ] 78 | 79 | WSGI_APPLICATION = 'configuration.wsgi.application' 80 | 81 | 82 | # Database 83 | # https://docs.djangoproject.com/en/3.1/ref/settings/#databases 84 | 85 | DATABASES = {} 86 | 87 | 88 | # Password validation 89 | # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators 90 | 91 | AUTH_PASSWORD_VALIDATORS = [ 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 100 | }, 101 | { 102 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 103 | }, 104 | ] 105 | 106 | # Internationalization 107 | # https://docs.djangoproject.com/en/3.1/topics/i18n/ 108 | 109 | LANGUAGE_CODE = 'en-us' 110 | 111 | TIME_ZONE = 'UTC' 112 | 113 | USE_I18N = True 114 | 115 | USE_L10N = True 116 | 117 | USE_TZ = True 118 | 119 | 120 | # Static files (CSS, JavaScript, Images) 121 | # https://docs.djangoproject.com/en/3.1/howto/static-files/ 122 | 123 | STATIC_URL = '/static/' 124 | STATICFILES_DIR = [ 125 | os.path.join(BASE_DIR, 'static') 126 | ] 127 | STATIC_ROOT = os.path.join(BASE_DIR, 'static_root') 128 | 129 | 130 | REDIS_LEADERBOARD = 'REDIS_LEADERBOARD' 131 | REDIS_PREFIX = 'leaderboard' 132 | 133 | REDIS_HOST = os.getenv('REDIS_HOST', '127.0.0.1') 134 | REDIS_PORT = os.getenv('REDIS_PORT', '6379') 135 | REDIS_DB = os.getenv('REDIS_DB', '0') 136 | REDIS_PASSWORD = os.getenv('REDIS_PASSWORD', None) 137 | REDIS_URL = os.environ.get('REDIS_URL', None) 138 | 139 | CSRF_COOKIE_HTTPONLY = False 140 | -------------------------------------------------------------------------------- /server/core/companies_redis.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | import enum 4 | import logging 5 | 6 | from django.conf import settings 7 | from redis import Redis, RedisError, ConnectionError 8 | 9 | logger = logging.getLogger(__name__) 10 | 11 | class RankSortKeys(enum.Enum): 12 | ALL = 'all' 13 | TOP10 = 'top10' 14 | BOTTOM10 = 'bottom10' 15 | 16 | 17 | class RedisClient: 18 | def __init__(self): 19 | try: 20 | if settings.REDIS_URL: 21 | self.redis_client = Redis.from_url( 22 | url=settings.REDIS_URL, 23 | decode_responses=True 24 | ) 25 | else: 26 | self.redis_client = Redis( 27 | host=settings.REDIS_HOST, 28 | port=settings.REDIS_PORT, 29 | password=settings.REDIS_PASSWORD, 30 | db=settings.REDIS_DB, 31 | decode_responses=True 32 | ) 33 | except RedisError: 34 | logger.error(f'Redis failed connection to {settings.REDIS_HOST}:{settings.REDIS_PORT}.') 35 | return 36 | 37 | def set_init_data(self): 38 | with open(os.path.join(settings.BASE_DIR, 'companies_data.json'), 'r') as init_data: 39 | companies = json.load(init_data) 40 | try: 41 | for company in companies: 42 | symbol = self.add_prefix_to_symbol(settings.REDIS_PREFIX, company.get('symbol').lower()) 43 | self.redis_client.zadd( 44 | settings.REDIS_LEADERBOARD, 45 | { 46 | symbol: company.get('marketCap') 47 | } 48 | ) 49 | 50 | self.redis_client.hset( 51 | symbol, 52 | 'company', 53 | company.get('company') 54 | ) 55 | self.redis_client.hset( 56 | symbol, 57 | 'country', 58 | company.get('country') 59 | ) 60 | except ConnectionError: 61 | if settings.REDIS_URL: 62 | error_message = f'Redis connection time out to {settings.REDIS_URL}.' 63 | else: 64 | error_message = f'Redis connection time out to {settings.REDIS_HOST}:{settings.REDIS_PORT}.' 65 | logger.error(error_message) 66 | return 67 | 68 | @staticmethod 69 | def add_prefix_to_symbol(prefix, symbol): 70 | return f"{prefix}:{symbol}" 71 | 72 | @staticmethod 73 | def remove_prefix_to_symbol(prefix, symbol): 74 | return symbol.replace(f'{prefix}:', '') 75 | 76 | 77 | class CompaniesRanks(RedisClient): 78 | def update_company_market_capitalization(self, amount, symbol): 79 | self.redis_client.zincrby(settings.REDIS_LEADERBOARD, amount, self.add_prefix_to_symbol(settings.REDIS_PREFIX, symbol)) 80 | 81 | def get_ranks_by_sort_key(self, key): 82 | sort_key = RankSortKeys(key) 83 | 84 | if sort_key is RankSortKeys.ALL: 85 | return self.get_zrange(0, -1) 86 | elif sort_key is RankSortKeys.TOP10: 87 | return self.get_zrange(0, 9) 88 | elif sort_key is RankSortKeys.BOTTOM10: 89 | return self.get_zrange(0, 9, False) 90 | 91 | def get_ranks_by_symbols(self, symbols): 92 | companies_capitalization = [ 93 | self.redis_client.zscore(settings.REDIS_LEADERBOARD, self.add_prefix_to_symbol(settings.REDIS_PREFIX, symbol)) 94 | for symbol in symbols 95 | ] 96 | companies = [] 97 | 98 | for index, market_capitalization in enumerate(companies_capitalization): 99 | companies.append([ 100 | self.add_prefix_to_symbol(settings.REDIS_PREFIX, symbols[index]), 101 | market_capitalization 102 | ]) 103 | 104 | return self.get_result(companies) 105 | 106 | def get_zrange(self, start_index, stop_index, desc=True): 107 | query_args = { 108 | 'name': settings.REDIS_LEADERBOARD, 109 | 'start': start_index, 110 | 'end': stop_index, 111 | 'withscores': True, 112 | 'score_cast_func': str, 113 | } 114 | 115 | if desc: 116 | companies = self.redis_client.zrevrange(**query_args) 117 | else: 118 | companies = self.redis_client.zrange(**query_args) 119 | 120 | return self.get_result(companies, start_index, desc) 121 | 122 | def get_result(self, companies, start_index=0, desc=True): 123 | start_rank = int(start_index) + 1 if desc else (len(companies) - start_index) 124 | increase_factor = 1 if desc else -1 125 | results = [] 126 | 127 | for company in companies: 128 | symbol = company[0] 129 | market_cap = company[1] 130 | company_info = self.redis_client.hgetall(symbol) 131 | results.append( 132 | { 133 | 'company': company_info['company'], 134 | 'country': company_info['country'], 135 | 'marketCap': market_cap, 136 | 'rank': start_rank, 137 | 'symbol': self.remove_prefix_to_symbol(settings.REDIS_PREFIX, symbol) 138 | } 139 | ) 140 | start_rank += increase_factor 141 | 142 | return json.dumps(results) 143 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 | 7 | # Basic Redis Leaderboard Demo Python (Django) 8 | 9 | Show how the redis works with Python (Django). 10 | 11 | ![How it works](https://github.com/redis-developer/basic-redis-leaderboard-demo-python/raw/master/docs/screenshot001.png) 12 | 13 | # Overview video 14 | 15 | Here's a short video that explains the project and how it uses Redis: 16 | 17 | [![Watch the video on YouTube](https://github.com/redis-developer/basic-redis-leaderboard-demo-python/raw/master/docs/YTThumbnail.png)](https://www.youtube.com/watch?v=zzinHxdZ34I) 18 | 19 | ## Try it out 20 | 21 |

22 | 23 | Deploy to Heorku 24 | 25 |

26 | 27 |

28 | 29 | Deploy with Vercel 30 | 31 |

32 | 33 |

34 | 35 | Run on Google Cloud 36 | 37 | (See notes: How to run on Google Cloud) 38 |

39 | 40 | 41 | ## How to run on Google Cloud 42 | 43 |

44 | If you don't have redis yet, plug it in (https://spring-gcp.saturnism.me/app-dev/cloud-services/cache/memorystore-redis). 45 | After successful deployment, you need to manually enable the vpc connector as shown in the pictures: 46 |

47 | 48 | 1. Open link google cloud console. 49 | 50 | ![1 step](https://github.com/redis-developer/basic-redis-leaderboard-demo-python/raw/master/docs/1.png) 51 | 52 | 2. Click "Edit and deploy new revision" button. 53 | 54 | ![2 step](https://github.com/redis-developer/basic-redis-leaderboard-demo-python/raw/master/docs/2.png) 55 | 56 | 3. Add environment. 57 | 58 | ![3 step](https://github.com/redis-developer/basic-redis-leaderboard-demo-python/raw/master/docs/3.png) 59 | 60 | 4. Select vpc-connector and deploy application. 61 | 62 | ![4 step](https://github.com/redis-developer/basic-redis-leaderboard-demo-python/raw/master/docs/4.png) 63 | 64 | 65 | Problem with unsupported flags when deploying google cloud run button 66 | 67 | 68 | 69 | # How it works? 70 | ## 1. How the data is stored: 71 |
    72 |
  1. The AAPL's details - market cap of 2,6 triillions and USA origin - are stored in a hash like below: 73 |
     HSET "company:AAPL" symbol "AAPL" market_cap "2600000000000" country USA
    74 |
  2. 75 |
  3. The Ranks of AAPL of 2,6 trillions are stored in a ZSET. 76 |
    ZADD  companyLeaderboard 2600000000000 company:AAPL
    77 |
  4. 78 |
79 | 80 |
81 | 82 | ## 2. How the data is accessed: 83 |
    84 |
  1. Top 10 companies:
    ZREVRANGE companyLeaderboard 0 9 WITHSCORES
  2. 85 |
  3. All companies:
    ZREVRANGE companyLeaderboard 0 -1 WITHSCORES
  4. 86 |
  5. Bottom 10 companies:
    ZRANGE companyLeaderboard 0 9 WITHSCORES
  6. 87 |
  7. Between rank 10 and 15:
    ZREVRANGE companyLeaderboard 9 14 WITHSCORES
  8. 88 |
  9. Show ranks of AAPL, FB and TSLA:
    ZREVRANGE  companyLeaderBoard company:AAPL company:FB company:TSLA
  10. 89 | 90 |
  11. Adding 1 billion to market cap of FB company:
    ZINCRBY companyLeaderBoard 1000000000 "company:FB"
  12. 91 |
  13. Reducing 1 billion of market cap of FB company:
    ZINCRBY companyLeaderBoard -1000000000 "company:FB"
  14. 92 |
  15. Companies between 500 billion and 1 trillion:
    ZCOUNT companyLeaderBoard 500000000000 1000000000000
  16. 93 |
  17. Companies over a Trillion:
    ZCOUNT companyLeaderBoard 1000000000000 +inf
  18. 94 |
95 | 96 | 97 | ## How to run it locally? 98 | 99 | ### Development 100 | 101 | ``` 102 | git clone https://github.com/redis-developer/basic-redis-leaderboard-demo-python.git 103 | ``` 104 | 105 | ### Run docker compose or install redis manually 106 | 107 | Install docker (on mac: https://docs.docker.com/docker-for-mac/install/) 108 | 109 | ```sh 110 | docker network create global 111 | docker-compose up -d --build 112 | ``` 113 | 114 | #### Open directory server (cd server/configuration): copy .env.example to create .env (copy .env.example .env or cp .env.example .env). And provide the values for environment variables (if needed) 115 | - DJANGO_DEBUG: Django debug mode 116 | - DJANGO_ALLOWED_HOSTS: Allowed hosts 117 | - REDIS_URL: Redis server url 118 | - REDIS_HOST: Redis server host 119 | - REDIS_PORT: Redis server port 120 | - REDIS_DB: Redis server db index 121 | - REDIS_PASSWORD: Redis server password 122 | 123 | #### Run backend 124 | 125 | Install python, pip and venv (on mac: https://installpython3.com/mac/) 126 | 127 | Use python version: 3.9.1 128 | 129 | ``` sh 130 | python3 -m venv venv 131 | source ./venv/bin/activate 132 | pip3 install -r requirements.txt 133 | python3 server/manage.py collectstatic 134 | python3 server/manage.py runserver 135 | ``` 136 | 137 | #### Run frontend 138 | 139 | Static сontent runs automatically with the backend part. In case you need to run it separately, please see README in the [client](client) folder. 140 | -------------------------------------------------------------------------------- /client/src/components/Example.vue: -------------------------------------------------------------------------------- 1 | 136 | 137 | 266 | 267 | 268 | 277 | -------------------------------------------------------------------------------- /server/core/static/js/app.a6306686.js: -------------------------------------------------------------------------------- 1 | (function(e){function t(t){for(var n,i,l=t[0],c=t[1],s=t[2],u=0,d=[];uO?"$".concat((e/O).toFixed(3)," T"):e>L?"$".concat((e/L).toFixed(2)," B"):e>F?"$".concat((e/F).toFixed(1)," M"):"$ ".concat(e)},getCountryFlag:function(e){var t={"S. Arabia":"Saudi Arabia","S. Korea":"South Korea"},a=Object(u["findFlagUrlByCountryName"])(t[e]||e);return a}}},E=B,U=(a("1e58"),a("62ad")),j=a("a523"),N=a("8fea"),I=a("cd55"),$=a("49e2"),D=a("c865"),H=a("0393"),Z=a("0fd9"),M=Object(h["a"])(E,i,l,!1,null,"6d7466c0",null),G=M.exports;x()(M,{VBtn:_["a"],VCard:k["a"],VCol:U["a"],VContainer:j["a"],VDataTable:N["a"],VExpansionPanel:I["a"],VExpansionPanelContent:$["a"],VExpansionPanelHeader:D["a"],VExpansionPanels:H["a"],VIcon:w["a"],VRow:Z["a"],VSelect:R["a"]});var K={name:"App",components:{Example:G}},W=K,z=(a("034f"),a("7496")),J=Object(h["a"])(W,o,r,!1,null,null,null),Y=J.exports;x()(J,{VApp:z["a"]});var q=a("f309");n["a"].use(q["a"]);var Q=new q["a"]({});n["a"].config.productionTip=!1,new n["a"]({vuetify:Q,render:function(e){return e(Y)}}).$mount("#app")},"85ec":function(e,t,a){}}); 2 | //# sourceMappingURL=app.a6306686.js.map -------------------------------------------------------------------------------- /server/companies_data.json: -------------------------------------------------------------------------------- 1 | [{ 2 | "company": "Apple", 3 | "symbol": "AAPL", 4 | "marketCap": 2222000000, 5 | "country": "USA" 6 | }, 7 | { 8 | "company": "Saudi Aramco", 9 | "symbol": "2222.SR", 10 | "marketCap": 2046000000, 11 | "country": "S. Arabia" 12 | }, 13 | { 14 | "company": "Microsoft", 15 | "symbol": "MSFT", 16 | "marketCap": 1660000000, 17 | "country": "USA" 18 | }, 19 | { 20 | "company": "Amazon", 21 | "symbol": "AMZN", 22 | "marketCap": 1597000000, 23 | "country": "USA" 24 | }, 25 | { 26 | "company": "Alphabet (Google)", 27 | "symbol": "GOOG", 28 | "marketCap": 1218000000, 29 | "country": "USA" 30 | }, 31 | { 32 | "company": "Tesla", 33 | "symbol": "TSLA", 34 | "marketCap": 834170000, 35 | "country": "USA" 36 | }, 37 | { 38 | "company": "Facebook", 39 | "symbol": "FB", 40 | "marketCap": 762110000, 41 | "country": "USA" 42 | }, 43 | { 44 | "company": "Tencent", 45 | "symbol": "TCEHY", 46 | "marketCap": 742230000, 47 | "country": "China" 48 | }, 49 | { 50 | "company": "Alibaba", 51 | "symbol": "BABA", 52 | "marketCap": 642220000, 53 | "country": "China" 54 | }, 55 | { 56 | "company": "Berkshire Hathaway", 57 | "symbol": "BRK-A", 58 | "marketCap": 549580000, 59 | "country": "USA" 60 | }, 61 | { 62 | "company": "Samsung", 63 | "symbol": "005930.KS", 64 | "marketCap": 526630000, 65 | "country": "S. Korea" 66 | }, 67 | { 68 | "company": "TSMC", 69 | "symbol": "TSM", 70 | "marketCap": 511700000, 71 | "country": "Taiwan" 72 | }, 73 | { 74 | "company": "Visa", 75 | "symbol": "V", 76 | "marketCap": 474940000, 77 | "country": "USA" 78 | }, 79 | { 80 | "company": "Johnson & Johnson", 81 | "symbol": "JNJ", 82 | "marketCap": 421310000, 83 | "country": "USA" 84 | }, 85 | { 86 | "company": "Walmart", 87 | "symbol": "WMT", 88 | "marketCap": 414850000, 89 | "country": "USA" 90 | }, 91 | { 92 | "company": "JPMorgan Chase", 93 | "symbol": "JPM", 94 | "marketCap": 414610000, 95 | "country": "USA" 96 | }, 97 | { 98 | "company": "Kweichow Moutai", 99 | "symbol": "600519.SS", 100 | "marketCap": 392630000, 101 | "country": "China" 102 | }, 103 | { 104 | "company": "Mastercard", 105 | "symbol": "MA", 106 | "marketCap": 352760000, 107 | "country": "USA" 108 | }, 109 | { 110 | "company": "UnitedHealth", 111 | "symbol": "UNH", 112 | "marketCap": 344790000, 113 | "country": "USA" 114 | }, 115 | { 116 | "company": "Procter & Gamble", 117 | "symbol": "PG", 118 | "marketCap": 344140000, 119 | "country": "USA" 120 | }, 121 | { 122 | "company": "Nestlé", 123 | "symbol": "NSRGY", 124 | "marketCap": 333610000, 125 | "country": "Switzerland" 126 | }, 127 | { 128 | "company": "NVIDIA", 129 | "symbol": "NVDA", 130 | "marketCap": 328730000, 131 | "country": "USA" 132 | }, 133 | { 134 | "company": "LVMH", 135 | "symbol": "LVMUY", 136 | "marketCap": 327040000, 137 | "country": "France" 138 | }, 139 | { 140 | "company": "Walt Disney", 141 | "symbol": "DIS", 142 | "marketCap": 322900000, 143 | "country": "USA" 144 | }, 145 | { 146 | "company": "Roche", 147 | "symbol": "RHHBY", 148 | "marketCap": 293520000, 149 | "country": "Switzerland" 150 | }, 151 | { 152 | "company": "Home Depot", 153 | "symbol": "HD", 154 | "marketCap": 289700000, 155 | "country": "USA" 156 | }, 157 | { 158 | "company": "PayPal", 159 | "symbol": "PYPL", 160 | "marketCap": 284080000, 161 | "country": "USA" 162 | }, 163 | { 164 | "company": "Bank of America", 165 | "symbol": "BAC", 166 | "marketCap": 281410000, 167 | "country": "USA" 168 | }, 169 | { 170 | "company": "ICBC", 171 | "symbol": "1398.HK", 172 | "marketCap": 266230000, 173 | "country": "China" 174 | }, 175 | { 176 | "company": "Meituan-Dianping", 177 | "symbol": "MPNGF", 178 | "marketCap": 246210000, 179 | "country": "China" 180 | }, 181 | { 182 | "company": "Verizon", 183 | "symbol": "VZ", 184 | "marketCap": 239180000, 185 | "country": "USA" 186 | }, 187 | { 188 | "company": "Ping An Insurance", 189 | "symbol": "PNGAY", 190 | "marketCap": 237140000, 191 | "country": "China" 192 | }, 193 | { 194 | "company": "Comcast", 195 | "symbol": "CMCSA", 196 | "marketCap": 235810000, 197 | "country": "USA" 198 | }, 199 | { 200 | "company": "Adobe", 201 | "symbol": "ADBE", 202 | "marketCap": 232710000, 203 | "country": "USA" 204 | }, 205 | { 206 | "company": "Nike", 207 | "symbol": "NKE", 208 | "marketCap": 230710000, 209 | "country": "USA" 210 | }, 211 | { 212 | "company": "Netflix", 213 | "symbol": "NFLX", 214 | "marketCap": 225490000, 215 | "country": "USA" 216 | }, 217 | { 218 | "company": "Pinduoduo", 219 | "symbol": "PDD", 220 | "marketCap": 221680000, 221 | "country": "China" 222 | }, 223 | { 224 | "company": "Coca-Cola", 225 | "symbol": "KO", 226 | "marketCap": 219510000, 227 | "country": "USA" 228 | }, 229 | { 230 | "company": "Novartis", 231 | "symbol": "NVS", 232 | "marketCap": 214590000, 233 | "country": "Switzerland" 234 | }, 235 | { 236 | "company": "Toyota", 237 | "symbol": "TM", 238 | "marketCap": 212390000, 239 | "country": "Japan" 240 | }, 241 | { 242 | "company": "ASML", 243 | "symbol": "ASML", 244 | "marketCap": 212100000, 245 | "country": "Netherlands" 246 | }, 247 | { 248 | "company": "Intel", 249 | "symbol": "INTC", 250 | "marketCap": 211660000, 251 | "country": "USA" 252 | }, 253 | { 254 | "company": "L\" Oréal", 255 | "symbol": "OR.PA", 256 | "marketCap": 210160000, 257 | "country": "France" 258 | }, 259 | { 260 | "company": "Merck", 261 | "symbol": "MRK", 262 | "marketCap": 210060000, 263 | "country": "USA" 264 | }, 265 | { 266 | "company": "AT&T", 267 | "symbol": "T", 268 | "marketCap": 206790000, 269 | "country": "USA" 270 | }, 271 | { 272 | "company": "Pfizer", 273 | "symbol": "PFE", 274 | "marketCap": 206380000, 275 | "country": "USA" 276 | }, 277 | { 278 | "company": "Salesforce", 279 | "symbol": "CRM", 280 | "marketCap": 203770000, 281 | "country": "USA" 282 | }, 283 | { 284 | "company": "Thermo Fisher Scientific", 285 | "symbol": "TMO", 286 | "marketCap": 203040000, 287 | "country": "USA" 288 | }, 289 | { 290 | "company": "Pepsico", 291 | "symbol": "PEP", 292 | "marketCap": 199250000, 293 | "country": "USA" 294 | }, 295 | { 296 | "company": "Abbott Laboratories", 297 | "symbol": "ABT", 298 | "marketCap": 197810000, 299 | "country": "USA" 300 | }, 301 | { 302 | "company": "China Construction Bank", 303 | "symbol": "CICHY", 304 | "marketCap": 193710000, 305 | "country": "China" 306 | }, 307 | { 308 | "company": "Exxon Mobil", 309 | "symbol": "XOM", 310 | "marketCap": 192210000, 311 | "country": "USA" 312 | }, 313 | { 314 | "company": "Oracle", 315 | "symbol": "ORCL", 316 | "marketCap": 190830000, 317 | "country": "USA" 318 | }, 319 | { 320 | "company": "Cisco", 321 | "symbol": "CSCO", 322 | "marketCap": 190400000, 323 | "country": "USA" 324 | }, 325 | { 326 | "company": "AbbVie", 327 | "symbol": "ABBV", 328 | "marketCap": 189380000, 329 | "country": "USA" 330 | }, 331 | { 332 | "company": "BHP Group", 333 | "symbol": "BHP", 334 | "marketCap": 186040000, 335 | "country": "Australia" 336 | }, 337 | { 338 | "company": "Broadcom", 339 | "symbol": "AVGO", 340 | "marketCap": 181240000, 341 | "country": "USA" 342 | }, 343 | { 344 | "company": "CM Bank", 345 | "symbol": "3968.HK", 346 | "marketCap": 180460000, 347 | "country": "China" 348 | }, 349 | { 350 | "company": "QUALCOMM", 351 | "symbol": "QCOM", 352 | "marketCap": 177150000, 353 | "country": "USA" 354 | }, 355 | { 356 | "company": "Reliance Industries", 357 | "symbol": "RELIANCE.NS", 358 | "marketCap": 177100000, 359 | "country": "India" 360 | }, 361 | { 362 | "company": "Chevron", 363 | "symbol": "CVX", 364 | "marketCap": 175320000, 365 | "country": "USA" 366 | }, 367 | { 368 | "company": "Accenture", 369 | "symbol": "ACN", 370 | "marketCap": 175020000, 371 | "country": "Ireland" 372 | }, 373 | { 374 | "company": "Danaher", 375 | "symbol": "DHR", 376 | "marketCap": 172960000, 377 | "country": "USA" 378 | }, 379 | { 380 | "company": "Agricultural Bank of China", 381 | "symbol": "ACGBY", 382 | "marketCap": 168730000, 383 | "country": "China" 384 | }, 385 | { 386 | "company": "T-Mobile US", 387 | "symbol": "TMUS", 388 | "marketCap": 167630000, 389 | "country": "USA" 390 | }, 391 | { 392 | "company": "Prosus", 393 | "symbol": "PRX.VI", 394 | "marketCap": 165690000, 395 | "country": "Netherlands" 396 | }, 397 | { 398 | "company": "Costco", 399 | "symbol": "COST", 400 | "marketCap": 163860000, 401 | "country": "USA" 402 | }, 403 | { 404 | "company": "Novo Nordisk", 405 | "symbol": "NVO", 406 | "marketCap": 162260000, 407 | "country": "Denmark" 408 | }, 409 | { 410 | "company": "Medtronic", 411 | "symbol": "MDT", 412 | "marketCap": 161130000, 413 | "country": "Ireland" 414 | }, 415 | { 416 | "company": "McDonald", 417 | "symbol": "MCD", 418 | "marketCap": 160840000, 419 | "country": "USA" 420 | }, 421 | { 422 | "company": "Unilever", 423 | "symbol": "UL", 424 | "marketCap": 160420000, 425 | "country": "Netherlands" 426 | }, 427 | { 428 | "company": "Eli Lilly", 429 | "symbol": "LLY", 430 | "marketCap": 159180000, 431 | "country": "USA" 432 | }, 433 | { 434 | "company": "Nextera Energy", 435 | "symbol": "NEE", 436 | "marketCap": 158930000, 437 | "country": "USA" 438 | }, 439 | { 440 | "company": "Texas Instruments", 441 | "symbol": "TXN", 442 | "marketCap": 157110000, 443 | "country": "USA" 444 | }, 445 | { 446 | "company": "SAP", 447 | "symbol": "SAP", 448 | "marketCap": 156750000, 449 | "country": "Germany" 450 | }, 451 | { 452 | "company": "Tata", 453 | "symbol": "TCS.NS", 454 | "marketCap": 156350000, 455 | "country": "India" 456 | }, 457 | { 458 | "company": "Shell", 459 | "symbol": "RYDAF", 460 | "marketCap": 155950000, 461 | "country": "Netherlands" 462 | }, 463 | { 464 | "company": "AIA", 465 | "symbol": "AAIGF", 466 | "marketCap": 153920000, 467 | "country": "Hong Kong" 468 | }, 469 | { 470 | "company": "Union Pacific Corporation", 471 | "symbol": "UNP", 472 | "marketCap": 147450000, 473 | "country": "USA" 474 | }, 475 | { 476 | "company": "Honeywell", 477 | "symbol": "HON", 478 | "marketCap": 147370000, 479 | "country": "USA" 480 | }, 481 | { 482 | "company": "Jingdong Mall", 483 | "symbol": "JD", 484 | "marketCap": 146600000, 485 | "country": "China" 486 | }, 487 | { 488 | "company": "Shopify", 489 | "symbol": "SHOP", 490 | "marketCap": 145120000, 491 | "country": "Canada" 492 | }, 493 | { 494 | "company": "SoftBank", 495 | "symbol": "SFTBF", 496 | "marketCap": 143310000, 497 | "country": "Japan" 498 | }, 499 | { 500 | "company": "China Life Insurance", 501 | "symbol": "LFC", 502 | "marketCap": 142650000, 503 | "country": "China" 504 | }, 505 | { 506 | "company": "Linde", 507 | "symbol": "LIN", 508 | "marketCap": 141920000, 509 | "country": "UK" 510 | }, 511 | { 512 | "company": "Anheuser-Busch Inbev", 513 | "symbol": "BUD", 514 | "marketCap": 141810000, 515 | "country": "Belgium" 516 | }, 517 | { 518 | "company": "Bristol-Myers Squibb", 519 | "symbol": "BMY", 520 | "marketCap": 141210000, 521 | "country": "USA" 522 | }, 523 | { 524 | "company": "Amgen", 525 | "symbol": "AMGN", 526 | "marketCap": 138840000, 527 | "country": "USA" 528 | }, 529 | { 530 | "company": "Keyence", 531 | "symbol": "KYCCF", 532 | "marketCap": 137430000, 533 | "country": "Japan" 534 | }, 535 | { 536 | "company": "Wells Fargo", 537 | "symbol": "WFC", 538 | "marketCap": 137220000, 539 | "country": "USA" 540 | }, 541 | { 542 | "company": "United Parcel Service", 543 | "symbol": "UPS", 544 | "marketCap": 136910000, 545 | "country": "USA" 546 | }, 547 | { 548 | "company": "Morgan Stanley", 549 | "symbol": "MS", 550 | "marketCap": 136140000, 551 | "country": "USA" 552 | }, 553 | { 554 | "company": "Citigroup", 555 | "symbol": "C", 556 | "marketCap": 136090000, 557 | "country": "USA" 558 | }, 559 | { 560 | "company": "Astrazeneca", 561 | "symbol": "AZN", 562 | "marketCap": 135460000, 563 | "country": "UK" 564 | }, 565 | { 566 | "company": "Bank of China", 567 | "symbol": "BACHF", 568 | "marketCap": 132660000, 569 | "country": "China" 570 | }, 571 | { 572 | "company": "Philip Morris", 573 | "symbol": "PM", 574 | "marketCap": 129390000, 575 | "country": "USA" 576 | }, 577 | { 578 | "company": "Sony", 579 | "symbol": "SNE", 580 | "marketCap": 127620000, 581 | "country": "Japan" 582 | }, 583 | { 584 | "company": "Charter Communications", 585 | "symbol": "CHTR", 586 | "marketCap": 126790000, 587 | "country": "USA" 588 | }, 589 | { 590 | "company": "Starbucks", 591 | "symbol": "SBUX", 592 | "marketCap": 124020000, 593 | "country": "USA" 594 | }, 595 | { 596 | "company": "NTT Docomo", 597 | "symbol": "NTDMF", 598 | "marketCap": 122470000, 599 | "country": "Japan" 600 | } 601 | ] -------------------------------------------------------------------------------- /server/core/static/js/app.a6306686.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?0f16","webpack:///./src/components/Example.vue?5af1","webpack:///./src/App.vue?47bc","webpack:///./src/components/Example.vue?0ca5","webpack:///./src/components/RankSelectionModal.vue?dab9","webpack:///src/components/RankSelectionModal.vue","webpack:///./src/components/RankSelectionModal.vue?8d6e","webpack:///./src/components/RankSelectionModal.vue","webpack:///src/components/Example.vue","webpack:///./src/components/Example.vue?8849","webpack:///./src/components/Example.vue?baf6","webpack:///src/App.vue","webpack:///./src/App.vue?3359","webpack:///./src/App.vue?2667","webpack:///./src/plugins/vuetify.js","webpack:///./src/main.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","staticStyle","_v","staticRenderFns","model","callback","$$v","panel","expression","ACTION_LIST","method","companies","on","onUpdateRank","scopedSlots","_u","fn","ref","_g","rankForm","headers","loading","item","_s","rank","symbol","toUpperCase","company","formatUSD","marketCap","getCountryFlag","country","proxy","loadData","_e","_t","dialog","close","internalValue","$set","RANK_OP","AMOUNT_LIST","isValid","components","props","type","Array","watch","computed","op","amount","set","$emit","val","methods","component","VBtn","VCard","VCardActions","VCardText","VCardTitle","VDialog","VIcon","VSelect","VSpacer","RankSelectionModal","handler","immediate","created","usd","MILLION","VCol","VContainer","VDataTable","VExpansionPanel","VExpansionPanelContent","VExpansionPanelHeader","VExpansionPanels","VRow","Example","VApp","Vue","use","Vuetify","config","productionTip","vuetify","render","h","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrB,IAAO,GAGJK,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU6B,QAGnC,IAAIC,EAASF,EAAiB5B,GAAY,CACzCK,EAAGL,EACH+B,G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,EACA5E,GACA,EACA,KACA,KACA,MAIa,IAAiB,QAKhC,IAAkB,EAAW,CAAC6E,OAAA,O,gBCrB9BC,OAAIC,IAAIC,QAEO,UAAIA,OAAQ,ICD3BF,OAAIG,OAAOC,eAAgB,EAE3B,IAAIJ,OAAI,CACNK,UACAC,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,MACdC,OAAO,S","file":"js/app.a6306686.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Example.vue?vue&type=style&index=0&id=6d7466c0&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-app',{staticClass:\"mt-0\",attrs:{\"id\":\"app\"}},[_c('div',{staticStyle:{\"position\":\"absolute\",\"top\":\"-50px\",\"right\":\"0px\",\"width\":\"300px\"}},[_c('img',{attrs:{\"src\":\"https://redislabs.com/wp-content/uploads/2020/12/RedisLabs_Illustration_HomepageHero_v4.svg\"}})]),_c('div',{staticStyle:{\"height\":\"50px\"}}),_c('h1',{staticClass:\"text-center\",staticStyle:{\"color\":\"#444444\"}},[_vm._v(\"Redis Leaderboard Demo\")]),_c('div',{staticStyle:{\"height\":\"50px\"}}),_c('example')],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:\"example\"},[_c('v-row',{staticClass:\"mb-5\"},[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-expansion-panels',{attrs:{\"multiple\":\"\"},model:{value:(_vm.panel),callback:function ($$v) {_vm.panel=$$v},expression:\"panel\"}},[_c('v-expansion-panel',[_c('v-expansion-panel-header',[_vm._v(\"How it works?\")]),_c('v-expansion-panel-content',[_c('b',[_vm._v(\"1. How the data is stored:\")]),_c('ol',[_c('li',[_vm._v(\"The company data is stored in a hash like below: \"),_c('pre',[_vm._v(\"HSET \\\"company:AAPL\\\" symbol \\\"AAPL\\\" market_cap \\\"2600000000000\\\" country USA\")])]),_c('li',[_vm._v(\"The Ranks are stored in a ZSET. \"),_c('pre',[_vm._v(\"ZADD companyLeaderboard 2600000000000 company:AAPL\")])])]),_c('br'),_c('b',[_vm._v(\"2. How the data is accessed:\")]),_c('ol',[_c('li',[_vm._v(\"Top 10 companies: \"),_c('pre',[_vm._v(\"ZREVRANGE companyLeaderboard 0 9 WITHSCORES\")])]),_c('li',[_vm._v(\"All companies: \"),_c('pre',[_vm._v(\"ZREVRANGE companyLeaderboard 0 -1 WITHSCORES\")])]),_c('li',[_vm._v(\"Bottom 10 companies: \"),_c('pre',[_vm._v(\"ZRANGE companyLeaderboard 0 9 WITHSCORES\")])]),_c('li',[_vm._v(\"Between rank 10 and 15: \"),_c('pre',[_vm._v(\"ZREVRANGE companyLeaderboard 9 14 WITHSCORES\")])]),_c('li',[_vm._v(\"Show ranks of AAPL, FB and TSLA: \"),_c('pre',[_vm._v(\"ZSCORE companyLeaderBoard company:AAPL company:FB company:TSLA\")])]),_c('li',[_vm._v(\"Adding market cap to companies: \"),_c('pre',[_vm._v(\"ZINCRBY companyLeaderBoard 1000000000 \\\"company:FB\\\"\")])]),_c('li',[_vm._v(\"Reducing market cap to companies: \"),_c('pre',[_vm._v(\"ZINCRBY companyLeaderBoard -1000000000 \\\"company:FB\\\"\")])]),_c('li',[_vm._v(\"Companies over a Trillion: \"),_c('pre',[_vm._v(\"ZCOUNT companyLeaderBoard 1000000000000 +inf\")])]),_c('li',[_vm._v(\"Companies between 500 billion and 1 trillion: \"),_c('pre',[_vm._v(\"ZCOUNT companyLeaderBoard 500000000000 1000000000000\")])])])])],1)],1)],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"4\"}},[_c('v-select',{staticStyle:{\"background\":\"#FFF\"},attrs:{\"items\":_vm.ACTION_LIST,\"dense\":\"\",\"outlined\":\"\",\"hide-details\":\"\"},model:{value:(_vm.method),callback:function ($$v) {_vm.method=$$v},expression:\"method\"}})],1),_c('v-col',{staticClass:\"text-right\",attrs:{\"cols\":\"8\"}},[_c('rank-selection-modal',{attrs:{\"companies\":_vm.companies},on:{\"onUpdateRank\":_vm.onUpdateRank},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"color\":\"grey\",\"outlined\":\"\"}},on),[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-cog-outline\")]),_c('span',{staticStyle:{\"color\":\"#111\",\"text-transform\":\"initial\"}},[_vm._v(\"Update Rank\")])],1)]}}]),model:{value:(_vm.rankForm),callback:function ($$v) {_vm.rankForm=$$v},expression:\"rankForm\"}})],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-card',{staticClass:\"px-2\",staticStyle:{\"border-right\":\"10px\"}},[_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.companies,\"loading\":_vm.loading,\"disable-pagination\":true,\"hide-default-footer\":true},scopedSlots:_vm._u([{key:\"item.rank\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.rank)+\" \")]}},{key:\"item.company\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center py-2\"},[_c('div',[_c('img',{staticClass:\"mr-3 my-2\",attrs:{\"src\":(\"https://companiesmarketcap.com//img/company-logos/80/\" + (item.symbol.toUpperCase()) + \".png\"),\"width\":\"40\",\"height\":\"40\"}})]),_c('div',[_c('div',{staticStyle:{\"font-size\":\"1.1rem\"}},[_vm._v(_vm._s(item.company))]),_c('div',{staticClass:\"grey--text\",staticStyle:{\"font-size\":\"0.7rem\"}},[_vm._v(_vm._s(item.symbol.toUpperCase()))])])])]}},{key:\"item.marketCap\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{},[_vm._v(_vm._s(_vm.formatUSD(item.marketCap)))])]}},{key:\"item.country\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('div',[_c('img',{staticClass:\"mr-1\",attrs:{\"src\":_vm.getCountryFlag(item.country),\"width\":\"20\"}})]),_c('div',{},[_vm._v(_vm._s(item.country))])])]}},{key:\"no-data\",fn:function(){return [_c('span',[_vm._v(\" No Results Found. \")])]},proxy:true}])}),(_vm.method === 'paginate')?_c('v-btn',{attrs:{\"color\":\"primary\",\"block\":\"\"},on:{\"click\":_vm.loadData}},[_vm._v(\" Load next 10 \")]):_vm._e()],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"transition\":\"dialog-bottom-transition\",\"max-width\":\"400px\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_vm._t(\"activator\",null,null,{ on: on, attrs: attrs })]}}],null,true),model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c('v-card',[_c('v-card-title',[_c('v-spacer'),_c('v-icon',{attrs:{\"aria-label\":\"Close\"},on:{\"click\":_vm.close}},[_vm._v(\" mdi-close \")])],1),_c('v-card-text',[_c('div',{staticClass:\"headline text-center mb-4\"},[_vm._v(\" Select the menus below to update the rank of the companies \")]),_c('v-select',{attrs:{\"items\":_vm.companies,\"item-text\":\"company\",\"item-value\":\"symbol\",\"placeholder\":\"Select a company\",\"dense\":\"\",\"outlined\":\"\"},model:{value:(_vm.internalValue.symbol),callback:function ($$v) {_vm.$set(_vm.internalValue, \"symbol\", $$v)},expression:\"internalValue.symbol\"}}),_c('v-select',{attrs:{\"items\":_vm.RANK_OP,\"placeholder\":\"Add or Subtract\",\"dense\":\"\",\"outlined\":\"\"},model:{value:(_vm.internalValue.op),callback:function ($$v) {_vm.$set(_vm.internalValue, \"op\", $$v)},expression:\"internalValue.op\"}}),_c('v-select',{attrs:{\"items\":_vm.AMOUNT_LIST,\"placeholder\":\"Select Amount\",\"dense\":\"\",\"outlined\":\"\"},model:{value:(_vm.internalValue.amount),callback:function ($$v) {_vm.$set(_vm.internalValue, \"amount\", $$v)},expression:\"internalValue.amount\"}})],1),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{staticClass:\"mb-4\",attrs:{\"color\":\"primary\",\"disabled\":!_vm.isValid},on:{\"click\":_vm.onUpdateRank}},[_vm._v(\" Update \")])],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RankSelectionModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./RankSelectionModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./RankSelectionModal.vue?vue&type=template&id=67081f4c&\"\nimport script from \"./RankSelectionModal.vue?vue&type=script&lang=js&\"\nexport * from \"./RankSelectionModal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VDialog,VIcon,VSelect,VSpacer})\n","\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Example.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Example.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Example.vue?vue&type=template&id=6d7466c0&scoped=true&\"\nimport script from \"./Example.vue?vue&type=script&lang=js&\"\nexport * from \"./Example.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Example.vue?vue&type=style&index=0&id=6d7466c0&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6d7466c0\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VExpansionPanel } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanelContent } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanelHeader } from 'vuetify/lib/components/VExpansionPanel';\nimport { VExpansionPanels } from 'vuetify/lib/components/VExpansionPanel';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\ninstallComponents(component, {VBtn,VCard,VCol,VContainer,VDataTable,VExpansionPanel,VExpansionPanelContent,VExpansionPanelHeader,VExpansionPanels,VIcon,VRow,VSelect})\n","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=70837e76&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VApp } from 'vuetify/lib/components/VApp';\ninstallComponents(component, {VApp})\n","import Vue from 'vue';\nimport Vuetify from 'vuetify/lib/framework';\n\nVue.use(Vuetify);\n\nexport default new Vuetify({\n});\n","import Vue from 'vue'\nimport App from './App.vue'\nimport vuetify from './plugins/vuetify';\n\nVue.config.productionTip = false\n\nnew Vue({\n vuetify,\n render: h => h(App)\n}).$mount('#app')\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /server/core/static/RedisLabs_Illustration.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 288 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 324 | 325 | 326 | 328 | 331 | 332 | 333 | 334 | 336 | 339 | 340 | 341 | 343 | 346 | 347 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 358 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 370 | 371 | 372 | 374 | 377 | 378 | 379 | 381 | 383 | 384 | 385 | 386 | 387 | 388 | 390 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 402 | 403 | 404 | 406 | 409 | 410 | 411 | 414 | 417 | 419 | 421 | 424 | 427 | 430 | 432 | 435 | 436 | 437 | 438 | 439 | 440 | 442 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 454 | 455 | 457 | 460 | 461 | 462 | 485 | 493 | 501 | 502 | 503 | 504 | 505 | 507 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 543 | 544 | 545 | 547 | 550 | 551 | 552 | 553 | 555 | 558 | 559 | 560 | 562 | 565 | 566 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 577 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 597 | 600 | 601 | 602 | 622 | 623 | 624 | 625 | 626 | 627 | 629 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 641 | 642 | 643 | 645 | 648 | 649 | 650 | 654 | 661 | 663 | 664 | 670 | 671 | 672 | 673 | 674 | 675 | 677 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 713 | 714 | 715 | 717 | 720 | 721 | 722 | 723 | 725 | 728 | 729 | 730 | 732 | 735 | 736 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | --------------------------------------------------------------------------------