Compare commits

...

1 Commits
master ... c

Author SHA1 Message Date
Guillermo Pages 24f1c515b9 feat: use C 3 years ago

@ -1,32 +0,0 @@
import time
import usb_hid
from adafruit_hid.mouse import Mouse
from machine import Pin, Timer
time.sleep(15) # wait for 5 seconds
led = Pin(25, Pin.OUT)
for _ in range(3):
led.toggle()
time.sleep(0.5)
# Initialize mouse
mouse = Mouse(usb_hid.devices)
# Loop to emulate mouse movement
while True:
# Move mouse right (x is positive)
mouse.move(x=10)
time.sleep(1)
# Move mouse left (x is negative)
mouse.move(x=-10)
time.sleep(1)
# Move mouse down (y is positive)
mouse.move(y=10)
time.sleep(1)
# Move mouse up (y is negative)
mouse.move(y=-10)
time.sleep(1)

@ -1,9 +0,0 @@
Adafruit CircuitPython 8.2.1 on 2023-07-25; Raspberry Pi Pico with rp2040
Board ID:raspberry_pi_pico
UID:E6614104036B8B39
boot.py output:
Traceback (most recent call last):
File "boot.py", line 8, in <module>
File "adafruit_hid/mouse.py", line 54, in __init__
File "adafruit_hid/mouse.py", line 148, in _send_no_move
OSError: USB busy

