prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
seq_map[i]['speaker_str'] = "" seq_map[i]['speech_act'] = "" seq_map[i]['paragraph'] = True
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
quote_start = '"'
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
quote_start = ""
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
quote_end = '"'
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
quote_end = " "
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
speech_act = seq_map[i]['speech_act'] + ","
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
speech_act = seq_map[i]['speech_act']
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
__init__
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
make_transition_probs
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
after
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
speaker_sequence
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
speech_sequence
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
seq_to_names
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
make_speech_bits
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
simplify
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
report_seq
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
make_dialogue
<|file_name|>dialogue.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need t...
dev
<|file_name|>rst2xml.py<|end_file_name|><|fim▁begin|>#!/Users/Varun/Documents/GitHub/LockScreen/venv/bin/python # $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publ...
'reStructuredText sources. ' + default_description) publish_cmdline(writer_name='xml', description=description)
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
import glob pattern = os.path.join (utils.TEST_ROOT, "*") self.assertEquals (list (fs.glob (pattern)), glob.glob (pattern))
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): <|fim...
filenames = ["%d" % i for i in range (5)] def setUp (self): utils.mktemp () for filename in self.filenames: with open (os.path.join (utils.TEST_ROOT, filename), "w"): pass def tearDown (self): utils.rmtemp () def test_glob (self): import glob pattern = os.path.join (utils.TE...
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
utils.mktemp () for filename in self.filenames: with open (os.path.join (utils.TEST_ROOT, filename), "w"): pass
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
utils.rmtemp ()
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
import glob pattern = os.path.join (utils.TEST_ROOT, "*") self.assertEquals (list (fs.glob (pattern)), glob.glob (pattern))
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
import os fs_version = list (fs.listdir (utils.TEST_ROOT)) os_version = os.listdir (utils.TEST_ROOT) self.assertEquals (fs_version, os_version, "%s differs from %s" % (fs_version, os_version))
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
unittest.main () if sys.stdout.isatty (): raw_input ("Press enter...")
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
raw_input ("Press enter...")
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
setUp
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
tearDown
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
test_glob
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import os, sys import tempfile from winsys._compat import unittest import uuid import win32file from winsys.tests.test_fs import utils from winsys import fs class TestFS (unittest.TestCase): filen...
test_listdir
<|file_name|>run_evaluation.py<|end_file_name|><|fim▁begin|>import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) sys.path.append(os.path.dirname(BASE_DIR)) from global_variables import * from evaluation_helper import * cls_names = g_shape_names img_name_file_list = [os...
test_vp_acc(cls_names, img_name_file_list, result_folder, view_label_folder)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
from numpy import sqrt, multiply def corrcoef(x, y=None): c = cov(x, y)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
""" eye returns a N-by-M 2-d array where the k-th diagonal is all ones, and everything else is zeros. """ dtype = convtypecode(typecode, dtype) if M is None: M = N m = np.equal(np.subtract.outer(np.arange(N), np.arange(M)),-k) if m.dtype != dtype: return m.astype(dtype)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
""" returns a N-by-M array where all the diagonals starting from lower left corner up to the k-th are all ones. """ dtype = convtypecode(typecode, dtype) if M is None: M = N m = np.greater_equal(np.subtract.outer(np.arange(N), np.arange(M)),-k) if m.dtype != dtype: return ...
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return _Ntrapz(y, x, axis=axis)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return _Nptp(x, axis)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return _Ncumprod(x, axis)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return _Nmax(x, axis)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return _Nmin(x, axis)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return _Nprod(x, axis)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
N = asarray(x).shape[axis] return _Nstd(x, axis)*sqrt(N/(N-1.))
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return _Nmean(x, axis)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
if y is None: y = m else: y = y if rowvar: m = transpose(m) y = transpose(y) if (m.shape[0] == 1): m = transpose(m) if (y.shape[0] == 1): y = transpose(y) N = m.shape[0] if (y.shape[0] != N): raise ValueError("x and y must ...
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
c = cov(x, y) d = diag(c) return c/sqrt(multiply.outer(d,d))
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
M = N
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return m.astype(dtype)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
M = N
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
return m.astype(dtype)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
y = m
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
y = y
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
m = transpose(m) y = transpose(y)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
m = transpose(m)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
y = transpose(y)
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
raise ValueError("x and y must have the same number of observations")
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
fact = N*1.0
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
fact = N-1.0
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
eye
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
tri
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
trapz
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
ptp
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
cumprod
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
max
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
min
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
prod
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
std
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
mean
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
cov
<|file_name|>mlab.py<|end_file_name|><|fim▁begin|># This module is for compatibility only. All functions are defined elsewhere. __all__ = ['rand', 'tril', 'trapz', 'hanning', 'rot90', 'triu', 'diff', 'angle', 'roots', 'ptp', 'kaiser', 'randn', 'cumprod', 'diag', 'msort', 'LinearAlgebra', 'Ra...
corrcoef
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
class CheckoutPopup(wxDialog): def __init__(self, parent):
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
def __init__(self, parent): self.parent=parent wxDialog.__init__(self, parent,-1,"Check out items") self.mastersizer = wxBoxSizer(wxVERTICAL) self.static1 = wxStaticText(self, -1, "Check out to :") self.mastersizer.Add(self.static1) self.notebook = w...
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
self.parent=parent wxDialog.__init__(self, parent,-1,"Check out items") self.mastersizer = wxBoxSizer(wxVERTICAL) self.static1 = wxStaticText(self, -1, "Check out to :") self.mastersizer.Add(self.static1) self.notebook = wxNotebook(self, -1, style=wxNB_T...
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
borrower = self.parent.membersList.get(id) print borrower for i in self.parent.orderbox.items: # Check if this work on sqlobject 0.7... I got # lots of problem on 0.6.1, and itemID __isn't__ # defined in emprunt, which is plain weirdness e = Emprun...
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
self.EndModal(1)
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
borrower=self.borrower.GetValue() if len(borrower)>0: today="%s" % datetime.date.today() self.parent.orderbox.change_status(today+"-"+borrower) self.parent.orderbox.void() self.Close()
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
today="%s" % datetime.date.today() self.parent.orderbox.change_status(today+"-"+borrower) self.parent.orderbox.void()
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
__init__
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
Borrow
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
OnCancel
<|file_name|>checkout.py<|end_file_name|><|fim▁begin|># Copyright 2006 John Duda # This file is part of Infoshopkeeper. # Infoshopkeeper is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of t...
Checkout
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): <|fim_middle|> <|fim▁end|>
def setUp(self): import time self.repo_path = tempfile.mkdtemp(prefix='selftest-buildhistory', dir=get_bb_var('TOPDIR')) self.repo = Repo.init(self.repo_path) self.test_file = "test" self.var_map = {} def tearDown(self): import shutil shutil....
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): <|fim_middle|...
import time self.repo_path = tempfile.mkdtemp(prefix='selftest-buildhistory', dir=get_bb_var('TOPDIR')) self.repo = Repo.init(self.repo_path) self.test_file = "test" self.var_map = {}
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
import shutil shutil.rmtree(self.repo_path)
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
if len(to_add) == 0 and len(to_remove) == 0: return for k in to_remove: self.var_map.pop(x,None) for k in to_add: self.var_map[k] = to_add[k] with open(os.path.join(self.repo_path, self.test_file), 'w') as repo_file: for k in self.var_map...
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
""" Test convertion of git blobs to dictionary """ valuesmap = { "foo" : "1", "bar" : "2" } self.commit_vars(to_add = valuesmap) blob = self.repo.head.commit.tree.blobs[0] self.assertEqual(valuesmap, blob_to_dict(blob), "commit was not translated corr...
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
""" Test comparisson of dictionaries extracted from git blobs """ changesmap = { "foo-2" : ("2", "8"), "bar" : ("","4"), "bar-2" : ("","5")} self.commit_vars(to_add = { "foo" : "1", "foo-2" : "2", "foo-3" : "3" }) blob1 = self.repo.heads.master.commit.tree.blobs[0] ...
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
""" Test default values for comparisson of git blob dictionaries """ defaultmap = { x : ("default", "1") for x in ["PKG", "PKGE", "PKGV", "PKGR"]} self.commit_vars(to_add = { "foo" : "1" }) blob1 = self.repo.heads.master.commit.tree.blobs[0] self.commit_vars(to...
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
return
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def <|fim_middle|>(self): impo...
setUp
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
tearDown
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
commit_vars
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
test_blob_to_dict
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
test_compare_dict_blobs
<|file_name|>buildhistory.py<|end_file_name|><|fim▁begin|>import os import unittest import tempfile from git import Repo from oeqa.utils.commands import get_bb_var from oe.buildhistory_analysis import blob_to_dict, compare_dict_blobs class TestBlobParsing(unittest.TestCase): def setUp(self): import time ...
test_compare_dict_blobs_default
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for mongobacked project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SET...
from django.core.wsgi import get_wsgi_application
<|file_name|>282 Expression Add Operators.py<|end_file_name|><|fim▁begin|>""" Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. Examples: "123", 6 -> ["1+2+3", "1*2*3"]<|fim▁h...
<|file_name|>282 Expression Add Operators.py<|end_file_name|><|fim▁begin|>""" Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. Examples: "123", 6 -> ["1+2+3", "1*2*3"] "232",...
def addOperators(self, num, target): """ Adapted from https://leetcode.com/discuss/58614/java-standard-backtrace-ac-solutoin-short-and-clear Algorithm: 1. DFS 2. Special handling for multiplication 3. Detect invalid number with leading 0's :type num: str ...
<|file_name|>282 Expression Add Operators.py<|end_file_name|><|fim▁begin|>""" Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. Examples: "123", 6 -> ["1+2+3", "1*2*3"] "232",...
""" Adapted from https://leetcode.com/discuss/58614/java-standard-backtrace-ac-solutoin-short-and-clear Algorithm: 1. DFS 2. Special handling for multiplication 3. Detect invalid number with leading 0's :type num: str :type target: int :rtype: Lis...
<|file_name|>282 Expression Add Operators.py<|end_file_name|><|fim▁begin|>""" Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. Examples: "123", 6 -> ["1+2+3", "1*2*3"] "232",...
if pos >= len(num): if cur_val == target: ret.append(cur_str) else: for i in xrange(pos, len(num)): if i != pos and num[pos] == "0": continue nxt_val = int(num[pos:i+1]) if not cur_str: ...