rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
sage: latex.pdflatex() | sage: latex.pdflatex() doctest:...: DeprecationWarning: Use engine() instead. | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
sage: latex.pdflatex(False) | sage: latex.pdflatex(False) doctest:...: DeprecationWarning: Use engine("latex") instead. | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
return _Latex_prefs._option["pdflatex"] _Latex_prefs._option["pdflatex"] = bool(t) | from sage.misc.misc import deprecation deprecation('Use engine() instead.') return _Latex_prefs._option["engine"] == "pdflatex" elif t: from sage.misc.misc import deprecation deprecation('Use engine("pdflatex") instead.') self.engine("pdflatex") else: from sage.misc.misc import deprecation deprecation('Use engine("late... | def pdflatex(self, t = None): """ Controls whether Sage uses PDFLaTeX or LaTeX when typesetting with :func:`view`, in ``%latex`` cells, etc. INPUT: - ``t`` -- boolean or None | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, engine=None, viewer = None, tightpage = None, mode='inline', **kwds): | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
- ``pdflatex`` - bool (default: False): use pdflatex. | - ``pdflatex`` - bool (default: False): use pdflatex. This is deprecated. Use 'engine' option instead. - ``engine`` - 'latex', 'pdflatex', or 'xelatex' | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
If ``pdflatex`` is ``True``, then this produces a pdf file. Otherwise, it produces a dvi file, and if the program dvipng is | If ``pdflatex`` is ``True``, then the latex engine is set to pdflatex. If the engine is either pdflatex or xelatex, it produces a pdf file. Otherwise, it produces a dvi file, and if the program dvipng is | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
viewer, even in notebook mode. This also sets ``pdflatex`` to ``True``. | viewer, even in notebook mode. This also sets the latex engine to be ``pdflatex`` if the current engine is latex. | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
debug=debug, do_in_background=False, pdflatex=pdflatex) | debug=debug, do_in_background=False, engine=engine) | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
if viewer == "pdf": pdflatex = True if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] | if pdflatex: engine = "pdflatex" else: engine = _Latex_prefs._option["engine"] if viewer == "pdf" and engine == "latex": engine = "pdflatex" | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
suffix = _run_latex_(tex_file, debug=debug, pdflatex=pdflatex, png=False) | suffix = _run_latex_(tex_file, debug=debug, engine=engine, png=False) | def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, mode='inline', **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - `... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py | ||
do_in_background=False, tiny=False, pdflatex=True): | do_in_background=False, tiny=False, pdflatex=True, engine='pdflatex'): | def png(x, filename, density=150, debug=False, do_in_background=False, tiny=False, pdflatex=True): """ Create a png image representation of ``x`` and save to the given filename. INPUT: - ``x`` - object to be displayed - ``filename`` - file in which to save the image - ``density`` - integer (default: 150) - ``d... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
- ``pdflatex`` - bool (default: False): use pdflatex. | - ``pdflatex`` - bool (default: True): use pdflatex. This option is deprecated. Use ``engine`` option instead. See below. - ``engine`` - 'latex', 'pdflatex', or 'xelatex' (default: 'pdflatex') | def png(x, filename, density=150, debug=False, do_in_background=False, tiny=False, pdflatex=True): """ Create a png image representation of ``x`` and save to the given filename. INPUT: - ``x`` - object to be displayed - ``filename`` - file in which to save the image - ``density`` - integer (default: 150) - ``d... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
pdflatex=pdflatex) | engine=engine) | def png(x, filename, density=150, debug=False, do_in_background=False, tiny=False, pdflatex=True): """ Create a png image representation of ``x`` and save to the given filename. INPUT: - ``x`` - object to be displayed - ``filename`` - file in which to save the image - ``density`` - integer (default: 150) - ``d... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py |
def repr_lincomb(symbols, coeffs): r""" Compute a latex representation of a linear combination of some formal symbols. INPUT: - ``symbols`` - list of symbols - ``coeffs`` - list of coefficients of the symbols OUTPUT: a string EXAMPLES:: sage: t = PolynomialRing(QQ, 't').0 sage: from sage.misc.latex import repr_... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py | ||
def print_or_typeset(object): r""" 'view' or 'print' the object depending on the situation. In particular, if in notebook mode with the typeset box checked, view the object. Otherwise, print the object. INPUT: object: anything EXAMPLES:: sage: sage.misc.latex.print_or_typeset(3) 3 sage: sage.misc.latex.EMBEDDED_MOD... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py | ||
def pretty_print (object): r""" Try to pretty print an object in an intelligent way. For graphics objects, this returns their default representation. For other objects, in the notebook, this calls the :func:`view` command, while from the command line, this produces an html string suitable for processing by jsMath. I... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py | ||
def pretty_print_default(enable=True): r""" Enable or disable default pretty printing. Pretty printing means rendering things so that jsMath or some other latex-aware front end can render real math. INPUT: - ``enable`` - bool (optional, default True). If True, turn on pretty printing; if False, turn it off. EXAMPL... | f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py | ||
Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. | Returns the unique graph on \{0,1,...,n-1\} ( n = self.order() ) which - is isomorphic to self, - has canonical vertex labels, - allows only permutations of vertices respecting the input set partition (if given). Canonical here means that all graphs isomorphic to self (and respecting the input set partition) have the ... | def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The defa... | b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d/generic_graph.py |
def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The defa... | b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d/generic_graph.py | ||
respect to this partition will be computed. The default is the unit partition. | respect to this set partition will be computed. The default is the unit set partition. | def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The defa... | b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d/generic_graph.py |
b_new = {} | c_new = {} | def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The defa... | b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d/generic_graph.py |
b_new[v] = c[G_to[('o',v)]] H.relabel(b_new) | c_new[v] = c[G_to[('o',v)]] H.relabel(c_new) | def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The defa... | b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d/generic_graph.py |
return H, relabeling | return H, c_new | def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition. INPUT: - ``partition`` - if given, the canonical label with respect to this partition will be computed. The defa... | b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/b5e5dfc619f6cc30b2f7d1ab5407ca3a6ae71e4d/generic_graph.py |
return (self._sublattice_polytope.facet_constant(i) - self.facet_normal(i) * self._shift_vector) | return (self._sublattice_polytope.facet_constant(i) * self._dual_embedding_scale - self.facet_normal(i) * self._shift_vector ) | def facet_constant(self, i): r""" Return the constant in the ``i``-th facet inequality of this polytope. The i-th facet inequality is given by self.facet_normal(i) * X + self.facet_constant(i) >= 0. INPUT: - ``i`` - integer, the index of the facet OUTPUT: - integer -- the constant in the ``i``-th facet inequality.... | 5d2ccf837d47fabef2f7b0b9759c6d6ecf768401 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5d2ccf837d47fabef2f7b0b9759c6d6ecf768401/lattice_polytope.py |
return (self._embedding_matrix * self._sublattice_polytope.facet_normal(i)) | return ( self._sublattice_polytope.facet_normal(i) * self._dual_embedding_matrix ) | def facet_normal(self, i): r""" Return the inner normal to the ``i``-th facet of this polytope. If this polytope is not full-dimensional, facet normals will be parallel to the affine subspace spanned by this polytope. INPUT: - ``i`` -- integer, the index of the facet OUTPUT: - vectors -- the inner normal of the ``... | 5d2ccf837d47fabef2f7b0b9759c6d6ecf768401 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5d2ccf837d47fabef2f7b0b9759c6d6ecf768401/lattice_polytope.py |
.. [CB07] Nicolas T\. Courtois, Gregory V\. Bard *Algebraic Cryptanalysis of the Data Encryption Standard*; Cryptography and Coding -- 11th IMA International Conference; 2007; available at http://eprint.iacr.org/2006/402 | .. [CBJ07] Gregory V\. Bard, and Nicolas T\. Courtois, and Chris Jefferson. *Efficient Methods for Conversion and Solution of Sparse Systems of Low-Degree Multivariate Polynomials over GF(2) via SAT-Solvers*. Cryptology ePrint Archive: Report 2007/024. available at http://eprint.iacr.org/2007/024 | def eliminate_linear_variables(self, maxlength=3, skip=lambda lm,tail: False): """ Return a new system where "linear variables" are eliminated. | 586ee35f95c0b4f8d93afe029d8465e36cbdc9ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/586ee35f95c0b4f8d93afe029d8465e36cbdc9ea/mpolynomialsystem.py |
def is_integral_domain(self, proof = True): r""" If this function returns ``True`` then self is definitely an integral domain. If it returns ``False``, then either self is definitely not an integral domain or this function was unable to determine whether or not self is an integral domain. Use ``self.defining_ideal().i... | def is_integral_domain(self, proof=True): r""" With ``proof`` equal to ``True`` (the default), this function may raise a ``NotImplementedError``. When ``proof`` is ``False``, if ``True`` is returned, then self is definitely an integral domain. If the function returns ``False``, then either self is not an integral do... | def is_integral_domain(self, proof = True): r""" If this function returns ``True`` then self is definitely an integral domain. If it returns ``False``, then either self is definitely not an integral domain or this function was unable to determine whether or not self is an integral domain. Use ``self.defining_ideal().i... | 7ed9595a85a12f0211561d84e6407965a64cb54a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7ed9595a85a12f0211561d84e6407965a64cb54a/quotient_ring.py |
sage: R.<a,b,c> = ZZ['a','b','c'] sage: I = R.ideal(a,b) sage: Q = R.quotient_ring(I) | sage: R.quo(x^2 - y^2).is_integral_domain(proof=False) False sage: R.<a,b,c> = ZZ[] sage: Q = R.quotient_ring([a, b]) | def is_integral_domain(self, proof = True): r""" If this function returns ``True`` then self is definitely an integral domain. If it returns ``False``, then either self is definitely not an integral domain or this function was unable to determine whether or not self is an integral domain. Use ``self.defining_ideal().i... | 7ed9595a85a12f0211561d84e6407965a64cb54a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7ed9595a85a12f0211561d84e6407965a64cb54a/quotient_ring.py |
return self.defining_ideal.is_prime() except AttributeError: return False | return self.defining_ideal().is_prime() | def is_integral_domain(self, proof = True): r""" If this function returns ``True`` then self is definitely an integral domain. If it returns ``False``, then either self is definitely not an integral domain or this function was unable to determine whether or not self is an integral domain. Use ``self.defining_ideal().i... | 7ed9595a85a12f0211561d84e6407965a64cb54a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/7ed9595a85a12f0211561d84e6407965a64cb54a/quotient_ring.py |
""" | r""" | def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces. If the option extend is set to True (default), then eigenvalues in extensions of the base field are considered. EXAMPLES: We compute the eigenvalues of an endomorphism of QQ^3:: sage: V=QQ^3 sage: H=V.en... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
If the option extend is set to True (default), then eigenvalues in extensions of the base field are considered. | INPUT: - ``extend`` -- boolean (default: True) decides if base field extensions should be considered or not. | def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces. If the option extend is set to True (default), then eigenvalues in extensions of the base field are considered. EXAMPLES: We compute the eigenvalues of an endomorphism of QQ^3:: sage: V=QQ^3 sage: H=V.en... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
We compute the eigenvalues of an endomorphism of QQ^3:: | We compute the eigenvalues of an endomorphism of `\QQ^3`:: | def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces. If the option extend is set to True (default), then eigenvalues in extensions of the base field are considered. EXAMPLES: We compute the eigenvalues of an endomorphism of QQ^3:: sage: V=QQ^3 sage: H=V.en... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
Note the effect of the extend option:: | Note the effect of the ``extend`` option:: | def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces. If the option extend is set to True (default), then eigenvalues in extensions of the base field are considered. EXAMPLES: We compute the eigenvalues of an endomorphism of QQ^3:: sage: V=QQ^3 sage: H=V.en... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
def eigenvalues(self,extend=True): """ Returns a list with the eigenvalues of the endomorphism of vector spaces. If the option extend is set to True (default), then eigenvalues in extensions of the base field are considered. EXAMPLES: We compute the eigenvalues of an endomorphism of QQ^3:: sage: V=QQ^3 sage: H=V.en... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py | ||
- extend (True) decides if base field extensions should be considered or not. | - ``extend`` -- boolean (default: True) decides if base field extensions should be considered or not. | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors, and the algebraic multiplicity of the eigenvalue. | A sequence of tuples. Each tuple contains an eigenvalue, a sequence with a basis of the corresponding subspace of eigenvectors, and the algebraic multiplicity of the eigenvalue. | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
[(3, [(0, 0, 1, -6/7)], 1), (-1*I, [(1, 1*I, 0, -0.571428571428572? + 2.428571428571429?*I)], 1), (1*I, [(1, -1*I, 0, -0.571428571428572? - 2.428571428571429?*I)], 1)] | [(3, [ (0, 0, 1, -6/7) ], 1), (-1*I, [ (1, 1*I, 0, -0.571428571428572? + 2.428571428571429?*I) ], 1), (1*I, [ (1, -1*I, 0, -0.571428571428572? - 2.428571428571429?*I) ], 1)] | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
[(3, [(0, 0, 1, -6/7)], 1)] | [(3, [ (0, 0, 1, -6/7) ], 1)] | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
[(3, [(0, 0, 1, -6/7)], 1), (2, [(0, 1, 0, 17/7)], 2)] | [(3, [ (0, 0, 1, -6/7) ], 1), (2, [ (0, 1, 0, 17/7) ], 2)] | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
[(3, [(0, 0, 1, -6/7)], 1), (2, [(0, 1, 0, 17/7)], 2)] | [(3, [ (0, 0, 1, -6/7) ], 1), (2, [ (0, 1, 0, 17/7) ], 2)] | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
svectors=map(lambda j: V(j * V.basis_matrix()),i[1]) resu.append(tuple([i[0],svectors,i[2]])) | svectors=Sequence(map(lambda j: V(j * V.basis_matrix()),i[1]), cr=True) resu.append((i[0],svectors,i[2])) | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
- ``var`` - string (default: 'x') a variable | - ``var`` - string (default: 'x') a variable name | def minpoly(self,var='x'): """ Computes the minimal polynomial. INPUT: - ``var`` - string (default: 'x') a variable OUTPUT: polynomial in var - the minimal polynomial of the endomorphism. EXAMPLES: Compute the minimal polynomial, and check it :: sage: V=GF(7)^3 sage: H=V.Hom(V)([[0,1,2],[-1,0,3],[2,4,1]]) sage:... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
raise TypeError, "not an endomorphism" | raise TypeError, "not an endomorphism" | def minpoly(self,var='x'): """ Computes the minimal polynomial. INPUT: - ``var`` - string (default: 'x') a variable OUTPUT: polynomial in var - the minimal polynomial of the endomorphism. EXAMPLES: Compute the minimal polynomial, and check it :: sage: V=GF(7)^3 sage: H=V.Hom(V)([[0,1,2],[-1,0,3],[2,4,1]]) sage:... | f2124d796b0473b4641a76aac10b15823a1166b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f2124d796b0473b4641a76aac10b15823a1166b9/free_module_morphism.py |
nr_common = len(reduce(sets.Set.intersection, \ [sets.Set(c1[r]), sets.Set(c2[c]), sets.Set(c3[s])])) | nr_common = len(reduce(set.intersection, \ [set(c1[r]), set(c2[c]), set(c3[s])])) | def tau_to_bitrade(t1, t2, t3): """ Given permutations t1, t2, t3 that represent a latin bitrade, convert them to an explicit latin bitrade (T1, T2). The result is unique up to isotopism. EXAMPLE:: sage: from sage.combinat.matrices.latin import * sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y... | 51de86397c8440b9e23046c2f90476176b06c3fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/51de86397c8440b9e23046c2f90476176b06c3fd/latin.py |
val1 = sets.Set(filter(lambda x: x >= 0, T1.row(r))) val2 = sets.Set(filter(lambda x: x >= 0, T2.row(r))) | val1 = set(filter(lambda x: x >= 0, T1.row(r))) val2 = set(filter(lambda x: x >= 0, T2.row(r))) | def is_row_and_col_balanced(T1, T2): """ Partial latin squares T1 and T2 are balanced if the symbols appearing in row r of T1 are the same as the symbols appearing in row r of T2, for each r, and if the same condition holds on columns. EXAMPLES:: sage: from sage.combinat.matrices.latin import * sage: T1 = matrix([[0,... | 51de86397c8440b9e23046c2f90476176b06c3fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/51de86397c8440b9e23046c2f90476176b06c3fd/latin.py |
val1 = sets.Set(filter(lambda x: x >= 0, T1.column(c))) val2 = sets.Set(filter(lambda x: x >= 0, T2.column(c))) | val1 = set(filter(lambda x: x >= 0, T1.column(c))) val2 = set(filter(lambda x: x >= 0, T2.column(c))) | def is_row_and_col_balanced(T1, T2): """ Partial latin squares T1 and T2 are balanced if the symbols appearing in row r of T1 are the same as the symbols appearing in row r of T2, for each r, and if the same condition holds on columns. EXAMPLES:: sage: from sage.combinat.matrices.latin import * sage: T1 = matrix([[0,... | 51de86397c8440b9e23046c2f90476176b06c3fd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/51de86397c8440b9e23046c2f90476176b06c3fd/latin.py |
X = list(X) | return Set_object_enumerated(list(X)) | def Set(X): r""" Create the underlying set of $X$. If $X$ is a list, tuple, Python set, or ``X.is_finite()`` is true, this returns a wrapper around Python's enumerated immutable frozenset type with extra functionality. Otherwise it returns a more formal wrapper. If you need the functionality of mutable sets, use Pyt... | 0fccbc2fd43f9020220c9b658459175e92556187 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0fccbc2fd43f9020220c9b658459175e92556187/set.py |
def iter_morphisms(self, l=None, codomain=None, min_length=1): | @rename_keyword(deprecated='Sage version 4.6.1', l='arg') def iter_morphisms(self, arg=None, codomain=None, min_length=1): | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
- ``l`` - (optional, default: None) It can be one of the following : | - ``arg`` - (optional, default: None) It can be one of the following : | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
- list of nonnegative integers - The length of the list must be the number of letters in the alphabet, and the `i`-th integer of ``l`` determines the length of the word mapped to by the `i`-th letter of the (ordered) alphabet. | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py | |
- ``min_length`` - (default: 1) nonnegative integer. If ``l`` is | - ``min_length`` - (default: 1) nonnegative integer. If ``arg`` is | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
``min_length``. This is ignored if ``l`` is a list. | ``min_length``. This is ignored if ``arg`` is a list. | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
TypeError: l (=[0, 1, 2]) must be an iterable of 2 integers | TypeError: arg (=[0, 1, 2]) must be an iterable of 2 integers | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
TypeError: l (=[0, 'a']) must be an iterable of 2 integers | TypeError: arg (=[0, 'a']) must be an iterable of 2 integers | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
if l is None: | if arg is None: | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
elif isinstance(l, tuple): if not len(l) == 2 or not all(isinstance(a, (int,Integer)) for a in l): raise TypeError("l (=%s) must be a tuple of 2 integers" %l) | elif isinstance(arg, tuple): if not len(arg) == 2 or not all(isinstance(a, (int,Integer)) for a in arg): raise TypeError("arg (=%s) must be a tuple of 2 integers" %arg) | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
compositions = IntegerListsLex(range(*l), | compositions = IntegerListsLex(range(*arg), | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
l = list(l) if (not len(l) == n or not all(isinstance(a, (int,Integer)) for a in l)): | arg = list(arg) if (not len(arg) == n or not all(isinstance(a, (int,Integer)) for a in arg)): | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
"l (=%s) must be an iterable of %s integers" %(l, n)) compositions = [l] | "arg (=%s) must be an iterable of %s integers" %(arg, n)) compositions = [arg] | def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain. | 271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py |
approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits with ``known_bits=k`` or ``known_digits=k``; Pari is t... | approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits of `z` with ``known_bits=k`` or ``known_digits=k``. PA... | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
- ``height_bound`` - an integer (default ``None``) specifying the maximum | - ``height_bound`` - an integer (default: ``None``) specifying the maximum | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
- ``proof`` - a boolean (default ``False``), requres height_bound to be set | - ``proof`` - a boolean (default: ``False``), requires height_bound to be set | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
This example involves a complex number. :: | This example involves a complex number:: | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
This example involves a `p`-adic number. :: | This example involves a `p`-adic number:: | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
compute a 200-bit approximation to sqrt(2) which is wrong in the 33'rd bit. :: | compute a 200-bit approximation to `sqrt(2)` which is wrong in the 33'rd bit:: | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
Using the ``height_bound`` and ``proof`` parameters, we can see that `pi` is not the root of an integer polynomial of degree at most 5 and coefficients bounded above by 10. :: | Using the ``height_bound`` and ``proof`` parameters, we can see that `pi` is not the root of an integer polynomial of degree at most 5 and coefficients bounded above by 10:: | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
For stronger results, we need more precicion. :: | For stronger results, we need more precicion:: | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
We can also use ``proof=True`` to get positive results. :: | We can also use ``proof=True`` to get positive results:: | def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z`... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
- ``bound (default 1024)`` - int: highest power to test. | - ``bound (default: 1024)`` - int: highest power to test. | def is_pseudoprime_small_power(n, bound=1024, get_data=False): r""" Return True if `n` is a small power of a pseudoprime, and False otherwise. The result is *NOT* proven correct - *this IS a pseudo-primality test!*. If `get_data` is set to true and `n = p^d`, for a pseudoprime `p` and power `d`, return [(p, d)]. IN... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
- ``verbose`` - integer (default 0); pari's debug | - ``verbose`` - integer (default: 0); PARI's debug | def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds): """ Returns the factorization of n. The result depends on the type of n. If n is an integer, factor returns the factorization of the integer n as an object of type Factorization. If n is not an integer, ``n.factor(proof=proof, **kwds)`` gets ... | 77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py |
from optparse import OptionParser parser = OptionParser() parser.add_option("-y", "--ymin", dest="ymin", default="0", help="minimum y value") parser.add_option("-Y", "--ymax", dest="ymax", default="10", help="maximum y value") parser.add_option("-N", "--Names", dest="hosts", nargs=2, default=None, help="host list for ... | def main(): # Right now there are no command line arguments # we just open every file we're given # and read the packets from it. files = [] for filename in sys.argv[1:]: pcap = pcs.PcapConnector(filename) trace = {} done = False while not done: try: packet = pcap.readpkt() except: done = True if packet.data == Non... | fcb430528a46ebe26c0cb991f937476e1deec7a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/fcb430528a46ebe26c0cb991f937476e1deec7a3/mping_correlate.py | |
for filename in sys.argv[1:]: | for filename in options.hosts: | def main(): # Right now there are no command line arguments # we just open every file we're given # and read the packets from it. files = [] for filename in sys.argv[1:]: pcap = pcs.PcapConnector(filename) trace = {} done = False while not done: try: packet = pcap.readpkt() except: done = True if packet.data == Non... | fcb430528a46ebe26c0cb991f937476e1deec7a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/fcb430528a46ebe26c0cb991f937476e1deec7a3/mping_correlate.py |
for i in range(0,len(files[0])): | plotter = Gnuplot.Gnuplot(debug=1) plotter.set_range('yrange', [options.ymin, options.ymax]) graph = [] for i in range(options.start,options.start + len(files[0])): | def main(): # Right now there are no command line arguments # we just open every file we're given # and read the packets from it. files = [] for filename in sys.argv[1:]: pcap = pcs.PcapConnector(filename) trace = {} done = False while not done: try: packet = pcap.readpkt() except: done = True if packet.data == Non... | fcb430528a46ebe26c0cb991f937476e1deec7a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/fcb430528a46ebe26c0cb991f937476e1deec7a3/mping_correlate.py |
if files[0][i] == files[1][i]: print "0:00:00.000000" continue | delta = abs(files[1][i] - files[0][i]) | def main(): # Right now there are no command line arguments # we just open every file we're given # and read the packets from it. files = [] for filename in sys.argv[1:]: pcap = pcs.PcapConnector(filename) trace = {} done = False while not done: try: packet = pcap.readpkt() except: done = True if packet.data == Non... | fcb430528a46ebe26c0cb991f937476e1deec7a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/fcb430528a46ebe26c0cb991f937476e1deec7a3/mping_correlate.py |
if files[0][i] < files[1][i]: print files[1][i] - files[0][i] else: print files[0][i] - files[1][i] | def main(): # Right now there are no command line arguments # we just open every file we're given # and read the packets from it. files = [] for filename in sys.argv[1:]: pcap = pcs.PcapConnector(filename) trace = {} done = False while not done: try: packet = pcap.readpkt() except: done = True if packet.data == Non... | fcb430528a46ebe26c0cb991f937476e1deec7a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/fcb430528a46ebe26c0cb991f937476e1deec7a3/mping_correlate.py | |
self.file = socket(AF_INET6, SOCK_RAW, IPPROTO_IP) | self.file = socket(AF_INET6, SOCK_RAW, IPPROTO_IPV6) | def __init__(self, name = None): """initialize an IPPConnector class for raw IPv6 access""" try: self.file = socket(AF_INET6, SOCK_RAW, IPPROTO_IP) except: raise | 769f5092d9abdb29ddaf30b429517b95596d6ebd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/769f5092d9abdb29ddaf30b429517b95596d6ebd/__init__.py |
m = pcs.Field("m", 4) | m = pcs.Field("m", 1) | def __init__(self, bytes = None, timestamp = None, **kv): v = pcs.Field("v", 2) # version p = pcs.Field("p", 1) # padded x = pcs.Field("x", 1) # extended cc = pcs.Field("cc", 4) # csrc count m = pcs.Field("m", 4) # m-bit pt = pcs.Field("pt", 7, discriminator=True) # payload type seq = pcs.Field("seq", 16) # sequen... | 1d821daa6c6d98948f586c7fd16cbd406fc8e354 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/1d821daa6c6d98948f586c7fd16cbd406fc8e354/rtp.py |
pcs.Packet.__init__(self, [v, p, x, cc, m, pt, seq, ssrc, opt], \ | pcs.Packet.__init__(self, [v, p, x, cc, m, pt, seq, ts, ssrc, opt], \ | def __init__(self, bytes = None, timestamp = None, **kv): v = pcs.Field("v", 2) # version p = pcs.Field("p", 1) # padded x = pcs.Field("x", 1) # extended cc = pcs.Field("cc", 4) # csrc count m = pcs.Field("m", 4) # m-bit pt = pcs.Field("pt", 7, discriminator=True) # payload type seq = pcs.Field("seq", 16) # sequen... | 1d821daa6c6d98948f586c7fd16cbd406fc8e354 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/1d821daa6c6d98948f586c7fd16cbd406fc8e354/rtp.py |
if packet.data is not None: | if packet.data not in [None, packet]: | def chain(self): """Return the packet and its next packets as a chain.""" chain = Chain([]) packet = self done = False while not done: packet._head = chain chain.append(packet) if packet.data is not None: packet = packet.data else: done = True return chain | c8af68eb9444106d89e71081576453b7e04d8bee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5910/c8af68eb9444106d89e71081576453b7e04d8bee/__init__.py |
* simtype (string='DP'): The simulator type """ | * simtype (string='Python'): The simulator type """ | def __init__(self, nsd=2, time=None, space_symbs=None, simtype="Python", **kwargs): """Constructor. Arguments are: * nsd (int=2) : The number of space dimensions for the PDE * time (symbol=None): The symbol for time * space_symbs (symbol=None): List of existing symbols. * simtype (string='DP'): The simulator type """ i... | aa742a0cafe535ed5a5237842285bbe6a19f899e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2795/aa742a0cafe535ed5a5237842285bbe6a19f899e/__init__.py |
the symbolic.expression v, that returns float | the Symbolic.expression v, that returns float | def _vValue(self, point, time): """This is the point eval of the analytical solution. Pass the point to the symbolic.expression v, that returns float """ try: retVal = self.v.eval(*(point+(time, ))) except: raise FammsError, "Could not evaluate the analytical solution" return retVal | aa742a0cafe535ed5a5237842285bbe6a19f899e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2795/aa742a0cafe535ed5a5237842285bbe6a19f899e/__init__.py |
def listfiles(archive): pin = os.popen("tar ztf %s | sort" % (archive), "r") files = map(lambda x: x.strip(), pin.readlines()) pin.close() cleanedfiles = [] for file in files: slashpos = file.find("/") if slashpos != -1: cleanedname = file[slashpos+1:] else: cleanedname = file if cleanedname.find(".cache.html") != ... | def listfiles(archive): pin = os.popen("tar ztf %s | sort" % (archive), "r") files = map(lambda x: x.strip(), pin.readlines()) pin.close() cleanedfiles = [] for file in files: # Remove archive file name from the file names slashpos = file.find("/") if slashpos != -1: cleanedname = file[slashpos+1:] else: cleanedname =... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py | |
def listJarFiles(jarfile): # Read the jar content listing pin = os.popen("unzip -ql %s" % jarfile, "r") lines = map(lambda x: x[:-1], pin.readlines()) pin.close() # Determine the position of file names namepos = lines[0].find("Name") files = [] for i in xrange(2, len(lines)-2): filename = lines[i][namepos:] files.appe... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py | ||
def listTarVaadinJarFiles(tarfile, vaadinversion): jarfile = "vaadin-linux-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "tar zOxf %s %s > %s " % (tarfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) comm... | def listJarFiles(jarfile): # Read the jar content listing pin = os.popen("unzip -ql %s" % jarfile, "r") lines = map(lambda x: x[:-1], pin.readlines()) pin.close() # Determine the position of file names namepos = lines[0].find("Name") files = [] for i in xrange(2, len(lines)-2): filename = lines[i][namepos:] files.appe... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py | |
tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) | zipcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (zipcmd) | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
filename = "vaadin-%s.tar.gz" % (latestversion) package = latestURL + filename localpackage = "/tmp/%s" % (filename) | latestfilename = "vaadin-%s.zip" % (latestversion) latestpackage = latestURL + latestfilename locallatestpackage = "/tmp/%s" % (latestfilename) | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
os.stat(localpackage) print "Latest package already exists in %s" % (localpackage) | os.stat(locallatestpackage) print "Latest package already exists in %s" % (locallatestpackage) | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
print "Downloading package %s to %s" % (package, localpackage) wgetcmd = "wget -q -O %s %s" % (localpackage, package) | print "Downloading latest release package %s to %s" % (latestpackage, locallatestpackage) wgetcmd = "wget -q -O %s %s" % (locallatestpackage, latestpackage) | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
latestfiles = listfiles(localpackage) | latestfiles = listZipFiles(locallatestpackage) | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
print "\n--------------------------------------------------------------------------------\nVaadin TAR differences" | print "\n--------------------------------------------------------------------------------\nVaadin ZIP differences" | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
latestJarFiles = listTarVaadinJarFiles(localpackage, latestversion) builtJarFiles = listZipVaadinJarFiles(builtpackage, builtversion) | latestJarFiles = listZipVaadinJarFiles(locallatestpackage, latestversion) builtJarFiles = listZipVaadinJarFiles(builtpackage, builtversion) | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
command("rm %s" % (localpackage)) | command("rm %s" % (locallatestpackage)) | def listZipVaadinJarFiles(zipfile, vaadinversion): jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) tarcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) command (tarcmd) files = listJarFiles(extractedjar) command ("r... | bad9380ff937f919d937a70ec84e21e8706f6ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2039/bad9380ff937f919d937a70ec84e21e8706f6ba9/package-diff.py |
"""Enter an infinite "monitoring" loop. The argument, callback, defines the function to call when an ExitNotifyThread has terminated. That function is called with a single argument -- the ExitNotifyThread that has terminated. The monitor will not continue to monitor for other threads until the function returns, so if... | """An infinite "monitoring" loop watching for finished ExitNotifyThread's. :param callback: the function to call when a thread terminated. That function is called with a single argument -- the ExitNotifyThread that has terminated. The monitor will not continue to monitor for other threads until 'callback' returns, so ... | def exitnotifymonitorloop(callback): """Enter an infinite "monitoring" loop. The argument, callback, defines the function to call when an ExitNotifyThread has terminated. That function is called with a single argument -- the ExitNotifyThread that has terminated. The monitor will not continue to monitor for other thre... | 0cdfffa04d451d4519133d601b1cf830afc97278 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5335/0cdfffa04d451d4519133d601b1cf830afc97278/threadutil.py |
while 1: try: thrd = exitthreads.get(False) | while 1: try: thrd = exitthreads.get(True, 60) | def exitnotifymonitorloop(callback): """Enter an infinite "monitoring" loop. The argument, callback, defines the function to call when an ExitNotifyThread has terminated. That function is called with a single argument -- the ExitNotifyThread that has terminated. The monitor will not continue to monitor for other thre... | 0cdfffa04d451d4519133d601b1cf830afc97278 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5335/0cdfffa04d451d4519133d601b1cf830afc97278/threadutil.py |
time.sleep(1) | pass | def exitnotifymonitorloop(callback): """Enter an infinite "monitoring" loop. The argument, callback, defines the function to call when an ExitNotifyThread has terminated. That function is called with a single argument -- the ExitNotifyThread that has terminated. The monitor will not continue to monitor for other thre... | 0cdfffa04d451d4519133d601b1cf830afc97278 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5335/0cdfffa04d451d4519133d601b1cf830afc97278/threadutil.py |
abortsleep = s.sleeping(1, sleepsecs) sleepsecs -= 1 | abortsleep = s.sleeping(10, sleepsecs) sleepsecs -= 10 | def sleep(s, sleepsecs, siglistener): """This function does not actually output anything, but handles the overall sleep, dealing with updates as necessary. It will, however, call sleeping() which DOES output something. | f68b626cb4d8297e3bf93291d47043642de383e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5335/f68b626cb4d8297e3bf93291d47043642de383e1/UIBase.py |
"""Sleep for sleepsecs, remainingsecs to go. If sleepsecs is 0, indicates we're done sleeping. Return 0 for normal sleep, or 1 to indicate a request to sync immediately.""" s._msg("Next refresh in %d seconds" % remainingsecs) | """Sleep for sleepsecs, display remainingsecs to go. Does nothing if sleepsecs <= 0. Display a message on the screen every 10 seconds. This implementation in UIBase does not support this, but some implementations return 0 for successful sleep and 1 for an 'abort', ie a request to sync immediately. """ | def sleeping(s, sleepsecs, remainingsecs): """Sleep for sleepsecs, remainingsecs to go. If sleepsecs is 0, indicates we're done sleeping. | f68b626cb4d8297e3bf93291d47043642de383e1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5335/f68b626cb4d8297e3bf93291d47043642de383e1/UIBase.py |
def warn(s, msg, minor): | def warn(s, msg, minor = 0): | def warn(s, msg, minor): s._printData('warn', '%s\n%d' % (msg, int(minor))) | 6e62da435b347a563ee9dc0ab57eb2109b4c2572 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5335/6e62da435b347a563ee9dc0ab57eb2109b4c2572/Machine.py |
flagmap = {'\\seen': 'S', '\\answered': 'R', '\\flagged': 'F', '\\deleted': 'T', '\\draft': 'D'} | def flagsimap2maildir(flagstring): flagmap = {'\\seen': 'S', '\\answered': 'R', '\\flagged': 'F', '\\deleted': 'T', '\\draft': 'D'} retval = [] imapflaglist = [x.lower() for x in flagstring[1:-1].split()] for imapflag in imapflaglist: if flagmap.has_key(imapflag): retval.append(flagmap[imapflag]) retval.sort() return r... | b8aaf4cf43b5bf28054852d5b8a52707fda24895 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5335/b8aaf4cf43b5bf28054852d5b8a52707fda24895/imaputil.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.