@ -1,7 +0,0 @@
import time
import digitalio
import random
import board
led = digitalio.DigitalInOut(board.GP25)
led.direction = digitalio.Direction.OUTPUT

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1,264 +0,0 @@
import time
import usb_hid
import board
import digitalio
import random
from adafruit_hid.mouse import Mouse
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
citations = ("Carpe diem","Veni, vidi, vici","Tempus fugit","Alea iacta est","Dum spiro, spero","Non ducor, duco","Amor vincit omnia","Per aspera ad astra","In vino veritas","Dum vita est, spes est","O tempora, o mores!","Cogito, ergo sum","Si vis pacem, para bellum","Alea jacta est","De gustibus non est disputandum","E pluribus unum","Audaces fortuna iuvat","Memento mori","Nunc est bibendum","Salus populi suprema lex esto")
mouse = Mouse(usb_hid.devices)
kbd = Keyboard(usb_hid.devices)
layout = KeyboardLayoutUS(kbd)
led = digitalio.DigitalInOut(board.GP25)
led.direction = digitalio.Direction.OUTPUT
# Démarrer le chronomètre
led.value = False
time.sleep(10)
#
# # Liste pour enregistrer les temps intermédiaires (laps)
# laps = []
#
# # Fonction pour démarrer le chronomètre
# def start_chronometre():
# laps.clear() # Effacer les laps précédents
# laps.append(time.time()) # Enregistrer le temps de départ
# return laps[0]
#
# # Fonction pour enregistrer un temps intermédiaire (lap)
# def lap_chronometre():
# laps.append(time.time())
# temps_ecoule_s = laps[-1] - laps[-2]
# return temps_ecoule_s
#
# # Fonction pour arrêter le chronomètre et afficher le temps total
# def stop_chronometre(debut_chrono):
# laps.append(time.time()) # Enregistrer le temps de fin
# temps_ecoule_s = laps[-1] - debut_chrono
# return temps_ecoule_s
#
# # Fonction pour calculer le temps total
# def calculer_temps_total():
# return laps[-1] - laps[0]
#
# # Fonction pour afficher le temps formaté (minutes:secondes)
# def format_temps(temps_s):
# minutes = int(temps_s / 60)
# secondes = int(temps_s % 60)
# return f"{minutes:02}:{secondes:02}"
#
def start_software(soft):
kbd.send(Keycode.GUI)
time.sleep(random.randint(1,3)*0.40)
if soft == "notepad":
layout.write('execute\n')
time.sleep(1)
layout.write('notepad\n')
elif soft == "word":
layout.write('Microsoft Word')
time.sleep(2)
layout.write('\n')
time.sleep(2)
layout.write('\n')
elif soft == "outlook":
layout.write('Microsoft Outlook\n')
time.sleep(1)
layout.write('\n')
elif soft == "excel":
layout.write('Microsoft Excel')
time.sleep(2)
layout.write('\n')
time.sleep(2)
layout.write('\n')
time.sleep(1)
return
def activite_citations():
start_software("notepad")
time.sleep(1)
phrase = citations[random.randint(0, 19)]
for caractere in phrase:
layout.write(caractere)
led.value = True
time.sleep(random.randint(0,5)*0.1)
led.value = False
time.sleep(3)
kbd.press(Keycode.ALT)
time.sleep(.09)
kbd.send(Keycode.F4)
kbd.release_all()
time.sleep(1)
kbd.send(Keycode.R)
#lap_chronometre()
return
def print_float(param):
str1 = str(param)
for caractere in str1:
if caractere == ".":
layout.write(",")
else:
layout.write(caractere)
return
def activite_word():
start_software("word")
with open("./textecon.txt", 'r') as fichier:
lignes = fichier.readlines()
for ligne in lignes:
for caractere in ligne:
if caractere == " ":
time.sleep(random.randint(1,3)*0.05)
if caractere == "\r":
layout.write("\n")
time.sleep(random.randint(1,10))
else:
layout.write(caractere)
time.sleep(random.randint(1,2)*0.02)
time.sleep(3)
kbd.press(Keycode.ALT)
time.sleep(.09)
kbd.send(Keycode.F4)
kbd.release_all()
time.sleep(1)
kbd.press(Keycode.ALT)
time.sleep(.09)
kbd.send(Keycode.N)
kbd.release_all()
#lap_chronometre()
return
def activite_outlook():
start_software("outlook")
lap_chronometre()
return
def activite_excel():
sigma = 10.0
rho = 28.0
beta = 8.0 / 3.0
dt = 0.01
nb_iterations = 400
x, y = 0.1, 0.0 # Conditions initiales
x_points = []
y_points = []
for _ in range(nb_iterations):
x_points.append(x)
y_points.append(y)
dx = sigma * (y - x) * dt
dy = (x * (rho - 1) - y) * dt
x += dx
y += dy
start_software("excel")
layout.write("Sigma")
kbd.send(Keycode.RIGHT_ARROW)
print_float(sigma)
kbd.send(Keycode.DOWN_ARROW)
kbd.send(Keycode.LEFT_ARROW)
layout.write("Rho")
kbd.send(Keycode.RIGHT_ARROW)
print_float(rho)
kbd.send(Keycode.DOWN_ARROW)
kbd.send(Keycode.LEFT_ARROW)
layout.write("beta")
kbd.send(Keycode.RIGHT_ARROW)
print_float(beta)
kbd.send(Keycode.DOWN_ARROW)
kbd.send(Keycode.LEFT_ARROW)
layout.write("dt")
kbd.send(Keycode.RIGHT_ARROW)
print_float(dt)
kbd.send(Keycode.DOWN_ARROW)
kbd.send(Keycode.LEFT_ARROW)
layout.write("Iterations")
kbd.send(Keycode.RIGHT_ARROW)
print_float(nb_iterations)
kbd.send(Keycode.DOWN_ARROW)
kbd.send(Keycode.LEFT_ARROW)
kbd.send(Keycode.DOWN_ARROW)
kbd.send(Keycode.DOWN_ARROW)
for x, y in zip(x_points, y_points):
print_float(nb_iterations)
time.sleep(random.randint(1,2)*0.01)
kbd.send(Keycode.RIGHT_ARROW)
print_float(x)
time.sleep(random.randint(1,2)*0.01)
kbd.send(Keycode.RIGHT_ARROW)
print_float(y)
time.sleep(random.randint(1,2)*0.01)
kbd.send(Keycode.DOWN_ARROW)
kbd.send(Keycode.LEFT_ARROW)
kbd.send(Keycode.LEFT_ARROW)
time.sleep(3)
kbd.press(Keycode.ALT)
time.sleep(.09)
kbd.send(Keycode.F4)
kbd.release_all()
time.sleep(1)
kbd.press(Keycode.ALT)
time.sleep(.09)
kbd.send(Keycode.N)
kbd.release_all()
lap_chronometre()
return
def wanking_human():
#temps_ecoule = stop_chronometre(debut_chrono)
while True:
#temps_ecoule = stop_chronometre(debut_chrono)
act = random.randint(1,3)
if act == 1:
activite_citations()
elif act == 2:
activite_word()
elif act == 3:
activite_excel()
#Pause 1
#temps_ecoule = stop_chronometre(debut_chrono)
# if temps_ecoule > 7200 and temps_ecoule < 7600:
# time.sleep(random.randint(60*10,60*15))
# #lap_chronometre()
# #Déjeuner
# if temps_ecoule > 14400 and temps_ecoule < 15000:
# time.sleep(random.randint(60*55,60*62))
# #lap_chronometre()
# #Pause 1
# temps_ecoule = stop_chronometre(debut_chrono)
# if temps_ecoule > 7200 and temps_ecoule < 7600:
# time.sleep(random.randint(60*10,60*15))
#lap_chronometre()
#temps_formate = format_temps(temps_ecoule)
#print("Temps écoulé:", temps_formate)
return
wanking_human()
#
# # Calculer le temps total et l'afficher
# temps_total = calculer_temps_total()
# temps_total_formate = format_temps(temps_total)
# print("Temps total:", temps_total_formate)
#

