text
stringlengths
0
1.05M
meta
dict
# Internationalization details are documented in # <http://docutils.sf.net/docs/howto/i18n.html>. """ This package contains modules for language-dependent features of Docutils. """ __docformat__ = 'reStructuredText' import sys from docutils.utils import normalize_language_tag if sys.version_info < (2,5): from ...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/languages/__init__.py", "copies": "4", "size": "1580", "license": "mit", "hash": 4120245481796229600, "line_mean": 31.9166666667, "line_max": 74, "alpha_frac": 0.6335443038, "autogenerated": false,...
# Internationalization details are documented in # <http://docutils.sf.net/docs/howto/i18n.html>. """ This package contains modules for language-dependent features of reStructuredText. """ __docformat__ = 'reStructuredText' import sys from docutils.utils import normalize_language_tag if sys.version_info < (2,5): ...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/parsers/rst/languages/__init__.py", "copies": "4", "size": "1039", "license": "mit", "hash": -6492075142304612000, "line_mean": 27.0810810811, "line_max": 70, "alpha_frac": 0.6323387873, "autogener...
""" Admonition directives. """ __docformat__ = 'reStructuredText' from docutils.parsers.rst import Directive from docutils.parsers.rst import states, directives from docutils.parsers.rst.roles import set_classes from docutils import nodes class BaseAdmonition(Directive): final_argument_whitespace = True ...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/parsers/rst/directives/admonitions.py", "copies": "4", "size": "2224", "license": "mit", "hash": 7150633405828872000, "line_mean": 22.1666666667, "line_max": 76, "alpha_frac": 0.6384892086, "autoge...
# $Id$ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A finite state machine specialized for regular-expression-based text filters, this module defines the following classes: - `StateMachine`, a state machine - `State`, a state superclass - `StateMachi...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/statemachine.py", "copies": "2", "size": "57522", "license": "mit", "hash": -7635963413147025000, "line_mean": 36.400520156, "line_max": 80, "alpha_frac": 0.5860714162, "autogenerated": false, "ratio...
""" Calling the ``publish_*`` convenience functions (or instantiating a `Publisher` object) with component names will result in default behavior. For custom behavior (setting component options), create custom component objects first, and pass *them* to ``publish_*``/`Publisher`. See `The Docutils Publisher`_. .. _T...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/core.py", "copies": "2", "size": "29431", "license": "mit", "hash": 1413975898762804700, "line_mean": 43.3906485671, "line_max": 91, "alpha_frac": 0.623662125, "autogenerated": false, "ratio": 4.3867...
""" Command-line and common processing for Docutils front-end tools. Exports the following classes: * `OptionParser`: Standard Docutils command-line processing. * `Option`: Customized version of `optparse.Option`; validation support. * `Values`: Runtime settings; objects are simple structs (``object.attribute``). ...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/frontend.py", "copies": "2", "size": "35388", "license": "mit", "hash": 9055995411965828000, "line_mean": 42.1035322777, "line_max": 84, "alpha_frac": 0.572764779, "autogenerated": false, "ratio": 4....
""" Directives for additional body elements. See `docutils.parsers.rst.directives` for API details. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes from docutils.parsers.rst import Directive from docutils.parsers.rst import directives from docutils.parsers.rst.roles import set_classes ...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/directives/body.py", "copies": "2", "size": "9201", "license": "mit", "hash": -8823078911328821000, "line_mean": 30.8373702422, "line_max": 79, "alpha_frac": 0.5928703402, "autogenerated": ...
""" Directives for figures and simple images. """ __docformat__ = 'reStructuredText' import sys import urllib from docutils import nodes, utils from docutils.parsers.rst import Directive from docutils.parsers.rst import directives, states from docutils.nodes import fully_normalize_name, whitespace_normalize_name fr...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/directives/images.py", "copies": "2", "size": "6829", "license": "mit", "hash": -3690031516343331000, "line_mean": 40.6402439024, "line_max": 78, "alpha_frac": 0.5596719871, "autogenera...
""" Directives for figures and simple images. """ __docformat__ = 'reStructuredText' import sys import urllib.request, urllib.parse, urllib.error from docutils import nodes, utils from docutils.parsers.rst import Directive from docutils.parsers.rst import directives, states from docutils.nodes import fully_normaliz...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/parsers/rst/directives/images.py", "copies": "2", "size": "6873", "license": "mit", "hash": 463692073697503940, "line_mean": 40.9085365854, "line_max": 78, "alpha_frac": 0.5613269315, "autogenerated": ...
""" Directives for typically HTML-specific constructs. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parsers.rst import Directive from docutils.parsers.rst import states from docutils.transforms import components class MetaBody(states.SpecializedBody): class...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/directives/html.py", "copies": "2", "size": "3056", "license": "mit", "hash": 8258224157546362000, "line_mean": 34.5348837209, "line_max": 73, "alpha_frac": 0.5726439791, "autogenerated...
""" Docutils component-related transforms. """ __docformat__ = 'reStructuredText' import sys import os import re import time from docutils import nodes, utils from docutils import ApplicationError, DataError from docutils.transforms import Transform, TransformError class Filter(Transform): """ Include or ...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/transforms/components.py", "copies": "4", "size": "1943", "license": "mit", "hash": 4096444413060584000, "line_mean": 36.3653846154, "line_max": 78, "alpha_frac": 0.6963458569, "autogenerated": false, ...
""" I/O classes provide a uniform API for low-level input and output. Subclasses exist for a variety of input/output mechanisms. """ __docformat__ = 'reStructuredText' import sys import os import re import codecs from docutils import TransformSpec from docutils._compat import b from docutils.utils.error_reporting i...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/io.py", "copies": "2", "size": "17008", "license": "mit", "hash": 7462872917759843000, "line_mean": 34.3596673597, "line_max": 84, "alpha_frac": 0.5540921919, "autogenerated": false, "ratio": 4.5...
""" Miscellaneous transforms. """ __docformat__ = 'reStructuredText' from docutils import nodes from docutils.transforms import Transform, TransformError class CallBack(Transform): """ Inserts a callback into a document. The callback is called when the transform is applied, which is determined by its...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/transforms/misc.py", "copies": "4", "size": "4840", "license": "mit", "hash": 1337563130773199000, "line_mean": 32.6111111111, "line_max": 78, "alpha_frac": 0.5867768595, "autogenerated": false, ...
""" PEP HTML Writer. """ __docformat__ = 'reStructuredText' import sys import os import os.path import codecs import docutils from docutils import frontend, nodes, utils, writers from docutils.writers import html4css1 class Writer(html4css1.Writer): default_stylesheet = 'pep.css' default_stylesheet_path...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/writers/pep_html/__init__.py", "copies": "4", "size": "3535", "license": "mit", "hash": -763275437023351600, "line_mean": 32.6666666667, "line_max": 79, "alpha_frac": 0.5937765205, "autogenerated": fal...
""" Python Enhancement Proposal (PEP) Reader. """ __docformat__ = 'reStructuredText' from docutils.readers import standalone from docutils.transforms import peps, references, misc, frontmatter from docutils.parsers import rst class Reader(standalone.Reader): supported = ('pep',) """Contexts this reader s...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/readers/pep.py", "copies": "4", "size": "1514", "license": "mit", "hash": -6548643697418254000, "line_mean": 30.5416666667, "line_max": 75, "alpha_frac": 0.6743725231, "autogenerated": false, "ra...
""" Standalone file Reader for the reStructuredText markup syntax. """ __docformat__ = 'reStructuredText' import sys from docutils import frontend, readers from docutils.transforms import frontmatter, references, misc class Reader(readers.Reader): supported = ('standalone',) """Contexts this reader suppo...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/readers/standalone.py", "copies": "4", "size": "2290", "license": "mit", "hash": -6883822941403228000, "line_mean": 33.696969697, "line_max": 78, "alpha_frac": 0.6144104803, "autogenerated": false, "...
""" This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`, the reStructuredText parser. Usage ===== 1. Create a parser:: parser = docutils.parsers.rst.Parser() Several optional arguments may be passed to modify the parser's behavior. Please see `Customizing the Parser`_ below ...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/parsers/rst/__init__.py", "copies": "4", "size": "15251", "license": "mit", "hash": 6119284180955981000, "line_mean": 37.1275, "line_max": 82, "alpha_frac": 0.650186873, "autogenerated": false, "...
""" This is the ``docutils.parsers.rst.states`` module, the core of the reStructuredText parser. It defines the following: :Classes: - `RSTStateMachine`: reStructuredText parser's entry point. - `NestedStateMachine`: recursive StateMachine. - `RSTState`: reStructuredText State superclass. - `Inliner`...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/parsers/rst/states.py", "copies": "2", "size": "130226", "license": "mit", "hash": 8212583848851441000, "line_mean": 41.3361508453, "line_max": 93, "alpha_frac": 0.5469952237, "autogenerated": fals...
""" This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to change in future Docutils releases. Instead, it is recommended that you copy and paste the parts you need into your own code, modifying as necessary. """ from d...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/examples.py", "copies": "4", "size": "3913", "license": "mit", "hash": -5686533538776739000, "line_mean": 39.3402061856, "line_max": 77, "alpha_frac": 0.6841298237, "autogenerated": false, "ratio": 4...
""" This module defines table parser classes,which parse plaintext-graphic tables and produce a well-formed data structure suitable for building a CALS table. :Classes: - `GridTableParser`: Parse fully-formed tables represented with a grid. - `SimpleTableParser`: Parse simple tables, delimited by top & bottom...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/tableparser.py", "copies": "2", "size": "20958", "license": "mit", "hash": -6393871154027236000, "line_mean": 37.5257352941, "line_max": 79, "alpha_frac": 0.5163660655, "autogenerated":...
""" This package contains directive implementation modules. """ __docformat__ = 'reStructuredText' import re import codecs import sys from docutils import nodes from docutils.parsers.rst.languages import en as _fallback_language_module if sys.version_info < (2,5): from docutils._compat import __import__ _dire...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/directives/__init__.py", "copies": "2", "size": "13561", "license": "mit", "hash": -6169642691767550000, "line_mean": 32.5668316832, "line_max": 79, "alpha_frac": 0.6060762481, "autogenerat...
""" This package contains Docutils parser modules. """ __docformat__ = 'reStructuredText' import sys from docutils import Component if sys.version_info < (2,5): from docutils._compat import __import__ class Parser(Component): component_type = 'parser' config_section = 'parsers' def parse(self, in...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/parsers/__init__.py", "copies": "4", "size": "1611", "license": "mit", "hash": -1721679786475125500, "line_mean": 29.3962264151, "line_max": 76, "alpha_frac": 0.6530105525, "autogenerated": false, ...
""" This package contains Docutils Writer modules. """ __docformat__ = 'reStructuredText' import os.path import sys import docutils from docutils import languages, Component from docutils.transforms import universal if sys.version_info < (2,5): from docutils._compat import __import__ class Writer(Component): ...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/writers/__init__.py", "copies": "4", "size": "4438", "license": "mit", "hash": -4861539981892089000, "line_mean": 30.7, "line_max": 78, "alpha_frac": 0.6480396575, "autogenerated": false, "ratio"...
""" Transforms for PEP processing. - `Headers`: Used to transform a PEP's initial RFC-2822 header. It remains a field list, but some entries get processed. - `Contents`: Auto-inserts a table of contents. - `PEPZero`: Special processing for PEP 0. """ __docformat__ = 'reStructuredText' import sys import os import...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/transforms/peps.py", "copies": "4", "size": "11023", "license": "mit", "hash": 996974929146058000, "line_mean": 35.1409836066, "line_max": 79, "alpha_frac": 0.5314342738, "autogenerated": false, ...
""" Transforms for resolving references. """ __docformat__ = 'reStructuredText' import sys import re from docutils import nodes, utils from docutils.transforms import TransformError, Transform class PropagateTargets(Transform): """ Propagate empty internal targets to the next element. Given the follo...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/transforms/references.py", "copies": "2", "size": "36105", "license": "mit", "hash": -6373327159839180000, "line_mean": 38.8950276243, "line_max": 83, "alpha_frac": 0.5282370863, "autogenerated": f...
""" Docutils document tree element class library. Classes in CamelCase are abstract base classes or auxiliary classes. The one exception is `Text`, for a text (PCDATA) node; uppercase is used to differentiate from element classes. Classes in lower_case_with_underscores are element classes, matching the XML element g...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/nodes.py", "copies": "2", "size": "77302", "license": "mit", "hash": -4553807996180111400, "line_mean": 34.0575963719, "line_max": 79, "alpha_frac": 0.5964140643, "autogenerated": false, "ratio": 4.2...
""" Simple HyperText Markup Language document tree Writer. The output conforms to the XHTML version 1.0 Transitional DTD (*almost* strict). The output contains a minimum of formatting information. The cascading style sheet "html4css1.css" is required for proper viewing with a modern graphical browser. """ __docfor...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/writers/html4css1/__init__.py", "copies": "2", "size": "67928", "license": "mit", "hash": 2739811762678523400, "line_mean": 38.1515850144, "line_max": 85, "alpha_frac": 0.5500824402, "autogenerated": f...
""" Simple document tree Writer, writes Docutils XML according to http://docutils.sourceforge.net/docs/ref/docutils.dtd. """ __docformat__ = 'reStructuredText' import sys # Work around broken PyXML and obsolete python stdlib behaviour. (The stdlib # replaces its own xml module with PyXML if the latter is installed....
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/writers/docutils_xml.py", "copies": "2", "size": "6923", "license": "mit", "hash": 1082699349224629100, "line_mean": 35.0572916667, "line_max": 97, "alpha_frac": 0.6229958111, "autogenerated": fals...
""" Transforms related to the front matter of a document or a section (information found before the main text): - `DocTitle`: Used to transform a lone top level section's title to the document title, promote a remaining lone top-level section's title to the document subtitle, and determine the document's title ...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/transforms/frontmatter.py", "copies": "2", "size": "19298", "license": "mit", "hash": 2588048283898825700, "line_mean": 35.5492424242, "line_max": 82, "alpha_frac": 0.5620789719, "autogenerated": false...
""" This module defines standard interpreted text role functions, a registry for interpreted text roles, and an API for adding to and retrieving from the registry. The interface for interpreted role functions is as follows:: def role_fn(name, rawtext, text, lineno, inliner, options={}, content=[]...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/roles.py", "copies": "2", "size": "14696", "license": "mit", "hash": 3033968474072738000, "line_mean": 36.3944020356, "line_max": 79, "alpha_frac": 0.6495645073, "autogenerated": false, "...
""" Python 2/3 compatibility definitions. This module currently provides the following helper symbols: * bytes (name of byte string type; str in 2.x, bytes in 3.x) * b (function converting a string literal to an ASCII byte string; can be also used to convert a Unicode string into a byte string) * u_prefix (unicode...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/_compat.py", "copies": "2", "size": "1532", "license": "mit", "hash": -8611262683933146000, "line_mean": 30.9166666667, "line_max": 73, "alpha_frac": 0.6462140992, "autogenerated": false, "ratio": 3....
from setuptools import setup, find_packages setup( name = 'docutils-aafigure', version = '0.3', description = "ASCII art figures for reStructuredText", long_description = """\ This package provides a docutils directive that allows to integrate ASCII art figures directly into the text. reST example:: ...
{ "repo_name": "aquavitae/aafigure", "path": "docutils/setup-docutils-plugin.py", "copies": "3", "size": "1422", "license": "bsd-3-clause", "hash": 9019880401935502000, "line_mean": 26.3461538462, "line_max": 77, "alpha_frac": 0.5745428973, "autogenerated": false, "ratio": 3.843243243243243, "co...
""" Auxiliary transforms mainly to be used by Writer components. This module is called "writer_aux" because otherwise there would be conflicting imports like this one:: from docutils import writers from docutils.transforms import writers """ __docformat__ = 'reStructuredText' from docutils import nodes, ut...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/transforms/writer_aux.py", "copies": "4", "size": "2561", "license": "mit", "hash": 7375289202569764000, "line_mean": 28.1022727273, "line_max": 79, "alpha_frac": 0.579461148, "autogenerated": false, ...
"""Reader for existing document trees.""" from docutils import readers, utils, transforms class Reader(readers.ReReader): """ Adapt the Reader API for an existing document tree. The existing document tree must be passed as the ``source`` parameter to the `docutils.core.Publisher` initializer, wrap...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/readers/doctree.py", "copies": "4", "size": "1560", "license": "mit", "hash": 8778457277380569000, "line_mean": 32.9130434783, "line_max": 77, "alpha_frac": 0.6705128205, "autogenerated": false, "rat...
__author__ = 'Martin Felder and Frank Sehnke' import math, imp from matplotlib.lines import Line2D from pylab import clf, plot, axes, show, xlabel, ylabel, savefig, ioff, draw_if_interactive class MultilinePlotter: """ Basic plotting class build on pylab Implementing by instancing the class with the numbe...
{ "repo_name": "rbalda/neural_ocr", "path": "env/lib/python2.7/site-packages/pybrain/tools/plotting/multiline.py", "copies": "1", "size": "8055", "license": "mit", "hash": 7157790535138072000, "line_mean": 36.9952830189, "line_max": 116, "alpha_frac": 0.5572936065, "autogenerated": false, "ratio":...
__author__ = 'Martin Felder and Frank Sehnke' import math, imp from matplotlib.lines import Line2D from pylab import clf, plot, axes, show, xlabel, ylabel, savefig, ioff, draw_if_interactive #@UnresolvedImport class MultilinePlotter: """ Basic plotting class build on pylab Implementing by instancing the cl...
{ "repo_name": "daanwierstra/pybrain", "path": "pybrain/tools/plotting/multiline.py", "copies": "1", "size": "8010", "license": "bsd-3-clause", "hash": 7957644033361940000, "line_mean": 38.4581280788, "line_max": 118, "alpha_frac": 0.5664169788, "autogenerated": false, "ratio": 3.669262482821805, ...
__author__ = 'Martin Felder' from .neuronlayer import NeuronLayer from pybrain.tools.functions import safeExp class MixtureDensityLayer(NeuronLayer): """ Mixture of Gaussians output layer (Bishop 2006, Ch. 5.6) with diagonal covariance matrix. Assumes inbuf contains K*3 neurons, with the first K gi...
{ "repo_name": "ii0/pybrain", "path": "pybrain/structure/modules/mixturedensity.py", "copies": "25", "size": "1573", "license": "bsd-3-clause", "hash": 7885338859778479000, "line_mean": 37.3658536585, "line_max": 79, "alpha_frac": 0.624920534, "autogenerated": false, "ratio": 3.903225806451613, ...
__author__ = 'Martin Felder' import numpy as np from pybrain.supervised.trainers import RPropMinusTrainer, BackpropTrainer from pybrain.structure.modules.mixturedensity import MixtureDensityLayer def gaussian(x, mean, stddev): """ return value of homogenous Gaussian at given vector point x: vector, mean: vec...
{ "repo_name": "Neural-Network/TicTacToe", "path": "pybrain/supervised/trainers/mixturedensity.py", "copies": "25", "size": "3420", "license": "bsd-3-clause", "hash": 5983621002107026000, "line_mean": 39.2352941176, "line_max": 105, "alpha_frac": 0.5932748538, "autogenerated": false, "ratio": 3.83...
""" S5/HTML Slideshow Writer. """ __docformat__ = 'reStructuredText' import sys import os import re import docutils from docutils import frontend, nodes, utils from docutils.writers import html4css1 from docutils.parsers.rst import directives from docutils._compat import b themes_dir_path = utils.relative_path( ...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/writers/s5_html/__init__.py", "copies": "2", "size": "14430", "license": "mit", "hash": 8775495460251253000, "line_mean": 40.3467048711, "line_max": 80, "alpha_frac": 0.5617463617, "autogenerated": fal...
""" Directives for table elements. """ __docformat__ = 'reStructuredText' import sys import os.path import csv from docutils import io, nodes, statemachine, utils from docutils.utils.error_reporting import SafeString from docutils.utils import SystemMessagePropagation from docutils.parsers.rst import Directive fro...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/directives/tables.py", "copies": "2", "size": "20005", "license": "mit", "hash": 6184397134442494000, "line_mean": 43.1611479029, "line_max": 87, "alpha_frac": 0.5480129968, "autogenerated"...
""" Directives for document parts. """ __docformat__ = 'reStructuredText' from docutils import nodes, languages from docutils.transforms import parts from docutils.parsers.rst import Directive from docutils.parsers.rst import directives class Contents(Directive): """ Table of contents. The table of c...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/parsers/rst/directives/parts.py", "copies": "4", "size": "4208", "license": "mit", "hash": 8668073503240808000, "line_mean": 32.3968253968, "line_max": 77, "alpha_frac": 0.6021863118, "autogenerated": ...
""" Transforms related to document parts. """ __docformat__ = 'reStructuredText' import re import sys from docutils import nodes, utils from docutils.transforms import TransformError, Transform class SectNum(Transform): """ Automatically assigns numbers to the titles of document sections. It is poss...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/transforms/parts.py", "copies": "2", "size": "6937", "license": "mit", "hash": -9157093350823155000, "line_mean": 37.5388888889, "line_max": 78, "alpha_frac": 0.6093412138, "autogenerated": false, ...
""" This package contains Docutils Reader modules. """ __docformat__ = 'reStructuredText' import sys from docutils import utils, parsers, Component from docutils.transforms import universal if sys.version_info < (2,5): from docutils._compat import __import__ class Reader(Component): """ Abstract base...
{ "repo_name": "timonwong/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python3/docutils/readers/__init__.py", "copies": "4", "size": "3419", "license": "mit", "hash": 4314583484207792600, "line_mean": 29.2566371681, "line_max": 78, "alpha_frac": 0.6440479672, "autogenerated": false, ...
""" This package contains modules for standard tree transforms available to Docutils components. Tree transforms serve a variety of purposes: - To tie up certain syntax-specific "loose ends" that remain after the initial parsing of the input plaintext. These transforms are used to supplement a limited syntax. - ...
{ "repo_name": "Lyleo/OmniMarkupPreviewer", "path": "OmniMarkupLib/Renderers/libs/python2/docutils/transforms/__init__.py", "copies": "4", "size": "6459", "license": "mit", "hash": -3661103030339833300, "line_mean": 36.5523255814, "line_max": 79, "alpha_frac": 0.650565103, "autogenerated": false, ...
# $Id$ # Christopher Lee clee@users.sourceforge.net # based upon pdfmetrics.py by Andy Robinson from . import fontinfo from . import latin1MetricsCache ############################################################## # # PDF Metrics # This is a preamble to give us a stringWidth function. # loads and caches AFM files...
{ "repo_name": "rvianello/rdkit", "path": "rdkit/sping/PS/psmetrics.py", "copies": "11", "size": "17605", "license": "bsd-3-clause", "hash": -4213266296111556600, "line_mean": 73.914893617, "line_max": 100, "alpha_frac": 0.5130360693, "autogenerated": false, "ratio": 2.0080985513858787, "config_...
# $Id$ # Christopher Lee clee@users.sourceforge.net # based upon pdfmetrics.py by Andy Robinson import string from . import fontinfo from . import latin1MetricsCache ############################################################## # # PDF Metrics # This is a preamble to give us a stringWidth function. # loads and ca...
{ "repo_name": "jandom/rdkit", "path": "rdkit/sping/PS/psmetrics.py", "copies": "1", "size": "17511", "license": "bsd-3-clause", "hash": 9115350483324072000, "line_mean": 74.8051948052, "line_max": 100, "alpha_frac": 0.5133915824, "autogenerated": false, "ratio": 2.0046937607326845, "config_test...
class gen_tuple(object): def __init__(self, tup): self.tup = tup def __enter__(self): return self.tup def __exit__(self, type, value, tb): pass Gen_empty = gen_tuple(()) Gen_once = gen_tuple((None,)) class knowledge_base(object): ''' This object is a master repository for knowledge entities of diff...
{ "repo_name": "myaskevich/pyke", "path": "pyke/knowledge_base.py", "copies": "2", "size": "5178", "license": "mit", "hash": -6564139966906779000, "line_mean": 37.9248120301, "line_max": 79, "alpha_frac": 0.628742515, "autogenerated": false, "ratio": 4.118536197295147, "config_test": false, "h...
from __future__ import with_statement import os, os.path import sys import pyke from pyke import knowledge_engine from pyke.krb_compiler import compiler_bc from pyke.krb_compiler import krbparser #from pyke import contexts #contexts.debug = ('patterns_out1', 'patterns_out',) Ast_names = frozenset(( 'file', ...
{ "repo_name": "myaskevich/pyke", "path": "pyke/krb_compiler/__init__.py", "copies": "2", "size": "7961", "license": "mit", "hash": 7264692455936885000, "line_mean": 34.8558558559, "line_max": 79, "alpha_frac": 0.5497487437, "autogenerated": false, "ratio": 3.5409252669039146, "config_test": fal...
from __future__ import with_statement import sys import types import os, os.path import re import contextlib if sys.version_info[0:2] == (2, 5): import itertools class chain(object): old_chain = itertools.chain def __new__(cls, *args): return cls.old_chain(*args) @staticme...
{ "repo_name": "myaskevich/pyke", "path": "pyke/knowledge_engine.py", "copies": "1", "size": "22320", "license": "mit", "hash": -4063833356434544600, "line_mean": 40.4081632653, "line_max": 80, "alpha_frac": 0.5420941798, "autogenerated": false, "ratio": 4.1156186612576064, "config_test": false,...
from __future__ import with_statement import sys import types import os, os.path import re import contextlib if sys.version_info[0] < 3: import itertools class chain(object): old_chain = itertools.chain def __new__(cls, *args): return cls.old_chain(*args) @staticmethod ...
{ "repo_name": "e-loue/pyke", "path": "pyke/knowledge_engine.py", "copies": "1", "size": "22312", "license": "mit", "hash": 3638767033191368000, "line_mean": 40.3933209647, "line_max": 80, "alpha_frac": 0.5421989153, "autogenerated": false, "ratio": 4.117940199335548, "config_test": false, "ha...
import functools from pyke import fc_rule, immutable_dict class bc_rule(fc_rule.rule): ''' This represents a single backward-chaining rule. Most of its behavior is inherited. ''' def __init__(self, name, rule_base, goal_name, bc_fn, plan_fn, goal_arg_patterns, plan_vars, patterns...
{ "repo_name": "e-loue/pyke", "path": "pyke/bc_rule.py", "copies": "2", "size": "2859", "license": "mit", "hash": 232469461288321700, "line_mean": 41.0294117647, "line_max": 79, "alpha_frac": 0.6469559132, "autogenerated": false, "ratio": 3.8517520215633425, "config_test": false, "has_no_keywo...
import itertools from pyke import knowledge_base class StopProof(Exception): pass class stopIteratorContext(object): def __init__(self, rule_base, iterator_context): self.rule_base = rule_base self.context = iterator_context def __enter__(self): return stopIterator(self.rule_base, se...
{ "repo_name": "myaskevich/pyke", "path": "pyke/rule_base.py", "copies": "2", "size": "9221", "license": "mit", "hash": 1563472559245670400, "line_mean": 36.3279352227, "line_max": 79, "alpha_frac": 0.5853579176, "autogenerated": false, "ratio": 3.789560213727908, "config_test": false, "has_no...
import pyke def fc_head(rb_name): return ( "# %s_fc.py" % rb_name, "", "from __future__ import with_statement", "from pyke import contexts, pattern, fc_rule, knowledge_base", "", "pyke_version = %r" % pyke.version, "compiler_version = %r" % pyke.compiler_ver...
{ "repo_name": "myaskevich/pyke", "path": "pyke/krb_compiler/helpers.py", "copies": "2", "size": "9054", "license": "mit", "hash": 5565170328007970000, "line_mean": 36.1024590164, "line_max": 83, "alpha_frac": 0.5040318127, "autogenerated": false, "ratio": 3.6255506607929515, "config_test": fals...
import subprocess import contextlib from pyke import knowledge_base, rule_base # claim_goal, fact, prove_all, gather_all class special_knowledge_base(knowledge_base.knowledge_base): def __init__(self, engine): super(special_knowledge_base, self).__init__(engine, 'special') def add_fn(self, fn): ...
{ "repo_name": "e-loue/pyke", "path": "pyke/special.py", "copies": "2", "size": "10605", "license": "mit", "hash": 1066498832495014700, "line_mean": 36.4699646643, "line_max": 84, "alpha_frac": 0.5203696718, "autogenerated": false, "ratio": 4.23482428115016, "config_test": false, "has_no_keywo...
import sys import types import re def cprint(obj, maxlen = 80, maxdepth = 4, maxlines = 20): items = cprint2(obj, maxdepth) #sys.stderr.write("cprint items: %s\n" % str(items)) return format(items, maxlen, maxlen, maxlines)[0] def format_len(x): """ >>> format_len('abc') 3 >>>...
{ "repo_name": "e-loue/pyke", "path": "pyke/condensedPrint.py", "copies": "2", "size": "5884", "license": "mit", "hash": -7602048279995621000, "line_mean": 33.6058823529, "line_max": 79, "alpha_frac": 0.5267720551, "autogenerated": false, "ratio": 3.4383401519579193, "config_test": false, "has...
import types import itertools class pattern(object): def __ne__(self, b): return not (self == b) def simple_match_pattern(self, bindings, my_context, pattern_b, b_context): return self.match_pattern(bindings, my_context, pattern_b, b_context) def lookup(self, context, allow_variable_in_ans = Fal...
{ "repo_name": "myaskevich/pyke", "path": "pyke/pattern.py", "copies": "2", "size": "6638", "license": "mit", "hash": -4000698853090909000, "line_mean": 41.5448717949, "line_max": 80, "alpha_frac": 0.6102154588, "autogenerated": false, "ratio": 3.983793517406963, "config_test": false, "has_no_...
""" A context is used to store all of a rule's pattern variable bindings for a specific rule invocation during inferencing (both forward-chaining and backward-chaining rules). >>> from pyke import pattern >>> c = simple_context() >>> var = variable('foo') >>> var $f...
{ "repo_name": "myaskevich/pyke", "path": "pyke/contexts.py", "copies": "2", "size": "14332", "license": "mit", "hash": -5124680605850875000, "line_mean": 36.9126984127, "line_max": 80, "alpha_frac": 0.6063777824, "autogenerated": false, "ratio": 3.9753120665742023, "config_test": false, "has_...
''' A fact_base is one of the kinds of knowledge_bases (see also, rule_base and special). >>> from pyke import knowledge_engine >>> engine = knowledge_engine.engine() >>> fb = fact_base(engine, 'fb_name') >>> fb <fact_base fb_name> >>> fb.dump_universal_facts() ...
{ "repo_name": "e-loue/pyke", "path": "pyke/fact_base.py", "copies": "2", "size": "10027", "license": "mit", "hash": 1010745363183702800, "line_mean": 40.775, "line_max": 79, "alpha_frac": 0.5637342908, "autogenerated": false, "ratio": 4.047638272103351, "config_test": false, "has_no_keywords"...
''' Forward chaining rules (fc_rule) are one of two types of rules in a rule_base (the other being backward chaining rules -- bc_rule). All forward chaining is done automatically as each rule_base is activated. This is done in two steps: 1. All fc_rules are registered with the fact_lists re...
{ "repo_name": "myaskevich/pyke", "path": "pyke/fc_rule.py", "copies": "2", "size": "4442", "license": "mit", "hash": -2048087142515364400, "line_mean": 39.3727272727, "line_max": 80, "alpha_frac": 0.6309389777, "autogenerated": false, "ratio": 4.033605812897366, "config_test": false, "has_no_...
''' This example shows how people are related. The primary data (facts) that are used to figure everything out are in family.kfb. There are four independent rule bases that all do the same thing. The fc_example rule base only uses forward-chaining rules. The bc_example rule base only uses backw...
{ "repo_name": "myaskevich/pyke", "path": "examples/family_relations/driver.py", "copies": "2", "size": "8004", "license": "mit", "hash": -3869335701660608000, "line_mean": 36.0509259259, "line_max": 80, "alpha_frac": 0.6230163689, "autogenerated": false, "ratio": 3.691420664206642, "config_test...
""" See http://www.dabeaz.com/ply/ply.html for syntax of grammer definitions. """ from __future__ import with_statement import itertools import warnings import os, os.path from pyke.krb_compiler.ply import yacc from pyke.krb_compiler import scanner from pyke import pattern, contexts tokens = scanner.tokens goal_mo...
{ "repo_name": "e-loue/pyke", "path": "pyke/krb_compiler/krbparser.py", "copies": "2", "size": "22230", "license": "mit", "hash": 2056975809660439800, "line_mean": 29.703038674, "line_max": 138, "alpha_frac": 0.5273291646, "autogenerated": false, "ratio": 3.0136930585683297, "config_test": false...
""" See http://www.dabeaz.com/ply/ply.html for syntax of grammer definitions. """ from __future__ import with_statement import string import os, os.path from pyke.krb_compiler.ply import lex debug=0 kfb_mode = False goal_mode = False states = ( ('indent', 'exclusive'), ('code', 'exclusive'), ('checknl'...
{ "repo_name": "e-loue/pyke", "path": "pyke/krb_compiler/scanner.py", "copies": "2", "size": "20547", "license": "mit", "hash": -3832207072218947600, "line_mean": 28.7768115942, "line_max": 91, "alpha_frac": 0.540299815, "autogenerated": false, "ratio": 3.0780524344569287, "config_test": false, ...
from __future__ import with_statement from string import Template import re import os.path from pyke import question_base from pyke import user_question from pyke import qa_helpers from pyke.krb_compiler import scanner class kqb_parser(object): blank_line = re.compile(ur'(\s*#)|(\s*$)', re.UNICODE) tokenizer ...
{ "repo_name": "myaskevich/pyke", "path": "pyke/krb_compiler/kqb_parser.py", "copies": "2", "size": "20830", "license": "mit", "hash": -612870806219799600, "line_mean": 37.3591160221, "line_max": 100, "alpha_frac": 0.4574871573, "autogenerated": false, "ratio": 4.048396501457726, "config_test": ...
import linecache import traceback import os.path import sys def print_tb(traceback, limit=None, file=None): if file is None: file = sys.stderr for line in format_list(extract_tb(traceback, limit)): file.write(line) def print_exception(type, value, traceback, limit=None, file=None): if file is None: file ...
{ "repo_name": "myaskevich/pyke", "path": "pyke/krb_traceback.py", "copies": "2", "size": "5308", "license": "mit", "hash": -1245906059322055700, "line_mean": 38.3111111111, "line_max": 80, "alpha_frac": 0.6009044658, "autogenerated": false, "ratio": 4.026555386949924, "config_test": false, "h...
import os.path import wsgi_app import wsgiref.simple_server class RequestHandlerNoLogging(wsgiref.simple_server.WSGIRequestHandler): def log_request(self, code='-', size='-'): pass def init(trace_sql = False, db_engine = 'sqlite3'): if db_engine.lower() == 'sqlite3': import sqlite3 as db impo...
{ "repo_name": "e-loue/pyke", "path": "examples/web_framework/simple_server.py", "copies": "2", "size": "2609", "license": "mit", "hash": 9189302604904880000, "line_mean": 41.064516129, "line_max": 79, "alpha_frac": 0.6660276074, "autogenerated": false, "ratio": 4.0941915227629515, "config_test"...
import sys import os, os.path from pyke import knowledge_engine, krb_traceback import sqlgen # Possibly interesting values: # CONTENT_LENGTH: # CONTENT_TYPE: application/x-www-form-urlencoded # PATH_INFO: /hello/mom/and/dad.html # QUERY_STRING: this=value&that=too # REMOTE_ADDR: 127.0.0.1 # RE...
{ "repo_name": "e-loue/pyke", "path": "examples/web_framework/wsgi_app.py", "copies": "2", "size": "6076", "license": "mit", "hash": -363633158272844200, "line_mean": 36.5, "line_max": 80, "alpha_frac": 0.6274897119, "autogenerated": false, "ratio": 3.743068391866913, "config_test": false, "ha...
import sys import os, os.path import signal import functools import wsgiref.simple_server import wsgi_app def kill(pids, signum, frame): sys.stderr.write("preforked_server(%d) caught SIGINT\n" % os.getpid()) sys.stderr.write("preforked_server(%d) self.pids is %s\n" % (os.getpid(), str(pid...
{ "repo_name": "e-loue/pyke", "path": "examples/web_framework/preforked_server.py", "copies": "2", "size": "3995", "license": "mit", "hash": -6296789764230844000, "line_mean": 41.0421052632, "line_max": 79, "alpha_frac": 0.6169253881, "autogenerated": false, "ratio": 4.088024564994882, "config_t...
class immutable_dict(dict): ''' >>> im = immutable_dict((('a', 1), ('b', 2))) >>> len(im) 2 >>> im['a'] 1 >>> im['b'] 2 >>> tuple(sorted(im.keys())) ('a', 'b') >>> tuple(sorted(im.values())) (1, 2) >>> 'a' in im True ...
{ "repo_name": "e-loue/pyke", "path": "pyke/immutable_dict.py", "copies": "2", "size": "3263", "license": "mit", "hash": -1543296057474327300, "line_mean": 34.8461538462, "line_max": 80, "alpha_frac": 0.6063764562, "autogenerated": false, "ratio": 4.39622641509434, "config_test": false, "has_n...
from __future__ import with_statement import os.path import contextlib import sqlite3 as db from pyke import test import load_sqlite3_schema Sqlgen_dir = os.path.dirname(load_sqlite3_schema.__file__) Sqlite3_db = os.path.join(Sqlgen_dir, "sqlite3.db") class cursor(object): rowcount = 1 # This is only che...
{ "repo_name": "e-loue/pyke", "path": "examples/sqlgen/driver_sqlite3.py", "copies": "2", "size": "2942", "license": "mit", "hash": 3226999718417864000, "line_mean": 34.8658536585, "line_max": 79, "alpha_frac": 0.6841210473, "autogenerated": false, "ratio": 3.785070785070785, "config_test": true...
from __future__ import with_statement import types from pyke import knowledge_engine, krb_traceback, pattern, contexts def parse(str): str = str.strip() if str[0] == '(': return parse_tuple(str[1:]) if str[0] in "0123456789.-+": return parse_number(str) if str[0] in "\"'": return parse_string(str) ...
{ "repo_name": "myaskevich/pyke", "path": "pyke/test.py", "copies": "2", "size": "8488", "license": "mit", "hash": 4371175305715410400, "line_mean": 31.6423076923, "line_max": 79, "alpha_frac": 0.5190291033, "autogenerated": false, "ratio": 3.633133561643836, "config_test": false, "has_no_keyw...
import contextlib from pyke import unique from pyke import knowledge_base class question_base(knowledge_base.knowledge_base): r''' Each instance keeps track of a related set of questions. ''' def __init__(self, name): r''' This is only used by the compiler, so only creates an ...
{ "repo_name": "myaskevich/pyke", "path": "pyke/question_base.py", "copies": "2", "size": "4648", "license": "mit", "hash": 5757325998737887000, "line_mean": 39.4086956522, "line_max": 79, "alpha_frac": 0.6234129546, "autogenerated": false, "ratio": 4.228389444949954, "config_test": false, "ha...
''' This module loads universal facts representing a schema into a pyke engine. All facts are put in the "schema" fact base. It adds five kinds of facts: paramstyle(style) column(table_name, col_name, type, null, key, default, extra) primary_key(table_name, columns) many_...
{ "repo_name": "e-loue/pyke", "path": "examples/sqlgen/load_sqlite3_schema.py", "copies": "2", "size": "5381", "license": "mit", "hash": 3711296034321175600, "line_mean": 41.03125, "line_max": 80, "alpha_frac": 0.6085501859, "autogenerated": false, "ratio": 3.810198300283286, "config_test": fals...
r''' A "match" here is one of: - an instance of qa_helpers.regexp - msg (for error message) - prompt (without the []) - match(str) returns converted value (None if no match) - an instance of qa_helpers.qmap - test (a match) - value (value ...
{ "repo_name": "myaskevich/pyke", "path": "pyke/ask_tty.py", "copies": "2", "size": "9599", "license": "mit", "hash": -857102453628380900, "line_mean": 39.3277310924, "line_max": 86, "alpha_frac": 0.4568660138, "autogenerated": false, "ratio": 4.302106678619453, "config_test": true, "has_no_ke...
r''' ''' import itertools from pyke import contexts class selector(object): def __init__(self): self.all = [] # [(pat_context, pattern, link)...] self.full_vars = [] # [(pat_context, pattern, [link])...] self.partial_vars = [] # [(pat_context, pattern, [link])...] ...
{ "repo_name": "myaskevich/pyke", "path": "experimental/cache_args.py", "copies": "2", "size": "6587", "license": "mit", "hash": -1053969762853435600, "line_mean": 43.5, "line_max": 80, "alpha_frac": 0.5461585181, "autogenerated": false, "ratio": 4.36158940397351, "config_test": false, "has_no...
r''' This uses a parser object which is expected to have the following methods: - get_token(check_token=None) - parse_match() - parse_alternatives() - parse_review() ''' from string import Template class user_question(object): match = None review = None def __init__(...
{ "repo_name": "myaskevich/pyke", "path": "pyke/user_question.py", "copies": "2", "size": "3714", "license": "mit", "hash": -8653161216245100000, "line_mean": 31.2869565217, "line_max": 79, "alpha_frac": 0.6350659844, "autogenerated": false, "ratio": 3.9374337221633087, "config_test": false, "...
""" See http://www.dabeaz.com/ply/ply.html for syntax of grammer definitions. """ from __future__ import with_statement import os, os.path from pyke.krb_compiler.ply import yacc from pyke.krb_compiler import scanner from pyke import fact_base tokens = scanner.kfb_tokens def p_file(p): ''' file : nl_opt facts_o...
{ "repo_name": "e-loue/pyke", "path": "pyke/krb_compiler/kfbparser.py", "copies": "2", "size": "5316", "license": "mit", "hash": -2784047242026846700, "line_mean": 30.449704142, "line_max": 79, "alpha_frac": 0.5838193791, "autogenerated": false, "ratio": 3.533909574468085, "config_test": false, ...
""" Each target_pkg object keeps track of all of the compiled files within one compiled_krb package. """ from __future__ import with_statement import os, os.path import time import sys import re import pyke debug = False Name_test = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*$') class target_pkg(object): r'''T...
{ "repo_name": "e-loue/pyke", "path": "pyke/target_pkg.py", "copies": "2", "size": "21588", "license": "mit", "hash": -743658591476484200, "line_mean": 45.2248394004, "line_max": 80, "alpha_frac": 0.5249918933, "autogenerated": false, "ratio": 4.405510204081633, "config_test": false, "has_no_k...
# $Id$ # -*- coding: utf-8 -*- """Snoop file format.""" from __future__ import absolute_import import time from . import dpkt # RFC 1761 SNOOP_MAGIC = 0x736E6F6F70000000 SNOOP_VERSION = 2 SDL_8023 = 0 SDL_8024 = 1 SDL_8025 = 2 SDL_8026 = 3 SDL_ETHER = 4 SDL_HDLC = 5 SDL_CHSYNC = 6 SDL_IBMCC = 7 SDL_FDDI = 8 SDL_O...
{ "repo_name": "smutt/dpkt", "path": "dpkt/snoop.py", "copies": "3", "size": "3405", "license": "bsd-3-clause", "hash": -7985357575731490000, "line_mean": 21.4013157895, "line_max": 78, "alpha_frac": 0.5107195301, "autogenerated": false, "ratio": 3.2336182336182335, "config_test": false, "has_...
# $Id$ # -*- coding: utf-8 -*- """Snoop file format.""" import sys, time import dpkt # RFC 1761 SNOOP_MAGIC = 0x736E6F6F70000000L SNOOP_VERSION = 2 SDL_8023 = 0 SDL_8024 = 1 SDL_8025 = 2 SDL_8026 = 3 SDL_ETHER = 4 SDL_HDLC = 5 SDL_CHSYNC = 6 SDL_IBMCC = 7 SDL_FDDI = 8 SDL_OTHER = 9 dltoff = {SDL_ETHER: 14} clas...
{ "repo_name": "jack8daniels2/dpkt", "path": "dpkt/snoop.py", "copies": "6", "size": "2951", "license": "bsd-3-clause", "hash": -6821254005144230000, "line_mean": 23.1885245902, "line_max": 78, "alpha_frac": 0.5025415114, "autogenerated": false, "ratio": 3.0997899159663866, "config_test": false,...
# $Id$ # example to test shell renderer (*shudder*) from vtk import * from vtkdevide import * import os import stat def ce_cb(obj, evt_name): if obj.GetKeyCode() == 'm': crm = splatmapper.GetRenderMode() splatmapper.SetRenderMode(not crm) print "rendermode switched to %d" % (not crm) ...
{ "repo_name": "chrisidefix/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_zuydweg.py", "copies": "2", "size": "3378", "license": "bsd-3-clause", "hash": 7741304271072571000, "line_mean": 26.4634146341, "line_max": 62, "alpha_frac": 0.6856127886, "autogenerated": false, "ratio"...
# $Id$ # example to test shell renderer (*shudder*) from vtk import * from vtkdevide import * import time def bench(camera, rwi): initial_time = time.clock() for i in range(36): camera.Azimuth(10) rwi.Render() end_time = time.clock() print "FPS == %f" % (36 / (end_time - initial_...
{ "repo_name": "chrisidefix/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render.py", "copies": "2", "size": "3358", "license": "bsd-3-clause", "hash": 890421088794909300, "line_mean": 26.0806451613, "line_max": 59, "alpha_frac": 0.652173913, "autogenerated": false, "ratio": 2.803005...
# $Id$ # example to test shell renderer (*shudder*) from vtk import * import vtk from vtkdevide import * import time def bench(camera, rwi): initial_time = time.clock() for i in range(36): camera.Azimuth(10) rwi.Render() end_time = time.clock() print "FPS == %f" % (36 / (end_time...
{ "repo_name": "zhangfangyan/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_stanford_head.py", "copies": "2", "size": "4607", "license": "bsd-3-clause", "hash": -6586258528358648000, "line_mean": 25.3257142857, "line_max": 69, "alpha_frac": 0.6566095073, "autogenerated": false, ...
# $Id$ # example to test shell renderer (*shudder*) from vtkpython import * from vtkcpbothapython import * import time def bench(camera, rwi): initial_time = time.clock() for i in range(36): camera.Azimuth(10) rwi.Render() end_time = time.clock() print "FPS == %f" % (36 / (end_ti...
{ "repo_name": "zhangfangyan/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_bonsai.py", "copies": "2", "size": "3758", "license": "bsd-3-clause", "hash": -5061219365613117000, "line_mean": 25.6524822695, "line_max": 59, "alpha_frac": 0.6689728579, "autogenerated": false, "ratio...
# $Id$ # example to test shell renderer (*shudder*) from vtkpython import * from vtkcpbothapython import * def ce_cb(obj, evt_name): if obj.GetKeyCode() == 'm': crm = splatmapper.GetRenderMode() splatmapper.SetRenderMode(not crm) print "rendermode switched to %d" % (not crm) e...
{ "repo_name": "zhangfangyan/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_tu_schouder.py", "copies": "2", "size": "2764", "license": "bsd-3-clause", "hash": -9070734184723424000, "line_mean": 26.64, "line_max": 59, "alpha_frac": 0.6772793054, "autogenerated": false, "ratio": ...
# $Id$ # example to test shell renderer (*shudder*) from vtkpython import * from vtkcpbothapython import * hdfr = vtkHDFVolumeReader() hdfr.SetFileName("skull_256x256x256.hdf") otf = vtkPiecewiseFunction() otf.AddPoint(0.0, 0.0) otf.AddPoint(39.9, 0.0) otf.AddPoint(40.0, 1.0) otf.AddPoint(150.0, 1.0) ctf = vtkColor...
{ "repo_name": "chrisidefix/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_skull.py", "copies": "2", "size": "1324", "license": "bsd-3-clause", "hash": 7355161074872225000, "line_mean": 20.3548387097, "line_max": 47, "alpha_frac": 0.7575528701, "autogenerated": false, "ratio": ...
# $Id$ # example to test shell renderer (*shudder*) from vtkpython import * from vtkdevide import * import time def bench(camera, rwi): initial_time = time.clock() for i in range(36): camera.Azimuth(10) rwi.Render() end_time = time.clock() print "FPS == %f" % (36 / (end_time - in...
{ "repo_name": "chrisidefix/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_aneurism.py", "copies": "2", "size": "4298", "license": "bsd-3-clause", "hash": -3879780000570995000, "line_mean": 25.5308641975, "line_max": 69, "alpha_frac": 0.6591437878, "autogenerated": false, "rati...
# $Id$ # example to test shell renderer (*shudder*) import vtk from vtk import * from vtkdevide import * import time def bench(camera, rwi): initial_time = time.clock() for i in range(36): camera.Azimuth(10) rwi.Render() end_time = time.clock() print "FPS == %f" % (36 / (end_time...
{ "repo_name": "zhangfangyan/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_engine.py", "copies": "2", "size": "5672", "license": "bsd-3-clause", "hash": 4305382729724825600, "line_mean": 25.3813953488, "line_max": 76, "alpha_frac": 0.6565585331, "autogenerated": false, "ratio"...
# $Id$ # example to test shell renderer (*shudder*) import vtk import vtkdevide def ce_cb(obj, evt_name): if obj.GetKeyCode() == 'm': crm = splatmapper.GetRenderMode() splatmapper.SetRenderMode(not crm) print "rendermode switched to %d" % (not crm) elif obj.GetKeyCode() == '\'...
{ "repo_name": "chrisidefix/devide.vtkdevide", "path": "Examples/Rendering/Python/shell_render_synth.py", "copies": "2", "size": "3139", "license": "bsd-3-clause", "hash": 4470299878296584700, "line_mean": 27.2792792793, "line_max": 59, "alpha_frac": 0.6948072635, "autogenerated": false, "ratio": ...
"""$Id$""" import os import base64 import hashlib import datetime from google.appengine.ext.webapp import template from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from google.appengine.api import images from google.appengine.api imp...
{ "repo_name": "elliotlaster/papert", "path": "index.py", "copies": "1", "size": "4971", "license": "mit", "hash": 239587938446581760, "line_mean": 35.8222222222, "line_max": 100, "alpha_frac": 0.507342587, "autogenerated": false, "ratio": 4.209144792548687, "config_test": false, "has_no_keywo...
# $Id$ # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from rdkit import RDConfig import unittest,os from rdkit.six.moves import cPickle from rdki...
{ "repo_name": "adalke/rdkit", "path": "rdkit/Chem/Fraggle/UnitTestFraggle.py", "copies": "1", "size": "2521", "license": "bsd-3-clause", "hash": -6482826658338452000, "line_mean": 34.5070422535, "line_max": 82, "alpha_frac": 0.6624355415, "autogenerated": false, "ratio": 1.8883895131086141, "co...
# $Id$ __all__ = ['wsdl2python', 'utility', 'containers', 'commands'] class WSDLFormatError(Exception): '''Detected errors in the WSDL document. ''' class WsdlGeneratorError(Exception): pass class Wsdl2PythonError(Exception): pass class WSInteropError(Exception): '''Conformance to WS-I Basic-Profi...
{ "repo_name": "acigna/pywez", "path": "zsi/ZSI/generate/__init__.py", "copies": "3", "size": "1064", "license": "mit", "hash": -3195133429876072400, "line_mean": 43.3333333333, "line_max": 204, "alpha_frac": 0.7462406015, "autogenerated": false, "ratio": 3.869090909090909, "config_test": false,...
# $Id$ """AOL Instant Messenger.""" import dpkt import struct # OSCAR: http://iserverd1.khstu.ru/oscar/ class FLAP(dpkt.Packet): __hdr__ = ( ('ast', 'B', 0x2a), # '*' ('type', 'B', 0), ('seq', 'H', 0), ('len', 'H', 0) ) def unpack(self, buf): dpkt.Packet.unpack(se...
{ "repo_name": "tgoodyear/dpkt", "path": "dpkt/aim.py", "copies": "17", "size": "1058", "license": "bsd-3-clause", "hash": 8493631405825797000, "line_mean": 21.5106382979, "line_max": 82, "alpha_frac": 0.5009451796, "autogenerated": false, "ratio": 2.7058823529411766, "config_test": false, "ha...
# $Id$ """Border Gateway Protocol.""" import dpkt import struct, socket # Border Gateway Protocol 4 - RFC 4271 # Communities Attribute - RFC 1997 # Capabilities - RFC 3392 # Route Refresh - RFC 2918 # Route Reflection - RFC 4456 # Confederations - RFC 3065 # Cease Subcodes - RFC 4486 # NOPEER Community - RFC 3765 # ...
{ "repo_name": "edisona/dpkt", "path": "dpkt/bgp.py", "copies": "17", "size": "25690", "license": "bsd-3-clause", "hash": -3886960918695103000, "line_mean": 32.8026315789, "line_max": 501, "alpha_frac": 0.4518489685, "autogenerated": false, "ratio": 3.5547253355472535, "config_test": false, "h...
# $Id$ """Cisco Discovery Protocol.""" import struct import dpkt CDP_DEVID = 1 # string CDP_ADDRESS = 2 CDP_PORTID = 3 # string CDP_CAPABILITIES = 4 # 32-bit bitmask CDP_VERSION = 5 # string CDP_PLATFORM = 6 # string CDP_IPPREFIX = 7 CDP_VTP_MGMT_DOMAIN = 9 # string CDP_NATIVE_VLAN = 10 # 16-bit integer CDP...
{ "repo_name": "FunctionAnalysis/dpkt", "path": "dpkt/cdp.py", "copies": "17", "size": "2751", "license": "bsd-3-clause", "hash": -2924175724334721500, "line_mean": 27.9578947368, "line_max": 60, "alpha_frac": 0.4645583424, "autogenerated": false, "ratio": 3.1657077100115076, "config_test": fals...
# $Id$ """Cisco Skinny Client Control Protocol.""" import dpkt KEYPAD_BUTTON = 0x00000003 OFF_HOOK = 0x00000006 ON_HOOK = 0x00000007 OPEN_RECEIVE_CHANNEL_ACK= 0x00000022 START_TONE = 0x00000082 STOP_TONE = 0x00000083 SET_LAMP = 0x00000086 SET_SPEAKER_MODE = 0x00000088 START_MEDIA_TRANSMIT = 0x0000008A STOP_ME...
{ "repo_name": "asteven/dpkt", "path": "dpkt/sccp.py", "copies": "17", "size": "5273", "license": "bsd-3-clause", "hash": 7880280090423263000, "line_mean": 25.9030612245, "line_max": 61, "alpha_frac": 0.504456666, "autogenerated": false, "ratio": 2.9892290249433104, "config_test": false, "has_...
#$Id$ class Account: """This class is used to create object for accounts object.""" def __init__(self): """Initialize parameters for Accounts.""" self.account_id = '' self.account_name = '' self.bcy_balance = 0.0 self.bcy_balance_formatted = '' self.fcy_balance =...
{ "repo_name": "zoho/books-python-wrappers", "path": "books/model/Account.py", "copies": "1", "size": "8620", "license": "mit", "hash": -2245876527502801400, "line_mean": 21.2164948454, "line_max": 73, "alpha_frac": 0.5379350348, "autogenerated": false, "ratio": 4.098906324298621, "config_test":...
#$Id$ class Activity: """This class is used create object for activity.""" def __init__(self): """Initialize the parameters for Activity object.""" self.id = 0 self.state = "" self.activity_for = "" self.name = "" self.activity_by = "" self.time_long...
{ "repo_name": "zoho/projects-python-wrappers", "path": "projects/model/Activity.py", "copies": "1", "size": "2754", "license": "mit", "hash": -4223414069182418000, "line_mean": 16.2125, "line_max": 60, "alpha_frac": 0.4567901235, "autogenerated": false, "ratio": 4.2110091743119265, "config_test...
#$Id$ class Address: """This class is used to create an object for Address.""" def __init__(self): """Initialize parameters for address object""" self.address = '' self.city = '' self.state = '' self.zip = '' self.country = '' self.fax = '' self...
{ "repo_name": "zoho/books-python-wrappers", "path": "books/model/Address.py", "copies": "1", "size": "4317", "license": "mit", "hash": 8009073419537118000, "line_mean": 20.2660098522, "line_max": 76, "alpha_frac": 0.4704656011, "autogenerated": false, "ratio": 4.343058350100604, "config_test": ...
# $Id$ class advectionProperties: kits = ['vtk_kit'] cats = ['Sources'] help = """Given a series of prepared advection volumes (each input is a timestep), calculate a number of metrics. The first input HAS to have a VolumeIndex PointData attribute/array. For example, the output of the pointsT...
{ "repo_name": "ivoflipse/devide", "path": "modules/misc/module_index.py", "copies": "7", "size": "3893", "license": "bsd-3-clause", "hash": -7746027245938686000, "line_mean": 35.0462962963, "line_max": 78, "alpha_frac": 0.7033136399, "autogenerated": false, "ratio": 4.141489361702128, "config_t...
#$Id$ class BankAccount: """This class is used to create object for Bank accounts.""" def __init__(self): """Initialize parameters for Bank accounts object.""" self.account_id = '' self.account_name = '' self.currency_id = '' self.currency_code = '' self.account_...
{ "repo_name": "zoho/books-python-wrappers", "path": "books/model/BankAccount.py", "copies": "1", "size": "8119", "license": "mit", "hash": -759580501573415000, "line_mean": 22.601744186, "line_max": 79, "alpha_frac": 0.5455105309, "autogenerated": false, "ratio": 4.304878048780488, "config_test...