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
# Json init unique_deal_stage_names.json | |
{"Testados": "colors.LIGHT_GREEN", "Realizados": "colors.DEEP_ORANGE_400", "Liberados": "colors.LIGHT_GREEN", "Concluidos": "colors.RED"} | |
# My Modified Trello. (dd_personalizado.py) | |
import logging | |
import flet | |
from flet import ( | |
Page, | |
DragTarget, | |
Draggable, |
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 | |
from pandas import to_datetime | |
from datetime import datetime | |
import pytz | |
from sqlalchemy import create_engine, text, Column, update, insert, select, and_, distinct, func | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.orm.exc import NoResultFound | |
from sqlalchemy.orm import Session |
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
''' USO PEEWEE PARA GERAR MEUS DADOS DIRETAMENTE DO POSTGRES''' | |
''' MEUS MODELOS PODEM SER ABSTRAIDOS DO EXEMPLO ''' | |
from ntpath import join | |
from peewee import fn, JOIN | |
from models import Detalhe, Produto, Grupo, Familia, Unidade, Pessoas, Estoque, Codigos, Docitem, Comitem | |
import pandas as pd | |
from datetime import datetime | |
''' ABAIXO CRIO MINHA CONSULTA PARA USAR NOS GRÁFICOS ''' |
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 | |
from dash_html_components import Div, H1, P, H3 | |
from dash_core_components import Graph, Dropdown, Slider, Checklist | |
from dash.dependencies import Input, Output | |
from random import randint | |
import pandas as pd | |
app = Dash(__name__) |
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
# When referencing a table multiple times, we'll call Model.alias() to create | |
# a secondary reference to the table. | |
EstoqueAlias = Estoque.alias() | |
# Create a subquery that will calculate the maximum Post timestamp for each | |
# user. | |
subquery = (EstoqueAlias | |
.select( | |
EstoqueAlias.iddetalhe, | |
fn.MAX(EstoqueAlias.dtreferencia).alias('max_ts')) |
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
# Observando o Join na consulta abaixo pode observar que o nome das tabelas não se repetem | |
p = Estoque.select( | |
Detalhe.cdprincipal, | |
Detalhe.dsdetalhe, | |
Produto.stativo, | |
Grupo.nmgrupo, | |
Familia.dsfamilia, | |
Detalhe.vlprecocusto, |
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 kivymd.uix.button import MDFillRoundFlatButton, MDRaisedButton | |
from kivymd.font_definitions import theme_font_styles | |
from kivymd.uix.label import MDLabel | |
import json | |
from kivy.lang import Builder | |
from kivymd.app import MDApp | |
from kivymd.uix.boxlayout import MDBoxLayout | |
from kivymd import images_path | |
from kivymd.uix.expansionpanel import MDExpansionPanel, MDExpansionPanelOneLine |
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 kivymd.uix.dialog import MDDialog | |
from kivymd.uix.button import MDFlatButton | |
from kivy.properties import ListProperty | |
from kivy.properties import StringProperty | |
from kivy.uix.screenmanager import Screen | |
from kivymd.uix.card import MDCard | |
from kivy.uix.boxlayout import BoxLayout | |
from kivymd.uix.behaviors import TouchBehavior | |
from kivy.lang import Builder |
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 ast import Try | |
from peewee import * | |
from peewee import SqliteDatabase, Model, TextField, ForeignKeyField | |
import xmltodict | |
import glob, os | |
# Abre a base de dados que receberá as informações dos XML' | |
database = SqliteDatabase('/home/elias/Área de Trabalho/notas_emissor/NfEasy2.db') | |
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
# A primeira coisa que você deve fazer é criar seu ambiente virtual. | |
# Quer saber como? Assista nosso segundo vídeo desta playlist. | |
# Ambiente de desenvolvimento VirtualEnv: | |
# https://www.youtube.com/watch?v=OR0gACGD0-Q | |
source kivy_venv/bin/activate | |
# Em seguida instalaremos a biblioteca Pyrebase | |
pip3 install pyrebase |
NewerOlder