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
"""An example Ignition SCADA Gateway tag change event script that sends a simple JSON message to a flask | |
server when the production line starts and stops. The server runs alongside a tkinter window that | |
will shrink to a small semi-transparent button when the line starts running. The computer this runs | |
on was there for a reason, so obscuring the existing software was not an option. If there is an | |
unsaved defect record active in the window, it will pop back up when they stop so that they can update | |
it when finished. | |
When this was set up we hadn't gotten the WebDev module yet, so when the operator creates a new defect | |
record, by pushing the button, the available tag data is read directly from the Postgres/Timescale | |
database with the tag history using the psycopg2 library. |
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
"""Example flask endpoint for receiving http requests from Ignition (or whatever). | |
Based on https://github.com/HelloMorrisMoss/mahlo_popup | |
Python version == 3.8.4 | |
Flask==2.0.2 | |
Flask-RESTful==0.3.9 | |
""" | |
from flask import Flask | |
from flask_restful import reqparse, Resource, Api |
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 pandas as pd | |
ejemplo_datos = {'id': (123, 456, 789), | |
'list_column': ['Animation, Comedy, Family', 'Action, Drama', 'Documentary, Nature']} | |
df = pd.DataFrame.from_dict(ejemplo_datos) | |
df.set_index('id', inplace=True) | |
# crear un conjunto de todos los géneros |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.