This file contains hidden or 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
| # give permissions to execute file: chmod +x install_cubic.sh | |
| # execute file ./install_cubic.sh | |
| echo Installing CUBIC..... | |
| sudo apt-add-repository ppa:cubic-wizard/release -y | |
| sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6494C6D6997C215E | |
| sudo apt update && sudo apt install cubic -y | |
| echo Finished! |
This file contains hidden or 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 lisapi import create_app | |
| socketio, app = create_app() | |
| # socketio.run(app) | |
| if __name__ == "__main__": | |
| socketio.run(app) |
This file contains hidden or 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 os | |
| import config | |
| from flask import Flask | |
| from flask_migrate import Migrate | |
| from flask_login import LoginManager | |
| from flask_sqlalchemy import SQLAlchemy | |
| from flask_socketio import SocketIO, emit | |
| db = SQLAlchemy() | |
| migrate = Migrate() |
This file contains hidden or 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
| ["500px", "accessible-icon", "accusoft", "acquisitions-incorporated", "ad", "address-book", "address-card", "adjust", "adn", "adobe", "adversal", "affiliatetheme", "air-freshener", "airbnb", "algolia", "align-center", "align-justify", "align-left", "align-right", "alipay", "allergies", "amazon", "amazon-pay", "ambulance", "american-sign-language-interpreting", "amilia", "anchor", "android", "angellist", "angle-double-down", "angle-double-left", "angle-double-right", "angle-double-up", "angle-down", "angle-left", "angle-right", "angle-up", "angry", "angrycreative", "angular", "ankh", "app-store", "app-store-ios", "apper", "apple", "apple-alt", "apple-pay", "archive", "archway", "arrow-alt-circle-down", "arrow-alt-circle-left", "arrow-alt-circle-right", "arrow-alt-circle-up", "arrow-circle-down", "arrow-circle-left", "arrow-circle-right", "arrow-circle-up", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "arrows-alt", "arrows-alt-h", "arrows-alt-v", "artstation", "assistive-listening-systems", "asterisk" |
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Install Zabbix and Grafana | |
| # based on https://gist.github.com/ad-m/189273d73388e094293a35267d7301c3 | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. |
This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # based on https://gist.github.com/ad-m/189273d73388e094293a35267d7301c3 | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure(2) do |config| |
This file contains hidden or 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 re | |
| class Pessoa(): | |
| @staticmethod | |
| def validaCpf(cpf): | |
| if (len(cpf) == 11) and (re.match('[0-9]+', cpf)): | |
| return True | |
| else: | |
| return False |
This file contains hidden or 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
| pipeline { | |
| agent any | |
| stages { | |
| stage('build') { | |
| steps { | |
| echo 'Running build ...' | |
| } | |
| } | |
| stage('test') { | |
| steps { |
This file contains hidden or 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 flask import Flask, render_template_string | |
| app = Flask(__name__) | |
| @app.route('/', methods=['GET']) | |
| def home(): | |
| data = [ | |
| {'id': 1, 'name': 'Nicola', 'age': 17}, | |
| {'id': 2, 'name': 'Josh', 'age': 17}, |
This file contains hidden or 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 datetime import datetime as dt | |
| class Pessoa: | |
| def __init__(self, nome, cpf, data_nascimento): | |
| self.nome = nome | |
| self.cpf = cpf | |
| self.data_nascimento = data_nascimento | |
| class Funcionario(Pessoa): |