kenenet 0.1.6__py3-none-any.whl → 0.1.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
kenenet/__init__.py CHANGED
@@ -1,9 +1,16 @@
1
- import inspect, sys, zhmiscellany, keyboard, mss
1
+ import inspect, sys, zhmiscellany, keyboard, mss, time, sys
2
2
 
3
- global get_pos_cooldown
3
+ global timings
4
+ timings = {}
4
5
  def adding(a, b):
5
6
  return a + b
6
7
 
8
+ def _quick_print(message):
9
+ frame = inspect.currentframe().f_back
10
+ lineno = frame.f_lineno
11
+ sys.stdout.write(f"\033[38;2;0;255;26m{lineno} || {message}\033[0m\n")
12
+
13
+
7
14
  def get_pos(key='f10', kill=False):
8
15
  def _get_pos(key):
9
16
  while True:
@@ -15,12 +22,22 @@ def get_pos(key='f10', kill=False):
15
22
  rgb = screenshot.pixel(0, 0)
16
23
  color = f"\033[38;2;{rgb[0]};{rgb[1]};{rgb[2]}m"
17
24
  reset = "\033[0m"
18
- print(f"Coordinates: ({x}, {y}), RGB: {rgb} {color}████████{reset}")
25
+ _quick_print(f"Coordinates: ({x}, {y}), RGB: {rgb} {color}████████{reset}")
19
26
  if kill:
20
- print('killing process')
27
+ _quick_print('killing process')
21
28
  zhmiscellany.misc.die()
22
29
  zhmiscellany.processing.start_daemon(target=_get_pos, args=(key,))
23
30
 
31
+ def time_it(clock=1):
32
+ if clock in timings:
33
+ elapsed = timings[clock] - time.time()
34
+ frame = inspect.currentframe().f_back
35
+ lineno = frame.f_lineno
36
+ _quick_print(f'{lineno} | Timer {clock} took \033[97m{elapsed}\033[0m seconds')
37
+ del timings[clock]
38
+ else:
39
+ timings[clock] = time.time()
40
+
24
41
 
25
42
  class k:
26
43
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: kenenet
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: dude what the fuck even is this package
5
5
  Home-page: https://www.youtube.com/@KiddyKene
6
6
  Author: kiddykene
@@ -0,0 +1,5 @@
1
+ kenenet/__init__.py,sha256=p3JioWCzHBTqM3H72AaRm7sT3fO3DTSF3yARPfhOI4k,1699
2
+ kenenet-0.1.8.dist-info/METADATA,sha256=UPgZyAmYaf-1jkpLQFDLvIvNI4t2eHEk1G06CcOF9dE,513
3
+ kenenet-0.1.8.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
4
+ kenenet-0.1.8.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
+ kenenet-0.1.8.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- kenenet/__init__.py,sha256=wO2WG_T7hG4Ux4GfArVKJHnSp7CQ-ZC81TzTdU-56tw,1144
2
- kenenet-0.1.6.dist-info/METADATA,sha256=s-HaoqMc7HX9pWkc5pPCfzqKl88yn4MI-Kyaw6zI3uw,513
3
- kenenet-0.1.6.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
4
- kenenet-0.1.6.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
- kenenet-0.1.6.dist-info/RECORD,,