Flask apps are bound to port 5000 by default. To bind it to port 80, you would need to change the port as follows:
if __name__ == '__main__':
app.run(host='0.0.0.0', port=80, debug=True)And to run it:
Flask apps are bound to port 5000 by default. To bind it to port 80, you would need to change the port as follows:
if __name__ == '__main__':
app.run(host='0.0.0.0', port=80, debug=True)And to run it:
| # See official docs at https://dash.plotly.com | |
| # pip install dash pandas | |
| from dash import Dash, dcc, html, Input, Output | |
| import plotly.express as px | |
| import pandas as pd | |
| df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv') |
The instructions are based on this answers.ros.org thread.
You may need the latest pip, follow the official instructions.
Install bloom:
| #ifndef SIMPLE_SPINLOCK_H | |
| #define SIMPLE_SPINLOCK_H | |
| #include <atomic> | |
| class Spinlock | |
| { | |
| public: | |
| Spinlock() | |
| { |
| #include <boost/thread.hpp> | |
| #include <iostream> | |
| using namespace std; | |
| void ThreadFunction() | |
| { | |
| int counter = 0; | |
| for(;;) |
| #!/usr/bin/env bash | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt update | |
| sudo update-alternatives --remove-all gcc | |
| sudo update-alternatives --remove-all g++ | |
| sudo apt-get install -y gcc-4.8 g++-4.8 gcc-4.9 g++-4.9 gcc-5 g++-5 gcc-6 g++-6 gcc-7 g++-7 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 |
| // This sketch should fix a "bricked" Arduino Zero board due to a bug in "Burn bootloader" command. | |
| // For more information see: https://github.com/arduino/ArduinoCore-samd/issues/137 | |
| // **IMPORTANT**: After running the sketch, you must power cycle the board. | |
| // This code is freely inspired from Atmel Application Note: | |
| // http://atmel.force.com/support/articles/en_US/FAQ/SAMD20-SAMD21-Programming-the-fuses-from-application-code | |
| void setup() { | |
| Serial.begin(115200); |
| #!/usr/bin/env python | |
| from base64 import b64decode | |
| from flask import Flask, current_app | |
| from flask_sqlalchemy import SQLAlchemy | |
| from flask_presst import PresstApi, ModelResource | |
| from flask_presst.principal import PrincipalResource | |
| from flask.ext.principal import UserNeed, RoleNeed |
| # Last updated May, 2024 for Apple silicon Macs | |
| # Install Homebrew if you don't already have it: https://brew.sh | |
| # install nano from homebrew | |
| brew install nano nanorc | |
| # update your nanorc file | |
| echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc | |
| # close and re-open your terminal and you'll have syntax highlighting |
| #include <iostream> | |
| #include <hdf5.h> | |
| // Constants | |
| const char saveFilePath[] = "test.h5"; | |
| const hsize_t ndims = 2; | |
| const hsize_t ncols = 3; | |
| int main() |