summaryrefslogtreecommitdiff
path: root/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress
diff options
context:
space:
mode:
authorpravindalve2023-05-30 04:20:14 +0530
committerGitHub2023-05-30 04:20:14 +0530
commitcbdd7ca21f1f673a3a739065098f7cc6c9c4b881 (patch)
tree595e888c38f00a314e751096b6bf636a544a5efe /venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress
parent7740d1ca0c2e6bf34900460b0c58fa4d528577fb (diff)
parent280c6aa89a15331fb76b7014957953dc72af6093 (diff)
downloadChemical-Simulator-GUI-master.tar.gz
Chemical-Simulator-GUI-master.tar.bz2
Chemical-Simulator-GUI-master.zip
Merge pull request #63 from brenda-br/Fix-35HEADmaster
Restructure Project and Deployment
Diffstat (limited to 'venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress')
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__init__.py127
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/__init__.cpython-37.pycbin3928 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/bar.cpython-37.pycbin2750 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/helpers.cpython-37.pycbin3034 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/spinner.cpython-37.pycbin1509 -> 0 bytes
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/bar.py94
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/counter.py48
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/helpers.py91
-rw-r--r--venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/spinner.py44
9 files changed, 0 insertions, 404 deletions
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__init__.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__init__.py
deleted file mode 100644
index a41f65d..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__init__.py
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-from __future__ import division
-
-from collections import deque
-from datetime import timedelta
-from math import ceil
-from sys import stderr
-from time import time
-
-
-__version__ = '1.4'
-
-
-class Infinite(object):
- file = stderr
- sma_window = 10 # Simple Moving Average window
-
- def __init__(self, *args, **kwargs):
- self.index = 0
- self.start_ts = time()
- self.avg = 0
- self._ts = self.start_ts
- self._xput = deque(maxlen=self.sma_window)
- for key, val in kwargs.items():
- setattr(self, key, val)
-
- def __getitem__(self, key):
- if key.startswith('_'):
- return None
- return getattr(self, key, None)
-
- @property
- def elapsed(self):
- return int(time() - self.start_ts)
-
- @property
- def elapsed_td(self):
- return timedelta(seconds=self.elapsed)
-
- def update_avg(self, n, dt):
- if n > 0:
- self._xput.append(dt / n)
- self.avg = sum(self._xput) / len(self._xput)
-
- def update(self):
- pass
-
- def start(self):
- pass
-
- def finish(self):
- pass
-
- def next(self, n=1):
- now = time()
- dt = now - self._ts
- self.update_avg(n, dt)
- self._ts = now
- self.index = self.index + n
- self.update()
-
- def iter(self, it):
- try:
- for x in it:
- yield x
- self.next()
- finally:
- self.finish()
-
-
-class Progress(Infinite):
- def __init__(self, *args, **kwargs):
- super(Progress, self).__init__(*args, **kwargs)
- self.max = kwargs.get('max', 100)
-
- @property
- def eta(self):
- return int(ceil(self.avg * self.remaining))
-
- @property
- def eta_td(self):
- return timedelta(seconds=self.eta)
-
- @property
- def percent(self):
- return self.progress * 100
-
- @property
- def progress(self):
- return min(1, self.index / self.max)
-
- @property
- def remaining(self):
- return max(self.max - self.index, 0)
-
- def start(self):
- self.update()
-
- def goto(self, index):
- incr = index - self.index
- self.next(incr)
-
- def iter(self, it):
- try:
- self.max = len(it)
- except TypeError:
- pass
-
- try:
- for x in it:
- yield x
- self.next()
- finally:
- self.finish()
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/__init__.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/__init__.cpython-37.pyc
deleted file mode 100644
index 59b3fbe..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/__init__.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/bar.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/bar.cpython-37.pyc
deleted file mode 100644
index e3c2e89..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/bar.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/helpers.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/helpers.cpython-37.pyc
deleted file mode 100644
index 89d26eb..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/helpers.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/spinner.cpython-37.pyc b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/spinner.cpython-37.pyc
deleted file mode 100644
index 3f01f3b..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/__pycache__/spinner.cpython-37.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/bar.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/bar.py
deleted file mode 100644
index 025e61c..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/bar.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-from __future__ import unicode_literals
-
-import sys
-
-from . import Progress
-from .helpers import WritelnMixin
-
-
-class Bar(WritelnMixin, Progress):
- width = 32
- message = ''
- suffix = '%(index)d/%(max)d'
- bar_prefix = ' |'
- bar_suffix = '| '
- empty_fill = ' '
- fill = '#'
- hide_cursor = True
-
- def update(self):
- filled_length = int(self.width * self.progress)
- empty_length = self.width - filled_length
-
- message = self.message % self
- bar = self.fill * filled_length
- empty = self.empty_fill * empty_length
- suffix = self.suffix % self
- line = ''.join([message, self.bar_prefix, bar, empty, self.bar_suffix,
- suffix])
- self.writeln(line)
-
-
-class ChargingBar(Bar):
- suffix = '%(percent)d%%'
- bar_prefix = ' '
- bar_suffix = ' '
- empty_fill = '∙'
- fill = '█'
-
-
-class FillingSquaresBar(ChargingBar):
- empty_fill = '▢'
- fill = '▣'
-
-
-class FillingCirclesBar(ChargingBar):
- empty_fill = '◯'
- fill = '◉'
-
-
-class IncrementalBar(Bar):
- if sys.platform.startswith('win'):
- phases = (u' ', u'▌', u'█')
- else:
- phases = (' ', '▏', '▎', '▍', '▌', '▋', '▊', '▉', '█')
-
- def update(self):
- nphases = len(self.phases)
- filled_len = self.width * self.progress
- nfull = int(filled_len) # Number of full chars
- phase = int((filled_len - nfull) * nphases) # Phase of last char
- nempty = self.width - nfull # Number of empty chars
-
- message = self.message % self
- bar = self.phases[-1] * nfull
- current = self.phases[phase] if phase > 0 else ''
- empty = self.empty_fill * max(0, nempty - len(current))
- suffix = self.suffix % self
- line = ''.join([message, self.bar_prefix, bar, current, empty,
- self.bar_suffix, suffix])
- self.writeln(line)
-
-
-class PixelBar(IncrementalBar):
- phases = ('⡀', '⡄', '⡆', '⡇', '⣇', '⣧', '⣷', '⣿')
-
-
-class ShadyBar(IncrementalBar):
- phases = (' ', '░', '▒', '▓', '█')
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/counter.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/counter.py
deleted file mode 100644
index 6b45a1e..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/counter.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-from __future__ import unicode_literals
-from . import Infinite, Progress
-from .helpers import WriteMixin
-
-
-class Counter(WriteMixin, Infinite):
- message = ''
- hide_cursor = True
-
- def update(self):
- self.write(str(self.index))
-
-
-class Countdown(WriteMixin, Progress):
- hide_cursor = True
-
- def update(self):
- self.write(str(self.remaining))
-
-
-class Stack(WriteMixin, Progress):
- phases = (' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█')
- hide_cursor = True
-
- def update(self):
- nphases = len(self.phases)
- i = min(nphases - 1, int(self.progress * nphases))
- self.write(self.phases[i])
-
-
-class Pie(Stack):
- phases = ('○', '◔', '◑', '◕', '●')
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/helpers.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/helpers.py
deleted file mode 100644
index 0cde44e..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/helpers.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-from __future__ import print_function
-
-
-HIDE_CURSOR = '\x1b[?25l'
-SHOW_CURSOR = '\x1b[?25h'
-
-
-class WriteMixin(object):
- hide_cursor = False
-
- def __init__(self, message=None, **kwargs):
- super(WriteMixin, self).__init__(**kwargs)
- self._width = 0
- if message:
- self.message = message
-
- if self.file and self.file.isatty():
- if self.hide_cursor:
- print(HIDE_CURSOR, end='', file=self.file)
- print(self.message, end='', file=self.file)
- self.file.flush()
-
- def write(self, s):
- if self.file and self.file.isatty():
- b = '\b' * self._width
- c = s.ljust(self._width)
- print(b + c, end='', file=self.file)
- self._width = max(self._width, len(s))
- self.file.flush()
-
- def finish(self):
- if self.file and self.file.isatty() and self.hide_cursor:
- print(SHOW_CURSOR, end='', file=self.file)
-
-
-class WritelnMixin(object):
- hide_cursor = False
-
- def __init__(self, message=None, **kwargs):
- super(WritelnMixin, self).__init__(**kwargs)
- if message:
- self.message = message
-
- if self.file and self.file.isatty() and self.hide_cursor:
- print(HIDE_CURSOR, end='', file=self.file)
-
- def clearln(self):
- if self.file and self.file.isatty():
- print('\r\x1b[K', end='', file=self.file)
-
- def writeln(self, line):
- if self.file and self.file.isatty():
- self.clearln()
- print(line, end='', file=self.file)
- self.file.flush()
-
- def finish(self):
- if self.file and self.file.isatty():
- print(file=self.file)
- if self.hide_cursor:
- print(SHOW_CURSOR, end='', file=self.file)
-
-
-from signal import signal, SIGINT
-from sys import exit
-
-
-class SigIntMixin(object):
- """Registers a signal handler that calls finish on SIGINT"""
-
- def __init__(self, *args, **kwargs):
- super(SigIntMixin, self).__init__(*args, **kwargs)
- signal(SIGINT, self._sigint_handler)
-
- def _sigint_handler(self, signum, frame):
- self.finish()
- exit(0)
diff --git a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/spinner.py b/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/spinner.py
deleted file mode 100644
index 464c7b2..0000000
--- a/venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/progress/spinner.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
-#
-# Permission to use, copy, modify, and distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-from __future__ import unicode_literals
-from . import Infinite
-from .helpers import WriteMixin
-
-
-class Spinner(WriteMixin, Infinite):
- message = ''
- phases = ('-', '\\', '|', '/')
- hide_cursor = True
-
- def update(self):
- i = self.index % len(self.phases)
- self.write(self.phases[i])
-
-
-class PieSpinner(Spinner):
- phases = ['◷', '◶', '◵', '◴']
-
-
-class MoonSpinner(Spinner):
- phases = ['◑', '◒', '◐', '◓']
-
-
-class LineSpinner(Spinner):
- phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻']
-
-class PixelSpinner(Spinner):
- phases = ['⣾','⣷', '⣯', '⣟', '⡿', '⢿', '⣻', '⣽']