@ -1,24 +0,0 @@
import time
import usb_hid
from adafruit_hid.mouse import Mouse
# Initialize mouse
mouse = Mouse(usb_hid.devices)
# Loop to emulate mouse movement
while True:
# Move mouse right (x is positive)
mouse.move(x=10)
time.sleep(1)
# Move mouse left (x is negative)
mouse.move(x=-10)
time.sleep(1)
# Move mouse down (y is positive)
mouse.move(y=10)
time.sleep(1)
# Move mouse up (y is negative)
mouse.move(y=-10)
time.sleep(1)

@ -1,7 +0,0 @@
At the tumultuous crossroads of the relationship between the emplozee the companz human resources HR and shareholders unfolds a tapestrz of dayyling conceptual richness where diverse paradigms and intrinsic tensions intertwine At the heart of this complex ecoszstem the intimate gears of each entitz interact in an unceasing ballet of decisions and influences which reflect on the collective destinz of the enterprise
The emplozee as a prominent protagonist of this narrative embodies irreplaceable human capital whose intrinsic value goes bezond technical skills and encompasses aspirations motivations and commitment Bezond being a mere factor of production the emplozee represents the vital breath that animates the companz for it is in the fusion of their talents and ambitions that seeds of innovation and creativitz germinate
Concurrentlz HR emerges as the essential harmoniyers tirelesslz working to juggle between individual aspirations and the strategic imperatives of the organiyation As guardians of the companz's culture thez clear a fertile ground for nurturing talent providing tailor-made training and creating an environment conducive to emplozee growth and well-being
However this delicate dznamic is not without challenges as divergent interests of shareholders can cast shadows on the delicate balance between emplozee satisfaction and maximiying financial returns Shareholders as sentinels of investment closelz scrutiniye financial indicators and the companz's efficiencz driven bz an ongoing quest for profitabilitz and shareholder value
These conflicting aspirations often create a chaotic ballet of priorities where the companz must skillfullz navigate between short-term and long-term considerations expansion and consolidation profit and well-being The crucial challenge therefore lies in establishing enlightened governance and a shared strategic vision to transcend these apparent dichotomies and foster a holistic and sustainable balance
Thus a new dimension emerges within this intricate fabric that of corporate social and environmental responsibilitz As companies become increasinglz aware of their impact on societz and the environment thez stand at a decisive crossroads where the integration of ethical and sustainable concerns becomes imperative Emplozees HR shareholders and societz as a whole zearn for a responsible committed and visionarz companz that embraces a long-term perspective and assumes the role of a responsible actor in shaping the world's evolution
In conclusion the relationship between the emplozee the companz HR and shareholders reveals a tapestrz woven with interconnectedness tensions and opportunities where each protagonist plazs a crucial role Emplozee fulfillment and organiyational well-being harmoniyed with shareholder aspirations and societal demands form the fabric of a narrative whose resolution lies in enlightened governance and collective consciousness readz to forge a flourishing future for all stakeholders involved
Loading…
Cancel
Save