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
matches = ["class", "(", ":"] | |
with open("sailor.py") as f: | |
lines = f.readlines() | |
currentclassname = '' | |
currentlines =[] | |
for line in lines : | |
if all(x in line for x in matches) : # we have found a class | |
classname = line.split(" ", 2)[1].split("(",1)[0] | |
print(classname) | |
currentclassname=classname |
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 random | |
from time import sleep | |
logo = """ | |
_ _ _ _ _ | |
| |_ _______ | | _____ _ __ _ __ _ __ ___ __| (_) ___| |_ ___ _ __ | |
| __|_ / _ \| |/ / _ \ '__| | '_ \| '__/ _ \/ _` | |/ __| __/ _ \| '__| | |
| |_ / / (_) | < __/ | | |_) | | | __/ (_| | | (__| || (_) | | | |
\__/___\___/|_|\_\___|_| | .__/|_| \___|\__,_|_|\___|\__\___/|_| | |
|_| |
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 pyodbc | |
import json | |
import os | |
# A script by John Tsioumpris | |
CREDENTIALS_FILE = "as400_credentials.json" | |
# Function to save credentials | |
def save_credentials(credentials): |
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
#### START ELEVATE TO ADMIN ##### | |
param( | |
[Parameter(Mandatory=$false)] | |
[switch]$shouldAssumeToBeElevated, | |
[Parameter(Mandatory=$false)] | |
[String]$workingDirOverride | |
) | |
# If parameter is not set, we are propably in non-admin execution. We set it to the current working directory so that |
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
@echo off | |
powershell -Command "Start-Process powershell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File \"%~dp0Laps.ps1\"' -Verb RunAs" |
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 sys | |
import random | |
from PyQt6.QtWidgets import (QApplication, QDialog, QVBoxLayout, QHBoxLayout, | |
QTreeWidget, QTreeWidgetItem, QPushButton, | |
QAbstractItemView, QStyleFactory, QMenu, | |
QHeaderView, QSizePolicy) | |
from PyQt6.QtCore import Qt, QSize, QPointF | |
from PyQt6.QtGui import QBrush, QColor, QPixmap, QPainter, QPen, QIcon, QRadialGradient, QAction | |