You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@senssoft.apache.org by ar...@apache.org on 2016/12/16 17:10:34 UTC

[16/58] [abbrv] [partial] incubator-senssoft-tap git commit: Fixed .gitignore file

http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/blob/6a81d1e7/env2/lib/python2.7/site-packages/pip/_vendor/progress/__init__.py
----------------------------------------------------------------------
diff --git a/env2/lib/python2.7/site-packages/pip/_vendor/progress/__init__.py b/env2/lib/python2.7/site-packages/pip/_vendor/progress/__init__.py
deleted file mode 100644
index 5107bc0..0000000
--- a/env2/lib/python2.7/site-packages/pip/_vendor/progress/__init__.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (c) 2012 Giorgos Verigakis <ve...@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.2'
-
-
-class Infinite(object):
-    file = stderr
-    sma_window = 10
-
-    def __init__(self, *args, **kwargs):
-        self.index = 0
-        self.start_ts = time()
-        self._ts = self.start_ts
-        self._dt = 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 avg(self):
-        return sum(self._dt) / len(self._dt) if self._dt else 0
-
-    @property
-    def elapsed(self):
-        return int(time() - self.start_ts)
-
-    @property
-    def elapsed_td(self):
-        return timedelta(seconds=self.elapsed)
-
-    def update(self):
-        pass
-
-    def start(self):
-        pass
-
-    def finish(self):
-        pass
-
-    def next(self, n=1):
-        if n > 0:
-            now = time()
-            dt = (now - self._ts) / n
-            self._dt.append(dt)
-            self._ts = now
-
-        self.index = self.index + n
-        self.update()
-
-    def iter(self, it):
-        for x in it:
-            yield x
-            self.next()
-        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
-
-        for x in it:
-            yield x
-            self.next()
-        self.finish()

http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/blob/6a81d1e7/env2/lib/python2.7/site-packages/pip/_vendor/progress/bar.py
----------------------------------------------------------------------
diff --git a/env2/lib/python2.7/site-packages/pip/_vendor/progress/bar.py b/env2/lib/python2.7/site-packages/pip/_vendor/progress/bar.py
deleted file mode 100644
index 8ce1461..0000000
--- a/env2/lib/python2.7/site-packages/pip/_vendor/progress/bar.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2012 Giorgos Verigakis <ve...@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 . 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 = u'\u2219'
-    fill = u'\u2588'
-
-
-class FillingSquaresBar(ChargingBar):
-    empty_fill = u'\u25a2'
-    fill = u'\u25a3'
-
-
-class FillingCirclesBar(ChargingBar):
-    empty_fill = u'\u25ef'
-    fill = u'\u25c9'
-
-
-class IncrementalBar(Bar):
-    phases = (u' ', u'\u258f', u'\u258e', u'\u258d', u'\u258c', u'\u258b', u'\u258a', u'\u2589', u'\u2588')
-
-    def update(self):
-        nphases = len(self.phases)
-        expanded_length = int(nphases * self.width * self.progress)
-        filled_length = int(self.width * self.progress)
-        empty_length = self.width - filled_length
-        phase = expanded_length - (filled_length * nphases)
-
-        message = self.message % self
-        bar = self.phases[-1] * filled_length
-        current = self.phases[phase] if phase > 0 else ''
-        empty = self.empty_fill * max(0, empty_length - len(current))
-        suffix = self.suffix % self
-        line = ''.join([message, self.bar_prefix, bar, current, empty,
-                        self.bar_suffix, suffix])
-        self.writeln(line)
-
-
-class ShadyBar(IncrementalBar):
-    phases = (u' ', u'\u2591', u'\u2592', u'\u2593', u'\u2588')

http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/blob/6a81d1e7/env2/lib/python2.7/site-packages/pip/_vendor/progress/counter.py
----------------------------------------------------------------------
diff --git a/env2/lib/python2.7/site-packages/pip/_vendor/progress/counter.py b/env2/lib/python2.7/site-packages/pip/_vendor/progress/counter.py
deleted file mode 100644
index caaddc6..0000000
--- a/env2/lib/python2.7/site-packages/pip/_vendor/progress/counter.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2012 Giorgos Verigakis <ve...@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 . 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 = (u' ', u'\u2581', u'\u2582', u'\u2583', u'\u2584', u'\u2585', u'\u2586', u'\u2587', u'\u2588')
-    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 = (u'\u25cb', u'\u25d4', u'\u25d1', u'\u25d5', u'\u25cf')

http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/blob/6a81d1e7/env2/lib/python2.7/site-packages/pip/_vendor/progress/helpers.py
----------------------------------------------------------------------
diff --git a/env2/lib/python2.7/site-packages/pip/_vendor/progress/helpers.py b/env2/lib/python2.7/site-packages/pip/_vendor/progress/helpers.py
deleted file mode 100644
index 9ed90b2..0000000
--- a/env2/lib/python2.7/site-packages/pip/_vendor/progress/helpers.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright (c) 2012 Giorgos Verigakis <ve...@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.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.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.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.isatty() and self.hide_cursor:
-            print(HIDE_CURSOR, end='', file=self.file)
-
-    def clearln(self):
-        if self.file.isatty():
-            print('\r\x1b[K', end='', file=self.file)
-
-    def writeln(self, line):
-        if self.file.isatty():
-            self.clearln()
-            print(line, end='', file=self.file)
-            self.file.flush()
-
-    def finish(self):
-        if 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)

http://git-wip-us.apache.org/repos/asf/incubator-senssoft-tap/blob/6a81d1e7/env2/lib/python2.7/site-packages/pip/_vendor/progress/spinner.py
----------------------------------------------------------------------
diff --git a/env2/lib/python2.7/site-packages/pip/_vendor/progress/spinner.py b/env2/lib/python2.7/site-packages/pip/_vendor/progress/spinner.py
deleted file mode 100644
index 969bfbb..0000000
--- a/env2/lib/python2.7/site-packages/pip/_vendor/progress/spinner.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2012 Giorgos Verigakis <ve...@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 . 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 = [u'\u25f7', u'\u25f6', u'\u25f5', u'\u25f4']
-
-
-class MoonSpinner(Spinner):
-    phases = [u'\u25d1', u'\u25d2', u'\u25d0', u'\u25d3']
-
-
-class LineSpinner(Spinner):
-    phases = [u'\u23ba', u'\u23bb', u'\u23bc', u'\u23bd', u'\u23bc', u'\u23bb']