This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dash import Dash, dcc, html, Input, Output | |
app = Dash() | |
app.layout = html.Div([ | |
dcc.Dropdown( | |
id='dropdown1' # Dropdown id | |
options=[{'label': 'India', 'value': 'India'}, | |
{'label': 'Russia', 'value': 'Russia'}, | |
{'label': 'USA', 'value': 'USA'}], # Data to be shown in dropdown options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dash import Dash, dcc, html, Input, Output | |
app = Dash() | |
app.layout = html.Div([ | |
dcc.Dropdown( | |
options=[{'label': 'India', 'value': 'India'}, | |
{'label': 'Russia', 'value': 'Russia'}, | |
{'label': 'USA', 'value': 'USA'}], # Data to be shown in dropdown options | |
value='India', # Dropdown Default Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dash | |
import dash_html_components as html | |
import dash_core_components as dcc | |
import plotly.express as px | |
from dash.dependencies import Input, Output | |
app = dash.Dash() | |
df = px.data.iris() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.callback(Output(component_id='graph', component_property= 'figure'), | |
[Input(component_id='dropdown', component_property= 'value')]) | |
def graph_update(dropdown_value): | |
fig = px.scatter(df[df["species"]==dropdown_value], x="sepal_width", y="sepal_length") | |
fig.update_layout(title = 'Sapel Length and Width of Different Species', | |
xaxis_title = 'Sepal Width', | |
yaxis_title = 'Sepal Length') | |
return fig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = dash.Dash() | |
df = px.data.iris() | |
app.layout = html.Div([ | |
html.H1( | |
id = 'H1', | |
children = 'Styling using html components', | |
style = {'textAlign':'center', 'marginTop':40,'marginBottom':40} | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dash | |
from dash import html | |
from dash import dcc | |
import plotly.express as px |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install dash | |
pip install dash-html-components | |
pip install dash-core-components | |
pip install plotly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Home Automtion Using NodeMCU over a PHP Website | |
Visit: https://techzeero.com/iot-projects/home-automation-over-online-server-using-nodemcu-and-php-website | |
*/ | |
#include <ESP8266WiFi.h> | |
#include <ESP8266HTTPClient.h> | |
const char* ssid = "CHANGE WITH YOUR WIFI NAME"; | |
const char* password = "CHANGE WITH YOUR WIFI PASSWORD"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Arduino Arithmetic Operators | |
For more details, visit: https://techzeero.com/arduino-tutorials/arduino-arithmetic-operators/ | |
*/ | |
void setup() { | |
int a = 2; | |
int b = 3; | |
int result; | |
float result_fl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Arduino String Manipulation by Functions | |
For more details, visit: https://techzeero.com/arduino-tutorials/arduino-string-functionality/ | |
*/ | |
void setup() { | |
char str[] = "This is my string"; // create a string | |
char out_str[40]; // output from string functions placed here | |
int num; // general purpose integer | |
Serial.begin(9600); |
NewerOlder