JoostSijm 5 жил өмнө
parent
commit
dd04d47c24

+ 0 - 0
education.py → coefficient/education.py


+ 0 - 0
level.py → coefficient/level.py


+ 0 - 0
department.py → deparment/department.py


+ 1 - 1
donation.py → donations/donations.py

@@ -14,7 +14,7 @@ def sum_donations():
         'g': {},
         '$': {},
     }
-    with open('donation.txt', 'r') as file:
+    with open('donations.txt', 'r') as file:
         for line in file:
             try:
                 donation = re.search(r'\d.*?(bbl|kg|pcs|G|g|\$)', line).group(0)

+ 0 - 0
index.py → index/index.py


+ 0 - 0
military.py → military/military.py


+ 0 - 26
rr.py

@@ -1,26 +0,0 @@
-"""Easy calc functions"""
-
-class Value(int):
-    """A value parser"""
-
-    def __new__(cls, value):
-        if isinstance(value, str):
-            value = value.replace('t', '000000000000')
-            value = value.replace('k', '000')
-            value = value.replace('.', '')
-            value = int(value)
-        return super(Value, cls).__new__(cls, value)
-
-    def __repr__(self):
-        str_format = '{:,}'.format(self)
-        new_str = ''
-        for i in range(len(str_format), 0, -4):
-            if str_format[i-4:i] == ',000':
-                new_str = 'k' + new_str
-            else:
-                new_str = str_format[:i] + new_str
-                break
-
-        new_str = new_str.replace('kkkk', 't')
-        new_str = new_str.replace(',', '.')
-        return new_str