Beispiel #1
0
def ss(paths):  # pylint: disable=invalid-name
    """Download subtitles for multiple video files via periscope."""

    from ss import main

    with devnull():
        # main will strip arg[0]
        main(['ss'] + paths)
Beispiel #2
0
 def run(self, *args):
     stream = StringIO()
     args = [str(self._tmpdir / x) if not x.startswith('--') else x for x in
             args]
     result = ss.main(['ss'] + args, stream=stream)
     self.output = stream.getvalue()
     return result
def run_python_scripts(both):
    import ss
    print('===> Running script with python{0}...'.format(ourver))
    ss.main()
    if both:
        print('===> Running script with python{0}...'.format(V[ourver]))
        with open(os.devnull, 'w') as devnull:
            try:
                subprocess.check_call(
                    ['python{v}'.format(v=V[ourver]), 'ss.py'],
                    stdout=devnull, stderr=devnull)
            except:
                subprocess.check_call(
                    ['python', 'ss.py'],
                    env={'PYENV_VERSION': '2.7.8',
                        'PATH': os.environ['PATH']},
                    stdout=devnull)
Beispiel #4
0
 def run(self, *args):
     stream = StringIO()
     args = [
         str(self._tmpdir / x) if not x.startswith('--') else x
         for x in args
     ]
     result = ss.main(['ss'] + args, stream=stream)
     self.output = stream.getvalue()
     return result
import os
import ss
import psutil
import time

print("Software Secret Sharing Benchmark System---------------")
process = psutil.Process(os.getpid())
start = time.time()
string = input("Enter a 10 word string : ")
ss.main(string)
end = time.time()
print("Maximum memory requirement : ", process.memory_info().rss)
print("Time Taken : ", end - start)
ss.main()