Skip to content

Instantly share code, notes, and snippets.

View xhluca's full-sized avatar
💭
🔨

Xing Han Lu xhluca

💭
🔨
View GitHub Profile
@xhluca
xhluca / mscoco_label_map.py
Last active August 27, 2021 19:00
Microsoft's Label Map for the COCO dataset, as a python dictionary. It maps the integer output into a string representing the object.
# https://gist.github.com/xhlulu/f7735970704b97fd0b72203628c1cc77
category_map = {
1: 'person',
2: 'bicycle',
3: 'car',
4: 'motorcycle',
5: 'airplane',
6: 'bus',
7: 'train',
@xhluca
xhluca / dash_template.css
Last active March 17, 2019 12:40
Dash template stylesheet
/*
Gist: https://gist.github.com/xhlulu/0acba79000a3fd1e6f552ed82edb8a64/
Production: https://cdn.rawgit.com/xhlulu/0acba79000a3fd1e6f552ed82edb8a64/raw/dash_template.css
Development: https://rawgit.com/xhlulu/0acba79000a3fd1e6f552ed82edb8a64/raw/dash_template.css
*/
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Banner
@xhluca
xhluca / dash_template.py
Last active January 25, 2022 08:25
Template of Dash app with preformatted CSS
import os
import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import numpy as np
import plotly.graph_objs as go
from dash.dependencies import Input, Output, State
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xhluca
xhluca / base-styles.css
Last active July 11, 2018 22:24
Dash App Template
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Grid
- Base Styles
- Typography
- Links
- Buttons
- Forms
- Lists
- Code
@xhluca
xhluca / custom-styles.css
Last active July 10, 2018 20:21
Dash App Template
/* Table of contents
––––––––––––––––––––––––––––––––––––––––––––––––––
- Banner
- Scalable Container
- Remove Undo
/* Banner
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.banner {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

App Name

This is a demo of the Dash interactive Python framework developed by Plotly.

Dash abstracts away all of the technologies and protocols required to build an interactive web-based application and is a simple and effective way to bind a user interface around your Python code. To learn more check out our documentation.

Try out the [demo app here](link to the demo app).

animated1

import os
# Replace with the name of your Dash app
# This will end up being part of the URL of your deployed app,
# so it can't contain any spaces, capitalizations, or special characters
#
# This name MUST match the name that you specified in the
# Dash App Manager
DASH_APP_NAME = 'dash-app-name'