coding party! OooWee

owly

闇の伝説
Staff member
戦闘 コーダー
:s13:OooWeee time to beef up some LG tools!Team Fuki assemble! @fukurou


we gonna be statin with an post processing skill, so role up them sleeves we gon be knee deep in code
 

fukurou

the supreme coder
ADMIN
I'm guessing this is a hardware skill

Python:
class DiPostProcessor(DiSkillV2):
    def __init__(self):
        super().__init__()

    def input(self, ear: str, skin: str, eye: str):
        if len(ear) == 0:
            return
 

fukurou

the supreme coder
ADMIN
Python:
class TextEditingSeries:
    @staticmethod
    def add_new_lines(text: str, n1: int):
        words = text.split(' ')
        lines = []
        current_line = []
        current_length = 0

        for word in words:
            if current_length + len(word) + len(current_line) > n1:
                lines.append(' '.join(current_line))
                current_line = [word]
                current_length = len(word)
            else:
                current_line.append(word)
                current_length += len(word)

        lines.append(' '.join(current_line))
        return '\n'.join(lines)
 

owly

闇の伝説
Staff member
戦闘 コーダー
tight shit, tight shit
now connect the GUI to a brain object and funnel all det shiiieeet
 

fukurou

the supreme coder
ADMIN
Python:
import time

from LivinGrimoire23 import *
from AXPython import *
from MatrixGUI1 import App
from skills import *
from hidden_skills import *
import tkinter as tk
from tkinter import ttk

# from tkinter import messagebox

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
# Press the green button in the gutter to run the script.


if __name__ == '__main__':
    app = App()
    app.brain.logicChobit.addSkill(DiTime())
    app.brain.logicChobit.addSkill(DiHelloWorld())
    app.brain.logicChobit.addSkill(DiBlabber("talking"))
    app.brain.logicChobit.addSkill(DiEngager(1, "diblabber"))
    app.brain.logicChobit.addSkill(DiMagic8Ball())
    app.brain.logicChobit.addSkill(DiPunisher())
    app.brain.logicChobit.addSkill(DiBored())
    app.brain.logicChobit.addSkill(DiCron().setSound("moan"))
    app.brain.logicChobit.addSkill(DiTreater())
    app.brain.logicChobit.addSkill(DiHabit())
    app.brain.logicChobit.addSkill(DiBurper(3))
    app.brain.logicChobit.addSkill(DiSayer())
    t:SkillBranch = SkillBranch(3)
    t.addDefcon("lame")
    t.addGoal("thanks")
    t.addSkill(DiSmoothie0())
    t.addSkill(DiSmoothie1())
    app.brain.logicChobit.addSkill(t)
    app.brain.logicChobit.addSkill(DiJumbler())
    app.mainloop()
 

owly

闇の伝説
Staff member
戦闘 コーダー
tight shit, tight shit
remove the scaffoldings and add the line aligner!
 

fukurou

the supreme coder
ADMIN
Python:
class DiPostProcessor(DiSkillV2):
    def __init__(self):
        super().__init__()
        self.tes:TextEditingSeries = TextEditingSeries()

    def input(self, ear: str, skin: str, eye: str):
        if len(ear) == 0:
            return
        self.setSimpleAlg(self.tes.add_new_lines(ear, 60))
 

owly

闇の伝説
Staff member
戦闘 コーダー
now I activate my spell card shit in the ass!
Python:
from playsound import playsound
import pyttsx3


class LGTTSv1:
    def __init__(self):
        self.engine = pyttsx3.init()
        self.rate = self.engine.getProperty('rate')
        self.engine.setProperty('rate', 125)
        self.engine.setProperty('voice', 1)
        self.volume = self.engine.getProperty('volume')
        self.engine.setProperty('volume', 1.0)
        self.voices = self.engine.getProperty('voices')
        self.engine.setProperty('voice', self.voices[1].id)

    def speak(self, txt: str):
        self.engine.say(f'<pitch middle="10">{txt}</pitch>')
        self.engine.runAndWait()

    def stopEngine(self):
        self.engine.stop()

    @staticmethod
    def playSoundFile(file: str):
        playsound(file)
 

fukurou

the supreme coder
ADMIN
Python:
import os
from pygame import mixer


class OGTTS:
    def __init__(self):
        mixer.init()

    def playSoundFile(self, file: str)->bool:
        if os.path.isfile(f'sounds/{file}.mp3'):
            mixer.music.load(f'sounds/{file}.mp3')
            mixer.music.play()
            return True
        return False
 

owly

闇の伝説
Staff member
戦闘 コーダー
so here is the pseudo code shit fuck ass smoothie:
if str exist:
play(str)
else
split
loop{if is number: convert to words string}
loop{if ! word exist: ret false}
play each word
# fap
 

fukurou

the supreme coder
ADMIN
Python:
import os
from pygame import mixer


class OGTTS:
    def __init__(self):
        mixer.init()

    def playSoundFile(self, file: str)->bool:
        if os.path.isfile(f'sounds/{file}.mp3'):
            mixer.music.load(f'sounds/{file}.mp3')
            mixer.music.play()
            return True
        words = file.split(' ')
        for i in range(len(words)):
            if not os.path.isfile(f'sounds/{words[i]}.mp3'):
                return False
        for i in range(len(words)):
            mixer.music.load(f'sounds/{words[i]}.mp3')
            mixer.music.play()
        return True
 

kollector

New member
Python function that converts a string of a number in digit form to it's word representation:
Python:
import inflect

def number_to_words(number):
    p = inflect.engine()
    words = p.number_to_words(number)
    return words

# Example usage:
print(number_to_words("12345"))

Python function that converts a string of a coefficient in digit form to it's word representation
Python:
import inflect

def coefficient_to_words(coefficient):
    p = inflect.engine()
    if '.' in coefficient:
        integer_part, decimal_part = coefficient.split('.')
        words = p.number_to_words(integer_part) + ' point ' + ' '.join(p.number_to_words(i) for i in decimal_part)
    else:
        words = p.number_to_words(coefficient)
    return words

# Example usage:
print(coefficient_to_words("123.45"))

Python function that converts a string of a time stamp(hour and minutes) in digit form to it's word representation
Python:
import inflect

def time_to_words(time):
    p = inflect.engine()
    hour, minute = map(int, time.split(':'))
    if hour <= 12:
        hour_words = p.number_to_words(hour) + ' o\'clock'
    else:
        hour_words = p.number_to_words(hour - 12) + ' o\'clock'
    if minute != 0:
        minute_words = p.number_to_words(minute)
        return hour_words + ' and ' + minute_words + ' minutes'
    else:
        return hour_words

# Example usage:
print(time_to_words("13:45"))
 
Top