prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>Gauss2.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Thu Sep 21 16:29:34 2017 @author: ishort """ import math """ procedure to generate Gaussian of unit area when passed a FWHM""" #IDL: PRO GAUSS2,FWHM,LENGTH,NGAUS def <|fim_middle|>(fwhm, length): #l...
gauss2
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
x = n.linspace(a,b,num_points) y = self.a*x**self.k + self.b return n.vstack((x,y))
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): <|fim_middle|> class Circle(Feature): ''' Feature class for a Circle ...
''' Abstract class that represents a feature to be used with :py:class:`pyransac.ransac.RansacFeature` ''' __metaclass__ = abc.ABCMeta @abc.abstractmethod def __init__(self): pass @abc.abstractproperty def min_points(self): '''int: Minimum number of points n...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
pass
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
'''int: Minimum number of points needed to define the feature.''' pass
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' This function implements a method to compute the distance of points from the feature. Args: points (numpy.ndarray): a numpy array of points the distance must be computed of. Returns: distances (numpy.ndarray): ...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' This method returns an array of x,y coordinates for points that are in the feature. Args: num_points (numpy.ndarray): the number of points to be returned Returns: coords (numpy.ndarray): a num_points x 2 numpy array that contains ...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' Feature class for a Circle :math:`(x-x_c)^2 + (y-y_c)^2 - r = 0` ''' min_points = 3 '''int: Minimum number of points needed to define the circle (3).''' def __init__(self,points): self.radius,self.xc,self.yc = self.__gen(points) def __gen(self,points): ''...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
self.radius,self.xc,self.yc = self.__gen(points)
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' Compute the radius and the center coordinates of a circumference given three points Args: points (numpy.ndarray): a (3,2) numpy array, each row is a 2D Point. Returns: (tuple): A 3 elements tuple that contains the circumference radi...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
r''' Compute the distance of the points from the feature :math:`d = \left| \sqrt{(x_i - x_c)^2 + (y_i-y_c)^2} - r \right|` Args: points (numpy.ndarray): a (3,2) numpy array, each row is a 2D Point. Returns: d (numpy.ndarray):...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' This method returns an array of x,y coordinates for points that are in the feature. Args: num_points (numpy.ndarray): the number of points to be returned Returns: coords (numpy.ndarray): a num_points x 2 numpy array that contains ...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' Feature Class for an exponential curve :math:`y=ax^{k} + b` ''' min_points = 3 def __init__(self,points): self.a,self.k,self.b = self.__gen(points) def __gen(self,points): ''' Compute the three parameters that univocally determine the exponenti...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
self.a,self.k,self.b = self.__gen(points)
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' Compute the three parameters that univocally determine the exponential curve Args: points(numpy.ndarray): a (3,2) numpy array, each row is a 2D Point. Returns: exp(numpy.ndarray): A (3,) numpy array that contains the a,n,b parameters...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' Non linear system function to use with :py:func:`scypy.optimize.root` ''' aa = x[0] nn = x[1] bb = x[2] f = n.zeros((3,)) f[0] = n.abs(aa)*n.power(points[0,0],nn)+bb - points[0,1] f[1] = n.abs(a...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
r''' Compute the distance of the points from the feature :math:`d = \sqrt{(x_i - x_c)^2 + (y_i-y_c)^2}` Args: points (numpy.ndarray): a (3,2) numpy array, each row is a 2D Point. Returns: d (numpy.ndarray): the computed dist...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
''' This method returns an array of x,y coordinates for points that are in the feature in the interval [a,b]. Args: num_points (numpy.ndarray): the number of points to be returned a (float): left end of the interval b (float): right end of the...
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
__init__
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
min_points
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
points_distance
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
print_feature
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
__init__
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
__gen
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
points_distance
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
print_feature
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
__init__
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
__gen
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
exponential
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
points_distance
<|file_name|>features.py<|end_file_name|><|fim▁begin|>from __future__ import division import abc import numpy as n import scipy.linalg as linalg import scipy.optimize as opt import scipy.spatial.distance as dist class Feature(object): ''' Abstract class that represents a feature to be used with :py:class:`...
print_feature
<|file_name|>list.py<|end_file_name|><|fim▁begin|>import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-...
lock_wait = storage_config.get('lock_wait', None)
<|file_name|>list.py<|end_file_name|><|fim▁begin|>import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-...
''' Given a local or remote repository path, an archive name, a storage config dict, a local Borg path, and a remote Borg path, simply return the archive name. But if the archive name is "latest", then instead introspect the repository for the latest successful (non-checkpoint) archive, and return i...
<|file_name|>list.py<|end_file_name|><|fim▁begin|>import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-...
''' Given a local or remote repository path, a storage config dict, and the arguments to the list action, display the output of listing Borg archives in the repository or return JSON output. Or, if an archive name is given, listing the files in that archive. ''' lock_wait = storage_config.get('l...
<|file_name|>list.py<|end_file_name|><|fim▁begin|>import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-...
return archive
<|file_name|>list.py<|end_file_name|><|fim▁begin|>import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-...
list_arguments.glob_archives = BORG_EXCLUDE_CHECKPOINTS_GLOB
<|file_name|>list.py<|end_file_name|><|fim▁begin|>import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-...
resolve_archive_name
<|file_name|>list.py<|end_file_name|><|fim▁begin|>import logging from borgmatic.borg.flags import make_flags, make_flags_from_arguments from borgmatic.execute import execute_command logger = logging.getLogger(__name__) # A hack to convince Borg to exclude archives ending in ".checkpoint". This assumes that a # non-...
list_archives
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): <|fim_middle|> from pypet.tests.integration.environment_test import EnvironmentTest, ResultSortTest from pypet.tests.int...
if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: print('SCOOP NOT running!') return True
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
tags = 'integration', 'hdf5', 'environment', 'multiproc', 'netqueue', 'scoop' def set_mode(self): super(MultiprocSCOOPNetqueueTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETQUEUE self.multiproc = True self.freeze_input = False self.ncores = 4 self...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
super(MultiprocSCOOPNetqueueTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETQUEUE self.multiproc = True self.freeze_input = False self.ncores = 4 self.gc_interval = 3 self.niceness = check_nice(1) self.use_pool = False self.use_scoop...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
pass
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
tags = 'integration', 'hdf5', 'environment', 'multiproc', 'local', 'scoop' def set_mode(self): super(MultiprocSCOOPSortLocalTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_LOCAL self.freeze_input = False self.multiproc = True self.ncores = 4 self.use_...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
super(MultiprocSCOOPSortLocalTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_LOCAL self.freeze_input = False self.multiproc = True self.ncores = 4 self.use_pool = False self.use_scoop = True self.graceful_exit = False
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
pass
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
tags = 'integration', 'hdf5', 'environment', 'multiproc', 'local', 'scoop', 'freeze_input' def set_mode(self): super(MultiprocFrozenSCOOPLocalTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_LOCAL self.multiproc = True self.freeze_input = True self.ncores = 4 ...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
super(MultiprocFrozenSCOOPLocalTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_LOCAL self.multiproc = True self.freeze_input = True self.ncores = 4 self.gc_interval = 3 self.niceness = check_nice(1) self.use_pool = False self.use_scoop ...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
pass
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
tags = 'integration', 'hdf5', 'environment', 'multiproc', 'netlock', 'scoop', 'freeze_input' def set_mode(self): super(MultiprocFrozenSCOOPSortNetlockTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETLOCK self.freeze_input = True self.multiproc = True self.n...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
super(MultiprocFrozenSCOOPSortNetlockTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETLOCK self.freeze_input = True self.multiproc = True self.ncores = 4 self.use_pool = False self.use_scoop = True self.port = (10000, 60000) self.grac...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
pass
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
tags = 'integration', 'hdf5', 'environment', 'multiproc', 'netqueue', 'scoop', 'freeze_input', 'mehmet' def set_mode(self): super(MultiprocFrozenSCOOPSortNetqueueTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETQUEUE self.freeze_input = True self.multiproc = True ...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
super(MultiprocFrozenSCOOPSortNetqueueTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETQUEUE self.freeze_input = True self.multiproc = True self.ncores = 4 self.use_pool = False self.use_scoop = True self.graceful_exit = False #self.p...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
pass
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
tags = 'integration', 'hdf5', 'environment', 'multiproc', 'netlock', 'scoop' def set_mode(self): super(MultiprocSCOOPNetlockTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETLOCK self.multiproc = True self.freeze_input = False self.ncores = 4 self.gc...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
super(MultiprocSCOOPNetlockTest, self).set_mode() self.mode = pypetconstants.WRAP_MODE_NETLOCK self.multiproc = True self.freeze_input = False self.ncores = 4 self.gc_interval = 3 self.niceness = check_nice(1) self.use_pool = False self.use_scoop =...
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
pass
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: <|fim_middle|> else: print('SCOOP NOT running!') ...
print('SCOOP mode functional!') return False
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: ...
print('SCOOP NOT running!') return True
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
opt_args = parse_args() run_suite(**opt_args)
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def <|fim_middle|>(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: print('SCOOP ...
scoop_not_functional_check
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
set_mode
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
test_niceness
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
set_mode
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
test_graceful_exit
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
set_mode
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
test_niceness
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
set_mode
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
test_graceful_exit
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
set_mode
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
test_graceful_exit
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
set_mode
<|file_name|>environment_scoop_test.py<|end_file_name|><|fim▁begin|>__author__ = 'Robert Meyer' try: import scoop except ImportError: scoop = None def scoop_not_functional_check(): if scoop is not None and scoop.IS_RUNNING: print('SCOOP mode functional!') return False else: p...
test_niceness
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir()<|fim▁hole|> class FrameTest(unittest.TestCase): def setUp(self): s...
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): <|fim_middle|> def main(): uni...
def setUp(self): self.escala = Escala('fixtures/escala.xml') self.dir = dirs.TestDir() self.maxDiff = None def tearDown(self): pass def test_attributos_voo_1(self): p_voo = self.escala.escalas[0] self.assertEqual(p_voo.activity_date, datetime(2013, 3, 1, 11...
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): <|fim_middle...
self.escala = Escala('fixtures/escala.xml') self.dir = dirs.TestDir() self.maxDiff = None
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
pass
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
p_voo = self.escala.escalas[0] self.assertEqual(p_voo.activity_date, datetime(2013, 3, 1, 11, 36)) self.assertEqual(p_voo.present_location, 'VCP') self.assertEqual(p_voo.flight_no, '4148') self.assertEqual(p_voo.origin, 'VCP') self.assertEqual(p_voo.destination, 'GYN') ...
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
p_voo = self.escala.escalas[17] self.assertEqual(p_voo.activity_date, datetime(2013, 10, 28, 3, 0)) self.assertEqual(p_voo.present_location, 'VCP') self.assertEqual(p_voo.flight_no, None) self.assertEqual(p_voo.origin, 'VCP') self.assertEqual(p_voo.destination, 'VCP') ...
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
p_voo = self.escala.escalas[18] self.assertEqual(p_voo.activity_date, datetime(2013, 10, 29, 4, 58)) self.assertEqual(p_voo.present_location, 'VCP') self.assertEqual(p_voo.flight_no, '4050') self.assertEqual(p_voo.origin, 'VCP') self.assertEqual(p_voo.destination, 'FLN')...
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
p_voo = self.escala.escalas[25] self.assertFalse(p_voo.checkin) self.assertEqual(p_voo.checkin_time, None) self.assertEqual(p_voo.flight_no, '2872') self.assertEqual(p_voo.activity_info, 'AD2872')
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
s_horas = { 'h_diurno': '6:40', 'h_noturno': '6:47', 'h_total_voo': '13:27', 'h_faixa2': '0:00', 'h_sobreaviso': '40:00', 'h_reserva': '29:13' } self.assertEqual(self.escala.soma_horas(), s_horas)
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
""" Check ICS output """ escala = Escala('fixtures/escala_ics.xml') f_result = open(self.dir.get_data_dir() + 'fixtures/escala.ics') self.assertEqual(escala.ics(), f_result.read()) f_result.close()
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
""" Check CSV output """ f_result = open(self.dir.get_data_dir() + 'fixtures/escala.csv') self.assertEqual(self.escala.csv(), f_result.read()) f_result.close()
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
unittest.main()
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
main()
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def <|fim_middle|>(self): sel...
setUp
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
tearDown
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
test_attributos_voo_1
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
test_attributos_voo_17
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
test_attributos_voo_18
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
test_attributos_quarto_voo
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
test_calculo_horas_voadas
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
test_ics
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
test_csv
<|file_name|>test_escala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # coding=utf-8 import unittest from datetime import datetime from lib.escala import Escala import dirs dirs.DEFAULT_DIR = dirs.TestDir() class FrameTest(unittest.TestCase): def setUp(self): self.escala ...
main
<|file_name|>test_compat.py<|end_file_name|><|fim▁begin|>""" Test cases adapted from the test_bsddb.py module in Python's regression test suite. """ import sys, os, string import unittest import tempfile from test_all import verbose try: # For Python 2.3 from bsddb import db, hashopen, btopen, rnopen except ...
print rec assert f.has_key('f'), 'Error, missing key!'
<|file_name|>test_compat.py<|end_file_name|><|fim▁begin|>""" Test cases adapted from the test_bsddb.py module in Python's regression test suite. """ import sys, os, string import unittest import tempfile from test_all import verbose try: # For Python 2.3 from bsddb import db, hashopen, btopen, rnopen except ...
def setUp(self): self.filename = tempfile.mktemp() def tearDown(self): try: os.remove(self.filename) except os.error: pass def test01_btopen(self): self.do_bthash_test(btopen, 'btopen') def test02_hashopen(self): self.do_bthash_test(has...
<|file_name|>test_compat.py<|end_file_name|><|fim▁begin|>""" Test cases adapted from the test_bsddb.py module in Python's regression test suite. """ import sys, os, string import unittest import tempfile from test_all import verbose try: # For Python 2.3 from bsddb import db, hashopen, btopen, rnopen except ...
self.filename = tempfile.mktemp()