rm old folders

main
alex 2024-08-21 17:01:23 +02:00
parent d4795cefd6
commit 9adb8e454d
13 changed files with 2 additions and 436 deletions

View File

@ -1,6 +1,6 @@
{
"category": "Roese",
"name": "Roese Home",
"category": "Helper",
"name": "Helper",
"globalInputs": [
{
"parameterName": "kundenname",

View File

@ -1,26 +0,0 @@
{
"category": "Cutting",
"name": "Device Acryl schneiden",
"globalInputs": [
{
"parameterName": "irgendwas",
"type": "text",
"displayName": "Irgendwas tolles"
},
{
"parameterName": "kiste",
"type": "number",
"displayName": "Nummer der Kiste"
}
],
"tasks": [
{
"name": "Label drucken",
"onFinish": "next",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "test.py",
"parameters": []
}
]
}

View File

@ -1,28 +0,0 @@
import requests
import sys
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--url", help="url", type=str)
parser.add_argument("--name", help="name", type=str)
args = parser.parse_args()
if args.url is None or args.name is None:
parser.print_help()
sys.exit(100)
print("hello friend", args.url, args.name)
def test():
print("hello")
x = requests.get("http://localhost:3000/test")
print(x.text)
# sys.exit(250)
test()

View File

@ -1,125 +0,0 @@
{
"category": "Janex",
"name": "Produktionstask 1",
"globalInputs": [
{
"parameterName": "kundenname",
"type": "text",
"displayName": "Name des Kunden"
},
{
"parameterName": "kiste",
"type": "number",
"displayName": "Nummer der Kiste"
},
{
"parameterName": "kiste2",
"type": "textarea",
"displayName": "Nummer der zweiten Kiste yooo"
},
{
"parameterName": "3d_printer_machine_selection",
"type": "select_machine",
"displayName": "3D Drucker",
"options": {
"location": 5,
"whitelistParts": [],
"blacklistParts": []
}
}
],
"tasks": [
{
"name": "Bild zu Label konvertieren",
"onFinish": "pause",
"undoPossible": true,
"repeatPossible": true,
"scriptPath": "test1.py",
"parameters": [
{
"parameterName": "labelformat",
"type": "text",
"displayName": "Format des Labels",
"global": false
},
{
"parameterName": "kiste",
"type": "number",
"displayName": "Nummer der Kiste",
"global": true
},
{
"parameterName": "kiste2",
"type": "textarea",
"displayName": "Nummer der zweiten Kiste",
"global": true
},
{
"parameterName": "print_machine_selection",
"type": "select_machine",
"displayName": "Drucker",
"options": {
"location": 5,
"whitelistParts": [],
"blacklistParts": []
}
}
]
},
{
"name": "Label drucken",
"onFinish": "next",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "test2.py",
"parameters": []
},
{
"name": "Label drucken1",
"onFinish": "next",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "test2.py",
"parameters": []
},
{
"name": "Label drucken2",
"onFinish": "next",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "test2.py",
"parameters": []
},
{
"name": "Label drucken3",
"onFinish": "next",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "test2.py",
"parameters": []
},
{
"name": "Label 1",
"onFinish": "next",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "test2.py",
"parameters": [
{
"parameterName": "kundenname",
"type": "text",
"displayName": "Name des Kunden",
"global": true
}
]
},
{
"name": "Label 2",
"onFinish": "pause",
"undoPossible": false,
"repeatPossible": true,
"scriptPath": "test3.py",
"parameters": []
}
]
}

View File

@ -1,4 +0,0 @@
matplotlib==3.7.2
numpy==1.24.3
numpy_stl==3.0.1
Pillow==10.0.0

View File

@ -1,121 +0,0 @@
import random
from PIL import Image, ImageDraw
import time
import sys
import numpy as np
from stl import mesh
import json
time.sleep(3)
# arg format is like this: args ['test1.py', '{"kiste":{"value":"321"},"labelformat":{"value":"123123"},"print_machine_selection":{"data":{"displayName":"Brother Workplace","ip":"127.0.0.1"},"value":"Brother Workplace"}}', '--undo'] undo is optional
json_object = json.loads(sys.argv[1])
labelformat = json_object["labelformat"]
kiste = json_object["kiste"]
print("args", sys.argv)
if len(sys.argv) >= 5:
undo = sys.argv[4]
if undo == "--undo":
print("finish undo")
sys.exit(0)
print("hello this is test1")
if labelformat is None or kiste is None:
sys.exit(100)
print("hello friend", labelformat, kiste)
fp = open("customers.txt", "w")
fp.write("first line hey customer")
fp.close()
# Bildgröße und Pixelgröße festlegen
width = 100
height = 100
line_thickness = 5
max_lines = 5
# Das Bildgröße anpassen
image_width = width * line_thickness
image_height = height * line_thickness
# Hintergrundfarbe festlegen
background_color = (255, 255, 255) # Weiß
for i in range(10):
# Ein neues Bild erstellen
image = Image.new("RGB", (image_width, image_height), background_color)
# Eine Zeichenfläche für das Bild erstellen
draw = ImageDraw.Draw(image)
# Zufällige Linien zeichnen
for _ in range(max_lines):
start_x = random.randint(0, image_width)
start_y = random.randint(0, image_height)
end_x = random.randint(0, image_width)
end_y = random.randint(0, image_height)
color = (random.randint(0, 255), random.randint(
0, 255), random.randint(0, 255))
draw.line([(start_x, start_y), (end_x, end_y)],
fill=color, width=line_thickness)
# Bild als Datei speichern
image.save("generiertes_bild"+str(i)+".jpg")
# Abmessungen des rechteckigen Modells
width = 196
height = 196
depth = 26
# Eckpunkte des Modells erstellen
vertices = np.array([
[0, 0, 0],
[width, 0, 0],
[width, height, 0],
[0, height, 0],
[0, 0, depth],
[width, 0, depth],
[width, height, depth],
[0, height, depth]
])
# Flächen des Modells definieren
faces = np.array([
[0, 1, 2],
[0, 2, 3],
[0, 1, 5],
[0, 4, 5],
[0, 3, 7],
[0, 4, 7],
[1, 2, 6],
[1, 5, 6],
[2, 3, 7],
[2, 6, 7],
[4, 5, 6],
[4, 6, 7]
])
# Erstellen des Modells mit den Eckpunkten und Flächen
rectangular_mesh = mesh.Mesh(np.zeros(faces.shape[0], dtype=mesh.Mesh.dtype))
for i, face in enumerate(faces):
for j, vertex_id in enumerate(face):
rectangular_mesh.vectors[i][j] = vertices[vertex_id]
# Exportieren des Modells als .stl-Datei
rectangular_mesh.save('rectangular_model.stl')
print("Das 3D-Modell wurde erfolgreich als 'rectangular_model.stl' exportiert.")
"""
try:
x = 5 / 0 # Hier wird ein Fehler ausgelöst
except ZeroDivisionError:
print("Ein Fehler ist aufgetreten: Division durch Null.")
raise SystemExit(140) """

View File

@ -1,32 +0,0 @@
import time
import sys
import random
import string
import zipfile
time.sleep(5)
print("hello this is test2 lul")
def generate_random_text(length):
"""Generiert einen zufälligen Text mit der angegebenen Länge"""
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for _ in range(length))
def create_zip_file(file_name, text_length):
"""Erstellt eine Zip-Datei mit einer Textdatei mit zufälligem Text"""
random_text = generate_random_text(text_length)
with open('random_text.txt', 'w') as file:
file.write(random_text)
with zipfile.ZipFile(file_name, 'w') as zip_file:
zip_file.write('random_text.txt')
print(f'Die Zip-Datei "{file_name}" wurde erfolgreich erstellt.')
# Beispielaufruf
create_zip_file('random_text.zip', 100)

View File

@ -1,47 +0,0 @@
import sys
import random
import matplotlib.pyplot as plt
def create_avatar(size):
# Erstelle ein neues Plot-Fenster
fig, ax = plt.subplots()
fig.set_size_inches(size/100, size/100) # Größe des Fensters festlegen
# Generiere zufällige Farben für Hintergrund und Formen
bg_color = (random.random(), random.random(), random.random())
shape_color = (random.random(), random.random(), random.random())
# Setze den Hintergrund
ax.set_facecolor(bg_color)
# Zeichne zufällige Formen
num_shapes = random.randint(3, 6)
for _ in range(num_shapes):
shape_type = random.choice(['circle', 'rectangle'])
if shape_type == 'circle':
x = random.randint(0, size)
y = random.randint(0, size)
radius = random.randint(0, size // 2)
circle = plt.Circle((x, y), radius, fc=shape_color)
ax.add_patch(circle)
elif shape_type == 'rectangle':
x = random.randint(0, size)
y = random.randint(0, size)
width = random.randint(0, size // 2)
height = random.randint(0, size // 2)
rectangle = plt.Rectangle((x, y), width, height, fc=shape_color)
ax.add_patch(rectangle)
# Verstecke Achsenbeschriftungen
ax.axis("off")
# Speichere das Bild
plt.savefig("random_avatar.png", dpi=100)
plt.close()
# Beispielaufruf
create_avatar(400)
print("hello")

View File

@ -24,7 +24,6 @@
"parameterName": "package_size",
"type": "select",
"displayName": "Paketgröße auswählen",
"global": false,
"options": ["#1 Standard Paket", "#2 Großes Paket"]
}
]

View File

@ -1,46 +0,0 @@
{
"category": "Test",
"name": "hello world",
"tasks": [
{
"name": "Test1",
"onFinish": "pause",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "",
"parameters": []
},
{
"name": "Test2",
"onFinish": "nextStep",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "",
"parameters": []
},
{
"name": "Test3",
"onFinish": "nextStep",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "",
"parameters": []
},
{
"name": "Test3",
"onFinish": "nextStep",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "",
"parameters": []
},
{
"name": "Test3",
"onFinish": "nextStep",
"undoPossible": false,
"repeatPossible": false,
"scriptPath": "",
"parameters": []
}
]
}

View File

@ -1,4 +0,0 @@
{
"category": "Umbach",
"name": "Umbach Snack bar auffüllen"
}