JoostSijm пре 5 година
родитељ
комит
dd04d47c24
7 измењених фајлова са 1 додато и 27 уклоњено
  1. 0 0
      coefficient/education.py
  2. 0 0
      coefficient/level.py
  3. 0 0
      deparment/department.py
  4. 1 1
      donations/donations.py
  5. 0 0
      index/index.py
  6. 0 0
      military/military.py
  7. 0 26
      rr.py

+ 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