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
| library("shiny") | |
| library("foreign") |
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
| """ | |
| ATTENTION: | |
| When using executemany with a list of tuples, the numbers representing the rows has to be strictly from 1 to the last. Or else it won't work. | |
| I really don't understand why. | |
| """ | |
| import cx_Oracle | |
| from parserFWF import getConfigDF | |
| HOTEL_CONFIG = getConfigDF() #dataframe |
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
| """ | |
| An example of using PyWin32 and the win32com library to interact | |
| Microsoft Excel from Python. | |
| This can be used instead of Visual Basic for Applications (VBA) | |
| (c) Michael Papasimeon | |
| """ | |
| import win32com.client |
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
| # | |
| # erpdatapivot.py: | |
| # Load raw EPR data, clean up header info and | |
| # build 5 pivot tables | |
| # | |
| import win32com.client as win32 | |
| win32c = win32.constants | |
| import sys | |
| import itertools | |
| tablecount = itertools.count(1) |
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
| # | |
| # conditionalformatting.py | |
| # Create two tables and apply Conditional Formatting | |
| # | |
| import win32com.client as win32 | |
| excel = win32.gencache.EnsureDispatch('Excel.Application') | |
| #excel.Visible = True | |
| wb = excel.Workbooks.Add() | |
| ws = wb.Worksheets('Sheet1') | |
| ws.Range("B2:K2").Value = [i for i in range(1,11)] |
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
| """Requires pypiwin32 - see installation instructions at https://github.com/mhammond/pywin32 | |
| """ | |
| import random | |
| import win32com.client | |
| # for other shape types, see MsoAutoShapeTypeEnumeration: | |
| # https://msdn.microsoft.com/en-us/vba/office-shared-vba/articles/msoautoshapetype-enumeration-office | |
| SHAPE_OVAL = 9 | |
| # for other layout options, see PpSlideLayout Enumeration: |
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
| """Example of how to convert an xlsx file to JSON. | |
| Requirements: | |
| - Python 3.7 or higher | |
| - openpyxl (pip install openpyxl) | |
| Assumptions: | |
| - the active worksheet contains a rectangular array of data, | |
| with column names in the first row | |
| - the data fits in memory (makes the code below a bit simpler) |
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 PyQt5 import QtWidgets, QtGui, QtCore | |
| font_but = QtGui.QFont() | |
| font_but.setFamily("Segoe UI Symbol") | |
| font_but.setPointSize(10) | |
| font_but.setWeight(95) | |
| class PushBut1(QtWidgets.QPushButton): | |
| def __init__(self, parent=None): |
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 multiprocessing import Process, Queue | |
| import uavcan | |
| from contextlib import closing | |
| import tkinter | |
| def node_status_callback(event): | |
| print('#',event.transfer.source_node_id,': ', event.message.uptime_sec) | |
| # Messages, service requests, service responses, and entire events |
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 tkinter | |
| import random | |
| class PWGenGui(tkinter.Frame): | |
| def __init__(self, master=None): | |
| self.consonants = "bcdfghjklmnpqrstvwxz" | |
| self.vowels = "aeuoiy" | |
| self.numbers = "0123456789" | |
| self.symbols = "§$%&?#+" |