text stringlengths 0 1.05M | meta dict |
|---|---|
"""
Helper package to make Python scripts with
command-line options, parsing database structure.
"""
__all__ = ['TOP_COMMENT', 'TABLE_SEP', 'sql_to_asciidoc', 'main_sql2asciidoc']
from db import *
import asciidoc
import getopt, os, re
import sys
TOP_COMMENT = \
r"""// '''''''''''''''''''''''''''''''''... | {
"repo_name": "avsd/sql2asciidoc",
"path": "sql2asciidoc/script_tools.py",
"copies": "1",
"size": "12217",
"license": "bsd-3-clause",
"hash": 7796730780844560000,
"line_mean": 24.9690949227,
"line_max": 98,
"alpha_frac": 0.4792502251,
"autogenerated": false,
"ratio": 3.562846310877807,
"config_... |
"""
Module for parsing database structure
from Oracle SQL DDL script
"""
__all__ = ['Table','Column','parse_tables','parse_views','PERMITS_LIST']
import re
RXX_TABLENAME = \
"(?P<tablename>([\\w\\$]+\\.|\"[\\w\\$]+\"\\.)?([\\w\\$]+|\"[\\w\\$]+\"))"
RX_TABLE = re.compile(
r"\bCREATE\s+TABLE\s+... | {
"repo_name": "avsd/sql2asciidoc",
"path": "sql2asciidoc/db.py",
"copies": "1",
"size": "11897",
"license": "bsd-3-clause",
"hash": -5504215562167272000,
"line_mean": 27.375308642,
"line_max": 87,
"alpha_frac": 0.4632260234,
"autogenerated": false,
"ratio": 3.768451061133988,
"config_test": fal... |
from setuptools import setup
# from os.path import dirname, join
# longdesc = open(join(dirname(__file__), './README.md')).read()
setup(
name='imgix-lokoplugins',
version='0.0.1',
url='https://github.com/imgix/imgix-lokoplugins',
maintainer='Imgix',
maintainer_email='david@imgix.com',
package... | {
"repo_name": "imgix/imgix-lokoplugins",
"path": "setup.py",
"copies": "1",
"size": "2311",
"license": "bsd-2-clause",
"hash": 8691872161440626000,
"line_mean": 42.6037735849,
"line_max": 77,
"alpha_frac": 0.7247944613,
"autogenerated": false,
"ratio": 4.08303886925795,
"config_test": false,
... |
from bs4 import BeautifulSoup
from time import sleep
import urllib.request as ul
import ctypes
import winsound
# Array of Milestone names, change for the desired milestone name, must be equal at the title of milestone at the Github milestone page
milestonenames = ['Homestead', '1.3.4']
# Array of Percent Alarm(s)
tar... | {
"repo_name": "kartojal/checkmilestones-py",
"path": "checkmilestones.py",
"copies": "1",
"size": "2131",
"license": "mit",
"hash": 5105973246122995000,
"line_mean": 41.62,
"line_max": 142,
"alpha_frac": 0.6809009855,
"autogenerated": false,
"ratio": 3.3559055118110237,
"config_test": false,
... |
__author__ = 'David C. Dean'
import requests
import json
class OAuth:
def __init__(self, endpoint='https://login.salesforce.com', username='', password='', client_id='', client_secret=''):
self.__endpoint = endpoint
self.__username = username
self.__password = password
self.__cli... | {
"repo_name": "DavidCDean/salesforce-streaming",
"path": "salesforce_streaming/authorization.py",
"copies": "1",
"size": "1223",
"license": "mit",
"hash": 1659756529466363400,
"line_mean": 28.119047619,
"line_max": 122,
"alpha_frac": 0.5707277187,
"autogenerated": false,
"ratio": 4.04966887417218... |
__author__ = 'David C. Dean'
import requests
import json
class StreamingAPI:
def __init__(self, instance=None, token=None):
self.__endpoint = instance + '/cometd/28.0'
self.__token = token
self.__hs_data = None
self.__session = requests.session()
def handshake(self):
... | {
"repo_name": "DavidCDean/salesforce-streaming",
"path": "salesforce_streaming/streaming_api.py",
"copies": "1",
"size": "2141",
"license": "mit",
"hash": 4050099670045952500,
"line_mean": 37.2321428571,
"line_max": 146,
"alpha_frac": 0.6029892574,
"autogenerated": false,
"ratio": 3.8369175627240... |
"""
The :mod:`ensemble` module implements the ensemble selection
technique of Caruana et al [1][2].
Currently supports f1, auc, rmse, accuracy and mean cross entropy scores
for hillclimbing. Based on numpy, scipy, sklearn and sqlite.
Work in progress.
References
----------
.. [1] Caruana, et al, "Ensemble Selection... | {
"repo_name": "irwenqiang/pyensemble",
"path": "ensemble.py",
"copies": "3",
"size": "23046",
"license": "bsd-3-clause",
"hash": 3291129969768070000,
"line_mean": 33.0413589365,
"line_max": 79,
"alpha_frac": 0.5419161677,
"autogenerated": false,
"ratio": 4.009394572025053,
"config_test": false,... |
import gc, cPickle as pickle, weakref, sys, traceback
#
# Method 1: use weak ref to track new live objects
# Advantages: we have live pointers to the new live objects. And fast
# Drawbacks: doesn't track many types (such as list, dict, etc.) but
# generally this is not a problem because: if they contain
#... | {
"repo_name": "ActiveState/code",
"path": "recipes/Python/576523_Track_newunreclaimed_objects_between_2_points/recipe-576523.py",
"copies": "1",
"size": "10702",
"license": "mit",
"hash": -7523518174625081000,
"line_mean": 29.9306358382,
"line_max": 84,
"alpha_frac": 0.5851242758,
"autogenerated": ... |
import sys, os, threading, Queue, itertools, traceback, select, struct
import cPickle as pickle # Only for SimpleChannelEndpoint
__all__ = ["Mux", "DeMux", "ChannelPair"]
## Magic token to mark the end of job submission by the DeMux
SENTINEL = "QUIT"
def is_sentinel(obj):
"""Predicate True when a DeMux worker t... | {
"repo_name": "ActiveState/code",
"path": "recipes/Python/576520_Multithreaded_MultiplexerDemultiplexer_allow/recipe-576520.py",
"copies": "1",
"size": "17495",
"license": "mit",
"hash": -6981440086778933000,
"line_mean": 33.7813121272,
"line_max": 79,
"alpha_frac": 0.5636467562,
"autogenerated": f... |
__author__ = 'daviddemaris'
import os
import sys
CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(CWD, '..'))
import csv
escapes = ''.join([chr(char) for char in range(16, 17)])
def generateAimlFromSimpleCSV(csvData):
aimlFile = '<?xml version="1.0" encoding="ISO-8859-1"?>\n'
... | {
"repo_name": "hansonrobotics/chatbot",
"path": "src/chatbot/server/csvUtils.py",
"copies": "1",
"size": "10342",
"license": "mit",
"hash": -3376764262327670300,
"line_mean": 40.368,
"line_max": 139,
"alpha_frac": 0.5409011797,
"autogenerated": false,
"ratio": 3.993050193050193,
"config_test": ... |
import random
import threading
import time
from avatar2.message import RemoteMemoryReadMessage, BreakpointHitMessage, UpdateStateMessage
from avatar2.targets import Target, TargetStates
class _TargetThread(threading.Thread):
"""Thread that mimics a running target"""
def __init__(self, target):
thre... | {
"repo_name": "avatartwo/avatar2",
"path": "avatar2/targets/dummy_target.py",
"copies": "1",
"size": "5675",
"license": "apache-2.0",
"hash": -6352372475709813000,
"line_mean": 38.1379310345,
"line_max": 112,
"alpha_frac": 0.6155066079,
"autogenerated": false,
"ratio": 4.250936329588015,
"confi... |
__author__ = 'davidebest'
from scrapy.spider import Spider
from scrapy.selector import Selector
from scrapy.http import Request
import urlparse
import re
import lxml
import datetime
import sys
sys.path.append('/vagrant/localharvest')
from items import LocalharvestItem, PickupPoint
import phonenumbers
class LocalHarv... | {
"repo_name": "codefordayton/scrapers",
"path": "localharvest/spiders/local_harvest_spider.py",
"copies": "2",
"size": "6855",
"license": "unlicense",
"hash": 939293468365567600,
"line_mean": 45.0067114094,
"line_max": 238,
"alpha_frac": 0.5735959154,
"autogenerated": false,
"ratio": 3.5316846986... |
__author__ = 'Davide Monfrecola'
import json
from phantomrestclient.phantomrequests import PhantomRequests
class Domains():
def __init__(self):
self.pr = PhantomRequests()
def get_all(self):
"""Retrieve all the running domains and create a new Domain instance for each one
:return: D... | {
"repo_name": "trampfox/nimbus-phantom-rest-client",
"path": "phantomrestclient/domains.py",
"copies": "1",
"size": "1388",
"license": "apache-2.0",
"hash": -69052368553638640,
"line_mean": 27.9375,
"line_max": 89,
"alpha_frac": 0.6044668588,
"autogenerated": false,
"ratio": 4.070381231671554,
... |
__author__ = 'Davide Monfrecola'
import json
from phantomrestclient.phantomrequests import PhantomRequests
class Sites():
def __init__(self):
self.pr = PhantomRequests()
def get_all(self):
"""Retrieve all the sites and create a new Site instance for each one
:return: Site list that ... | {
"repo_name": "trampfox/nimbus-phantom-rest-client",
"path": "phantomrestclient/sites.py",
"copies": "1",
"size": "1798",
"license": "apache-2.0",
"hash": 6337519993651312000,
"line_mean": 27.109375,
"line_max": 77,
"alpha_frac": 0.5806451613,
"autogenerated": false,
"ratio": 4.00445434298441,
... |
__author__ = 'Davide Monfrecola'
import requests
import json
from phantomrestclient import auth
class PhantomRequests():
def __init__(self):
self.auth = auth.PhantomAuth()
self.api_url = 'https://phantom.nimbusproject.org/api/dev'
self.access_token = self.auth.read_token_from_file()
... | {
"repo_name": "trampfox/nimbus-phantom-rest-client",
"path": "phantomrestclient/phantomrequests.py",
"copies": "1",
"size": "2874",
"license": "apache-2.0",
"hash": -8147954217928078000,
"line_mean": 32.8235294118,
"line_max": 88,
"alpha_frac": 0.5894224078,
"autogenerated": false,
"ratio": 3.722... |
__author__ = 'Davide'
import pathlib
import shutil
import sys
import argparse
import logging
def parseArgs():
parser = argparse.ArgumentParser(description='Apply diffs.')
parser.add_argument('diff_file', type=str, help='diff file')
parser.add_argument('path_from', type=str, help='src folder')
parser.... | {
"repo_name": "DavideCanton/PyComparePaths",
"path": "apply_diff.py",
"copies": "1",
"size": "3015",
"license": "mit",
"hash": -2407693091903000000,
"line_mean": 29.7653061224,
"line_max": 89,
"alpha_frac": 0.5797678275,
"autogenerated": false,
"ratio": 3.3914510686164228,
"config_test": false,... |
# This is a merge of the docutils_ `rst2html` front end with an extension
# suggestion taken from the pygments_ documentation.
"""
A front end to docutils, producing HTML with syntax colouring using pygments
"""
try:
import locale
locale.setlocale(locale.LC_ALL, '')
except:
pass
from docutils.core impor... | {
"repo_name": "Knio/miru",
"path": "docs/rst2html-pygments.py",
"copies": "1",
"size": "2070",
"license": "mit",
"hash": 1341097172472486400,
"line_mean": 34.6896551724,
"line_max": 78,
"alpha_frac": 0.7193236715,
"autogenerated": false,
"ratio": 3.9731285988483687,
"config_test": false,
"has... |
"""
Directives for document parts.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, languages
from docutils.transforms import parts
from docutils.parsers.rst import directives
backlinks_values = ('top', 'entry', 'none')
def backlinks(arg):
value = directives.choice(arg, backlinks_values)
... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/parsers/rst/directives/parts.py",
"copies": "1",
"size": "4676",
"license": "mit",
"hash": -7932214902269727000,
"line_mean": 36.7096774194,
"line_max": 80,
"alpha_frac": 0.6454234388,
"autogenerated": false,
"ratio": 4.041486603... |
"""
Directives for document parts.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, languages
from docutils.transforms import parts
from docutils.parsers.rst import directives
backlinks_values = ('top', 'entry', 'none')
def backlinks(arg):
value = directives.choice(arg, backli... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/directives/parts.py",
"copies": "5",
"size": "4876",
"license": "apache-2.0",
"hash": 1295534037212902100,
"line_mean": 36.6984126984,
"line_max": 80,
"alpha_frac": 0.6277686628,
"autogenerated": false,
"ratio": 4.0... |
"""
This package contains directive implementation modules.
The interface for directive functions is as follows::
def directive_fn(name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
code...
# Set function attributes:
directive_fn.ar... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/parsers/rst/directives/__init__.py",
"copies": "1",
"size": "14915",
"license": "mit",
"hash": -6439196709766593000,
"line_mean": 34.4275534442,
"line_max": 79,
"alpha_frac": 0.6359369762,
"autogenerated": false,
"ratio": 4.28961... |
"""
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 directives
from docutils.parsers.rst.roles import set_classes
def topic(name, arguments, ... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/parsers/rst/directives/body.py",
"copies": "1",
"size": "6680",
"license": "mit",
"hash": -2928877780707132400,
"line_mean": 38.5266272189,
"line_max": 79,
"alpha_frac": 0.645508982,
"autogenerated": false,
"ratio": 3.85236447520... |
"""
This is the Docutils (Python Documentation Utilities) package.
Package Structure
=================
Modules:
- __init__.py: Contains component base classes, exception classes, and
Docutils `__version__`.
- core.py: Contains the ``Publisher`` class and ``publish_*()`` convenience
functions.
- frontend.py: R... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/__init__.py",
"copies": "1",
"size": "6120",
"license": "mit",
"hash": -3399096701683666000,
"line_mean": 32.6263736264,
"line_max": 81,
"alpha_frac": 0.7070261438,
"autogenerated": false,
"ratio": 4.556962025316456,
"config_te... |
"""
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": "jmchilton/galaxy-central",
"path": "modules/docutils/parsers/rst/tableparser.py",
"copies": "1",
"size": "20160",
"license": "mit",
"hash": 2969488405434758000,
"line_mean": 37.6206896552,
"line_max": 80,
"alpha_frac": 0.5150793651,
"autogenerated": false,
"ratio": 4.14133114215283... |
"""
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
- `StateMachineWS`, a whitespace-sensitive version of `StateMachine`
- `StateWS`, a state superclass for use with `StateMachineWS... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/statemachine.py",
"copies": "1",
"size": "54368",
"license": "mit",
"hash": 6972908152179150000,
"line_mean": 36.0859481583,
"line_max": 78,
"alpha_frac": 0.5883975868,
"autogenerated": false,
"ratio": 4.402267206477733,
"confi... |
"""
Parser for Python modules. Requires Python 2.2 or higher.
The `parse_module()` function takes a module's text and file name,
runs it through the module parser (using compiler.py and tokenize.py)
and produces a parse tree of the source code, using the nodes as found
in pynodes.py. For example, given this module ... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/readers/python/moduleparser.py",
"copies": "1",
"size": "25838",
"license": "mit",
"hash": 4695782533006103000,
"line_mean": 33.0870712401,
"line_max": 81,
"alpha_frac": 0.5695487267,
"autogenerated": false,
"ratio": 4.2378218796... |
"""
Directives for typically HTML-specific constructs.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import nodes, utils
from docutils.parsers.rst import states
from docutils.transforms import components
def meta(name, arguments, options, content, lineno,
content_offset, block_text, stat... | {
"repo_name": "pombreda/django-hotclub",
"path": "libs/external_libs/docutils-0.4/docutils/parsers/rst/directives/html.py",
"copies": "7",
"size": "3529",
"license": "mit",
"hash": 3944573929864380400,
"line_mean": 35.7604166667,
"line_max": 73,
"alpha_frac": 0.5809011051,
"autogenerated": false,
... |
"""
This package contains the Python Source Reader modules.
It requires Python 2.2 or higher (`moduleparser` depends on the
`compiler` and `tokenize` modules).
"""
__docformat__ = 'reStructuredText'
import sys
import docutils.readers
from docutils.readers.python import moduleparser
from docutils import parsers
fro... | {
"repo_name": "google-code-export/django-hotclub",
"path": "libs/external_libs/docutils-0.4/docutils/readers/python/__init__.py",
"copies": "7",
"size": "4503",
"license": "mit",
"hash": 6992050536639095000,
"line_mean": 33.1136363636,
"line_max": 157,
"alpha_frac": 0.624694648,
"autogenerated": fa... |
"""
PEP HTML Writer.
"""
__docformat__ = 'reStructuredText'
import sys
import docutils
from docutils import frontend, nodes, utils
from docutils.writers import html4css1
class Writer(html4css1.Writer):
settings_spec = html4css1.Writer.settings_spec + (
'PEP/HTML-Specific Options',
None,
... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/writers/pep_html.py",
"copies": "1",
"size": "3039",
"license": "mit",
"hash": -3558051640561936000,
"line_mean": 32.7666666667,
"line_max": 78,
"alpha_frac": 0.5742020401,
"autogenerated": false,
"ratio": 3.871337579617834,
"c... |
"""
Python Enhancement Proposal (PEP) Reader.
"""
__docformat__ = 'reStructuredText'
from docutils.readers import standalone
from docutils.transforms import peps, references
from docutils.parsers import rst
class Reader(standalone.Reader):
supported = ('pep',)
"""Contexts this reader supports."""
se... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/readers/pep.py",
"copies": "1",
"size": "1707",
"license": "mit",
"hash": -6795312798220825000,
"line_mean": 31.8269230769,
"line_max": 75,
"alpha_frac": 0.6010544815,
"autogenerated": false,
"ratio": 4.422279792746114,
"config... |
"""
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": "jmchilton/galaxy-central",
"path": "modules/docutils/transforms/peps.py",
"copies": "1",
"size": "11116",
"license": "mit",
"hash": -141715861720280180,
"line_mean": 35.3267973856,
"line_max": 79,
"alpha_frac": 0.5358042461,
"autogenerated": false,
"ratio": 4.242748091603054,
"co... |
"""
I/O classes provide a uniform API for low-level input and output. Subclasses
will exist for a variety of input/output mechanisms.
"""
__docformat__ = 'reStructuredText'
import sys
try:
import locale
except:
pass
from types import UnicodeType
from docutils import TransformSpec
class Input(TransformSpec... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/io.py",
"copies": "1",
"size": "10762",
"license": "mit",
"hash": 2093321180601020400,
"line_mean": 30.0144092219,
"line_max": 83,
"alpha_frac": 0.5419067088,
"autogenerated": false,
"ratio": 4.575680272108843,
"config_test": f... |
"""
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": "jmchilton/galaxy-central",
"path": "modules/docutils/transforms/references.py",
"copies": "1",
"size": "31082",
"license": "mit",
"hash": 382468510926927740,
"line_mean": 38.5445292621,
"line_max": 78,
"alpha_frac": 0.5316581945,
"autogenerated": false,
"ratio": 4.545481134834747,
... |
"""
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": "jmchilton/galaxy-central",
"path": "modules/docutils/transforms/misc.py",
"copies": "1",
"size": "2235",
"license": "mit",
"hash": -7800025356639077000,
"line_mean": 31.3913043478,
"line_max": 78,
"alpha_frac": 0.6308724832,
"autogenerated": false,
"ratio": 4.579918032786885,
"co... |
"""
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": "jmchilton/galaxy-central",
"path": "modules/docutils/parsers/rst/__init__.py",
"copies": "1",
"size": "6270",
"license": "mit",
"hash": 111347807604688660,
"line_mean": 39.4516129032,
"line_max": 79,
"alpha_frac": 0.6507177033,
"autogenerated": false,
"ratio": 4.071428571428571,
... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import os.path
import warnings
from types import StringType, UnicodeType
from docutils import ApplicationError, DataError
from docutils import frontend, nodes
class SystemMessage(ApplicationErro... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/utils.py",
"copies": "1",
"size": "19699",
"license": "mit",
"hash": 5781615408089193000,
"line_mean": 35.547309833,
"line_max": 79,
"alpha_frac": 0.6029747703,
"autogenerated": false,
"ratio": 4.368817919716124,
"config_test":... |
"""
This is the ``docutils.parsers.restructuredtext.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.
... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/parsers/rst/states.py",
"copies": "1",
"size": "122877",
"license": "mit",
"hash": -8558198870518176000,
"line_mean": 41.0523613963,
"line_max": 80,
"alpha_frac": 0.5459199036,
"autogenerated": false,
"ratio": 4.397101449275362,
... |
"""
Directives for figures and simple images.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import nodes, utils
from docutils.parsers.rst import directives, states
from docutils.nodes import fully_normalize_name
from docutils.parsers.rst.roles import set_classes
try:
import Image ... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/parsers/rst/directives/images.py",
"copies": "1",
"size": "5907",
"license": "mit",
"hash": 1207976256779817200,
"line_mean": 39.1836734694,
"line_max": 82,
"alpha_frac": 0.5999661419,
"autogenerated": false,
"ratio": 4.082239115... |
"""
Standalone file Reader for the reStructuredText markup syntax.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import frontend, readers
from docutils.transforms import frontmatter, references
class Reader(readers.Reader):
supported = ('standalone',)
"""Contexts this reader supports.""... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/readers/standalone.py",
"copies": "1",
"size": "2409",
"license": "mit",
"hash": 3679823216690645500,
"line_mean": 36.640625,
"line_max": 78,
"alpha_frac": 0.5919468659,
"autogenerated": false,
"ratio": 4.6238003838771595,
"con... |
"""
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": "jmchilton/galaxy-central",
"path": "modules/docutils/nodes.py",
"copies": "1",
"size": "56434",
"license": "mit",
"hash": -1425636128552595500,
"line_mean": 32.5118764846,
"line_max": 79,
"alpha_frac": 0.5955806783,
"autogenerated": false,
"ratio": 4.219679976072977,
"config_test... |
"""
Simple HyperText Markup Language document tree Writer.
The output conforms to the HTML 4.01 Transitional DTD and to the Extensible
HTML version 1.0 Transitional DTD (*almost* strict). The output contains a
minimum of formatting information. A cascading style sheet ("default.css" by
default) is required for prop... | {
"repo_name": "jmchilton/galaxy-central",
"path": "modules/docutils/writers/html4css1.py",
"copies": "1",
"size": "55256",
"license": "mit",
"hash": 4577987746982337000,
"line_mean": 36.4616949153,
"line_max": 79,
"alpha_frac": 0.5473432749,
"autogenerated": false,
"ratio": 3.9389791844881663,
... |
"""
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": "pombreda/django-hotclub",
"path": "libs/external_libs/docutils-0.4/docutils/parsers/rst/__init__.py",
"copies": "6",
"size": "6329",
"license": "mit",
"hash": 5417372759955751000,
"line_mean": 39.5705128205,
"line_max": 79,
"alpha_frac": 0.6508137146,
"autogenerated": false,
"ratio... |
"""
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": "indro/t2c",
"path": "libs/external_libs/docutils-0.4/docutils/readers/standalone.py",
"copies": "6",
"size": "2446",
"license": "mit",
"hash": 5865114134493468000,
"line_mean": 34.4492753623,
"line_max": 78,
"alpha_frac": 0.618152085,
"autogenerated": false,
"ratio": 4.391382405745... |
"""
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": "santisiri/popego",
"path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/docutils-0.4-py2.5.egg/docutils/transforms/components.py",
"copies": "6",
"size": "2048",
"license": "bsd-3-clause",
"hash": 6767429614682201000,
"line_mean": 36.9259259259,
"line_max": 78,
"alpha_frac": 0.696289... |
"""
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": "indro/t2c",
"path": "libs/external_libs/docutils-0.4/docutils/transforms/peps.py",
"copies": "6",
"size": "11092",
"license": "mit",
"hash": -1807713685569763600,
"line_mean": 35.2483660131,
"line_max": 79,
"alpha_frac": 0.5353407862,
"autogenerated": false,
"ratio": 4.241682600382... |
"""
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
- `StateMachineWS`, a whitespace-sensitive version of `StateMachine`
- `StateWS`, a state superclass for use with `StateMachineWS... | {
"repo_name": "google-code-export/django-hotclub",
"path": "libs/external_libs/docutils-0.4/docutils/statemachine.py",
"copies": "6",
"size": "55377",
"license": "mit",
"hash": -7642328904357389000,
"line_mean": 36.1159517426,
"line_max": 80,
"alpha_frac": 0.5871210069,
"autogenerated": false,
"r... |
"""
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": "indro/t2c",
"path": "libs/external_libs/docutils-0.4/docutils/parsers/rst/tableparser.py",
"copies": "6",
"size": "20382",
"license": "mit",
"hash": -8906025234095204000,
"line_mean": 37.6755218216,
"line_max": 80,
"alpha_frac": 0.5163379452,
"autogenerated": false,
"ratio": 4.1351... |
"""
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": "santisiri/popego",
"path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/docutils-0.4-py2.5.egg/docutils/writers/html4css1/__init__.py",
"copies": "7",
"size": "60534",
"license": "bsd-3-clause",
"hash": -7915463054327902000,
"line_mean": 36.8101186758,
"line_max": 79,
"alpha_frac": 0... |
"""
Directives for figures and simple images.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import nodes, utils
from docutils.parsers.rst import directives, states
from docutils.nodes import fully_normalize_name, whitespace_normalize_name
from docutils.parsers.rst.roles import set_classes
try:
... | {
"repo_name": "indro/t2c",
"path": "libs/external_libs/docutils-0.4/docutils/parsers/rst/directives/images.py",
"copies": "6",
"size": "6084",
"license": "mit",
"hash": -7656706128659305000,
"line_mean": 39.0263157895,
"line_max": 82,
"alpha_frac": 0.5987836949,
"autogenerated": false,
"ratio": 4... |
"""
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": "indro/t2c",
"path": "libs/external_libs/docutils-0.4/docutils/nodes.py",
"copies": "6",
"size": "58874",
"license": "mit",
"hash": 7586127051076406000,
"line_mean": 32.5273348519,
"line_max": 79,
"alpha_frac": 0.5940822774,
"autogenerated": false,
"ratio": 4.223385939741751,
"con... |
"""
This is the ``docutils.parsers.restructuredtext.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.
... | {
"repo_name": "google-code-export/django-hotclub",
"path": "libs/external_libs/docutils-0.4/docutils/parsers/rst/states.py",
"copies": "6",
"size": "123983",
"license": "mit",
"hash": -721569077677909100,
"line_mean": 41.0566485753,
"line_max": 80,
"alpha_frac": 0.5470427397,
"autogenerated": false... |
"""
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": "jmchilton/galaxy-central",
"path": "modules/docutils/transforms/components.py",
"copies": "1",
"size": "2058",
"license": "mit",
"hash": -1050033501474873500,
"line_mean": 37.1111111111,
"line_max": 78,
"alpha_frac": 0.6967930029,
"autogenerated": false,
"ratio": 4.140845070422535,... |
"""
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 directives
from docutils.parsers.rst.roles import set_classes
def topic(n... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/directives/body.py",
"copies": "5",
"size": "7848",
"license": "apache-2.0",
"hash": -5455777502211972000,
"line_mean": 38.0408163265,
"line_max": 79,
"alpha_frac": 0.624235474,
"autogenerated": false,
"ratio": 3... |
"""
This package contains directive implementation modules.
The interface for directive functions is as follows::
def directive_fn(name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
code...
# Set function attributes:
dire... | {
"repo_name": "brownman/selenium-webdriver",
"path": "selenium/src/py/lib/docutils/parsers/rst/directives/__init__.py",
"copies": "5",
"size": "16275",
"license": "apache-2.0",
"hash": -7285068301638758000,
"line_mean": 34.2472160356,
"line_max": 79,
"alpha_frac": 0.6151766513,
"autogenerated": fal... |
"""
This package contains Docutils parser modules.
"""
__docformat__ = 'reStructuredText'
from docutils import Component
class Parser(Component):
component_type = 'parser'
config_section = 'parsers'
def parse(self, inputstring, document):
"""Override to parse `inputstring` int... | {
"repo_name": "mfazekas/safaridriver",
"path": "selenium/src/py/lib/docutils/parsers/__init__.py",
"copies": "5",
"size": "1570",
"license": "apache-2.0",
"hash": 1041036096915285800,
"line_mean": 30.0408163265,
"line_max": 76,
"alpha_frac": 0.6401273885,
"autogenerated": false,
"ratio": 3.905472... |
"""
Directives for typically HTML-specific constructs.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import nodes, utils
from docutils.parsers.rst import states
from docutils.transforms import components
def meta(name, arguments, options, content, lineno,
content_offset, bl... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/directives/html.py",
"copies": "5",
"size": "3625",
"license": "apache-2.0",
"hash": 265128556201435550,
"line_mean": 35.7604166667,
"line_max": 73,
"alpha_frac": 0.5655172414,
"autogenerated": false,
"ratio": 4.220... |
"""
This package contains the Python Source Reader modules.
It requires Python 2.2 or higher (`moduleparser` depends on the
`compiler` and `tokenize` modules).
"""
__docformat__ = 'reStructuredText'
import sys
import docutils.readers
from docutils.readers.python import moduleparser
from docutils impo... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/readers/python/__init__.py",
"copies": "5",
"size": "4635",
"license": "apache-2.0",
"hash": -90454939465709740,
"line_mean": 33.1136363636,
"line_max": 157,
"alpha_frac": 0.6069039914,
"autogenerated": false,
"ratio": 4.405... |
"""
Admonition directives.
"""
__docformat__ = 'reStructuredText'
from docutils.parsers.rst import states, directives
from docutils import nodes
def make_admonition(node_class, name, arguments, options, content, lineno,
content_offset, block_text, state, state_machine):
if... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/directives/admonitions.py",
"copies": "5",
"size": "2410",
"license": "apache-2.0",
"hash": 7710547089451044000,
"line_mean": 24.7777777778,
"line_max": 74,
"alpha_frac": 0.6493775934,
"autogenerated": false,
"ratio... |
"""
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',)
"""Contex... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/readers/pep.py",
"copies": "5",
"size": "1666",
"license": "apache-2.0",
"hash": -8956217481703280000,
"line_mean": 31.32,
"line_max": 75,
"alpha_frac": 0.6548619448,
"autogenerated": false,
"ratio": 3.9292452830188678,
"c... |
"""
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 t... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/readers/standalone.py",
"copies": "5",
"size": "2515",
"license": "apache-2.0",
"hash": -5458604138221138000,
"line_mean": 34.4492753623,
"line_max": 78,
"alpha_frac": 0.6011928429,
"autogenerated": false,
"ratio": 4.4513274... |
"""
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):
"... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/transforms/components.py",
"copies": "5",
"size": "2102",
"license": "apache-2.0",
"hash": -271973202732318460,
"line_mean": 36.9259259259,
"line_max": 78,
"alpha_frac": 0.6784015224,
"autogenerated": false,
"ratio": 4.14595660... |
"""
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 de... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/transforms/misc.py",
"copies": "5",
"size": "5034",
"license": "apache-2.0",
"hash": -3677136511702662700,
"line_mean": 32.7172413793,
"line_max": 78,
"alpha_frac": 0.5723083035,
"autogenerated": false,
"ratio": 4.7401129943... |
"""
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
- `StateMachineWS`, a whitespace-sensitive version of `StateMachine`
- `StateWS`, a state superclass for use with `StateM... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/statemachine.py",
"copies": "5",
"size": "56869",
"license": "apache-2.0",
"hash": -7583321879857108000,
"line_mean": 36.1159517426,
"line_max": 80,
"alpha_frac": 0.5717174559,
"autogenerated": false,
"ratio": 4.48246236304879,... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import os.path
import types
import warnings
import unicodedata
from types import StringType, UnicodeType
from docutils import ApplicationError, DataError
from docutils import fronte... | {
"repo_name": "hugs/selenium",
"path": "selenium/src/py/lib/docutils/utils.py",
"copies": "5",
"size": "21527",
"license": "apache-2.0",
"hash": -4607713165947366000,
"line_mean": 35.1155172414,
"line_max": 79,
"alpha_frac": 0.5861011753,
"autogenerated": false,
"ratio": 4.414889253486464,
"con... |
"""
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 &... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/tableparser.py",
"copies": "5",
"size": "20909",
"license": "apache-2.0",
"hash": -6516695136960645000,
"line_mean": 37.6755218216,
"line_max": 80,
"alpha_frac": 0.5033239275,
"autogenerated": false,
"ratio": 4.2248... |
"""
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.
... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/transforms/references.py",
"copies": "5",
"size": "36764",
"license": "apache-2.0",
"hash": 32911645642263690,
"line_mean": 38.5783664459,
"line_max": 83,
"alpha_frac": 0.5167283212,
"autogenerated": false,
"ratio": 4.693476... |
"""
Directives for figures and simple images.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import nodes, utils
from docutils.parsers.rst import directives, states
from docutils.nodes import fully_normalize_name, whitespace_normalize_name
from docutils.parsers.rst.roles import set_clas... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/directives/images.py",
"copies": "5",
"size": "6236",
"license": "apache-2.0",
"hash": 7405224582999723000,
"line_mean": 39.0263157895,
"line_max": 82,
"alpha_frac": 0.5841885824,
"autogenerated": false,
"ratio":... |
"""
Parser for Python modules. Requires Python 2.2 or higher.
The `parse_module()` function takes a module's text and file name,
runs it through the module parser (using compiler.py and tokenize.py)
and produces a parse tree of the source code, using the nodes as found
in pynodes.py. For example, given this ... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/readers/python/moduleparser.py",
"copies": "5",
"size": "26602",
"license": "apache-2.0",
"hash": -8905408654349880000,
"line_mean": 33.0026315789,
"line_max": 81,
"alpha_frac": 0.5531914894,
"autogenerated": false,
"ratio": 4.... |
"""
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
imp... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/transforms/peps.py",
"copies": "5",
"size": "11368",
"license": "apache-2.0",
"hash": -98548824707364510,
"line_mean": 35.1503267974,
"line_max": 79,
"alpha_frac": 0.5199683322,
"autogenerated": false,
"ratio": 4.33066666666666... |
"""
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 P... | {
"repo_name": "hugs/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/__init__.py",
"copies": "5",
"size": "6660",
"license": "apache-2.0",
"hash": -6469652439552409000,
"line_mean": 39.8867924528,
"line_max": 79,
"alpha_frac": 0.6315315315,
"autogenerated": false,
"ratio": 4.068417837... |
"""
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'
de... | {
"repo_name": "mogotest/selenium",
"path": "selenium/src/py/lib/docutils/writers/pep_html/__init__.py",
"copies": "5",
"size": "3742",
"license": "apache-2.0",
"hash": -4406159805577134000,
"line_mean": 32.9719626168,
"line_max": 79,
"alpha_frac": 0.5793693212,
"autogenerated": false,
"ratio": 3.... |
"""
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.
"""
... | {
"repo_name": "epall/selenium",
"path": "selenium/src/py/lib/docutils/writers/html4css1/__init__.py",
"copies": "5",
"size": "63101",
"license": "apache-2.0",
"hash": -1355694280750258700,
"line_mean": 36.7122699387,
"line_max": 79,
"alpha_frac": 0.5349202073,
"autogenerated": false,
"ratio": 4.0... |
"""
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 el... | {
"repo_name": "hugs/selenium",
"path": "selenium/src/py/lib/docutils/nodes.py",
"copies": "5",
"size": "60875",
"license": "apache-2.0",
"hash": -3565896469857413000,
"line_mean": 32.4906515581,
"line_max": 79,
"alpha_frac": 0.5765585216,
"autogenerated": false,
"ratio": 4.3054671476059125,
"co... |
"""
I/O classes provide a uniform API for low-level input and output. Subclasses
will exist for a variety of input/output mechanisms.
"""
__docformat__ = 'reStructuredText'
import sys
try:
import locale
except:
pass
import re
from types import UnicodeType
from docutils import TransformSpec
... | {
"repo_name": "brownman/selenium-webdriver",
"path": "selenium/src/py/lib/docutils/io.py",
"copies": "5",
"size": "13686",
"license": "apache-2.0",
"hash": -5286476432987192000,
"line_mean": 31.2184466019,
"line_max": 80,
"alpha_frac": 0.5249890399,
"autogenerated": false,
"ratio": 4.706327372764... |
"""
This is the ``docutils.parsers.restructuredtext.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 superc... | {
"repo_name": "hugs/selenium",
"path": "selenium/src/py/lib/docutils/parsers/rst/states.py",
"copies": "5",
"size": "127736",
"license": "apache-2.0",
"hash": 7439565529592130000,
"line_mean": 41.0667565745,
"line_max": 80,
"alpha_frac": 0.5338980397,
"autogenerated": false,
"ratio": 4.4678558936... |
__author__ = "David John Gagne <djgagne@ou.edu>"
import numpy as np
from ContingencyTable import ContingencyTable
class ROC(object):
def __init__(self, forecasts, observations, thresholds, obs_threshold):
self.forecasts = forecasts
self.observations = observations
self.thresholds = thresho... | {
"repo_name": "djgagne/hagelslag-unidata",
"path": "hagelslag/evaluation/ProbabilityMetrics.py",
"copies": "1",
"size": "2825",
"license": "mit",
"hash": -1582675608383027700,
"line_mean": 45.3114754098,
"line_max": 93,
"alpha_frac": 0.5720353982,
"autogenerated": false,
"ratio": 3.99575671852899... |
import numpy as np
from ..annotations import Annotations
from ..utils import verbose
from .artifact_detection import _annotations_from_mask
@verbose
def annotate_nan(raw, *, verbose=None):
"""Detect segments with NaN and return a new Annotations instance.
Parameters
----------
raw : instance of Raw... | {
"repo_name": "mne-tools/mne-python",
"path": "mne/preprocessing/annotate_nan.py",
"copies": "4",
"size": "1029",
"license": "bsd-3-clause",
"hash": -8441289135116528000,
"line_mean": 28.4,
"line_max": 72,
"alpha_frac": 0.657920311,
"autogenerated": false,
"ratio": 3.5605536332179932,
"config_t... |
__author__ = 'David Karchmer'
# https://github.com/ampervue/docker-ffmpeg
import sys
import argparse
import os
from subprocess import Popen, PIPE
FFMPEG_CMD = ['ffmpeg']
def execute_ffmpeg(args):
command = FFMPEG_CMD + args
print('Calling: ' + str(command))
pipe = Popen(command, stderr=PIPE)
print(... | {
"repo_name": "ampervue/docker-ffmpeg",
"path": "example/app/script.py",
"copies": "1",
"size": "1730",
"license": "mit",
"hash": 7789743415754592000,
"line_mean": 23.7142857143,
"line_max": 90,
"alpha_frac": 0.5647398844,
"autogenerated": false,
"ratio": 3.914027149321267,
"config_test": false... |
__author__ = 'David Karchmer'
# https://github.com/ampervue/docker-python27-ffmpeg
import sys
import argparse
import os
from subprocess import Popen, PIPE
FFMPEG_CMD = ['ffmpeg']
def execute_ffmpeg(args):
command = FFMPEG_CMD + args
print('Calling: ' + str(command))
pipe = Popen(command, stderr=PIPE)
... | {
"repo_name": "ampervue/docker-python34-ffmpeg",
"path": "example/app/script.py",
"copies": "2",
"size": "1739",
"license": "mit",
"hash": 232259103183536480,
"line_mean": 23.8428571429,
"line_max": 90,
"alpha_frac": 0.5664174813,
"autogenerated": false,
"ratio": 3.9078651685393258,
"config_tes... |
__author__ = "David Katz-Wigmore"
from File_Creator import WriteFile
import ttk
import Tkinter as tk
import Get_Providers
class App(tk.Frame):
def __init__(self, master, dictionary):
"""
Initializes the main frame which will be known as self
:param master:
:param dictionary:
... | {
"repo_name": "katzwigmore/SSVF-Repositry-DQ-Processor",
"path": "RepositoryDQProcessor.py",
"copies": "1",
"size": "8768",
"license": "mit",
"hash": 2356222925528093000,
"line_mean": 44.4300518135,
"line_max": 117,
"alpha_frac": 0.4738822993,
"autogenerated": false,
"ratio": 4.557172557172557,
... |
__author__ = 'David Katz-Wigmore'
from re import *
from xlwt import *
class WriteFile(object):
service_point_equivalent_field_names = {
"Name": "First/Last Name",
"Social Security Number": "SSID",
"Date of Birth": "DoB",
"Race": "Race 1",
"Ethnicity": "Ethnicity",
... | {
"repo_name": "katzwigmore/SSVF-Repositry-DQ-Processor",
"path": "File_Creator.py",
"copies": "1",
"size": "5332",
"license": "mit",
"hash": -1898365183019421200,
"line_mean": 41.656,
"line_max": 118,
"alpha_frac": 0.5639534884,
"autogenerated": false,
"ratio": 3.657064471879287,
"config_test":... |
import board
import neopixel
import time
DELAY = .09 #Controls rate of scan, smaller is faster
RED = (60,0,0)
WHITE = (20,20,20)
BLUE = (0,0,60)
p = neopixel.NeoPixel(board.NEOPIXEL, 10)
def getColor(n):
color = n%3
if color == 1:
return RED
elif color == 2:
return WHITE
else:
... | {
"repo_name": "DaveKT/CircuitPython_Examples",
"path": "docs/USAscan.py",
"copies": "1",
"size": "1297",
"license": "mit",
"hash": 7681253337298976000,
"line_mean": 21.7543859649,
"line_max": 70,
"alpha_frac": 0.5096376253,
"autogenerated": false,
"ratio": 2.6797520661157024,
"config_test": fal... |
import board
import neopixel
import time
import busio
import adafruit_lis3dh
ACCEL_RANGE = adafruit_lis3dh.RANGE_16_G
p = neopixel.NeoPixel(board.NEOPIXEL, 10)
i2c = busio.I2C(board.ACCELEROMETER_SCL, board.ACCELEROMETER_SDA)
lis3dh = adafruit_lis3dh.LIS3DH_I2C(i2c, address=25)
lis3dh.range = ACCEL_RANGE
while ... | {
"repo_name": "DaveKT/CircuitPython_Examples",
"path": "docs/accelerometer.py",
"copies": "1",
"size": "1144",
"license": "mit",
"hash": 2708187882784760300,
"line_mean": 27.6,
"line_max": 71,
"alpha_frac": 0.6809440559,
"autogenerated": false,
"ratio": 2.4288747346072186,
"config_test": false,... |
import board
import digitalio
import neopixel
p = neopixel.NeoPixel(board.NEOPIXEL, 10)
#Initialize Buttons A and B
button_a = digitalio.DigitalInOut(board.BUTTON_A)
button_a.switch_to_input(pull=digitalio.Pull.DOWN)
button_b = digitalio.DigitalInOut(board.BUTTON_B)
button_b.switch_to_input(pull=digitalio.Pull.DOWN... | {
"repo_name": "DaveKT/CircuitPython_Examples",
"path": "docs/buttons.py",
"copies": "1",
"size": "1049",
"license": "mit",
"hash": 3901396078308828700,
"line_mean": 20.4081632653,
"line_max": 70,
"alpha_frac": 0.6224976168,
"autogenerated": false,
"ratio": 2.7973333333333334,
"config_test": fal... |
__author__ = 'David L Gibbs'
import scipy.sparse as sp
import scipy.sparse.linalg as lin
import numpy as np
def weightsum(nodes,tup):
totwt = 0.0
for ti in tup:
totwt += nodes[ti][2]
return(totwt)
def scoreSoln(soln, s, smat, nodes):
# soln -- the solutions set S
# smat -- nxn sparse ma... | {
"repo_name": "Gibbsdavidl/miergolf",
"path": "src/diffusion.py",
"copies": "1",
"size": "4336",
"license": "bsd-3-clause",
"hash": -3225911251495464400,
"line_mean": 30.6496350365,
"line_max": 120,
"alpha_frac": 0.5479704797,
"autogenerated": false,
"ratio": 2.8302872062663185,
"config_test": ... |
__author__ = 'davidl'
from ate_notify_monitor.new_notifier.drivers.base_driver import BaseMonitorDriver
import ate_notify_monitor.new_notifier.config
from tornado.options import options
class HttpMonitorDriver(BaseMonitorDriver):
def __init__(self, logger):
self.logger = logger
self.monitor_http_h... | {
"repo_name": "davidvoler/ate_meteor",
"path": "launcher/api/python/notifier/drivers/http_driver.py",
"copies": "1",
"size": "1092",
"license": "mit",
"hash": -2535891325735407600,
"line_mean": 36.6551724138,
"line_max": 94,
"alpha_frac": 0.6437728938,
"autogenerated": false,
"ratio": 3.701694915... |
__author__ = 'davidl'
from tasks import run_sequence, report_execution_status
import uuid
import time
def main():
uuts = [{'serial': '11101', 'id': 0},
{'serial': '11102', 'id': 1},
{'serial': '11103', 'id': 2},
{'serial': '11104', 'id': 3}]
sequence = [
{'name': 'te... | {
"repo_name": "davidvoler/ate_meteor",
"path": "launcher/celery_client.py",
"copies": "1",
"size": "1915",
"license": "mit",
"hash": 6116088632255652000,
"line_mean": 29.3968253968,
"line_max": 73,
"alpha_frac": 0.4877284595,
"autogenerated": false,
"ratio": 3.377425044091711,
"config_test": tr... |
__author__ = 'davidl'
from tornado.options import define
define("monitor_http_driver", default=False, help='use http driver to send notification', type=bool)
define("monitor_redis_driver", default=False, help='use redis driver to send notification', type=bool)
define("monitor_ddp_driver", default=False, help='use ddp ... | {
"repo_name": "davidvoler/ate_meteor",
"path": "launcher/api/python/notifier/config.py",
"copies": "1",
"size": "1041",
"license": "mit",
"hash": -246966360515027600,
"line_mean": 48.5714285714,
"line_max": 102,
"alpha_frac": 0.7531219981,
"autogenerated": false,
"ratio": 3.7446043165467624,
"c... |
__author__ = 'davidl'
import redis
from ate_notify_monitor.new_notifier.drivers.base_driver import BaseMonitorDriver
import ate_notify_monitor.new_notifier.config
from tornado.options import options
class RedisMonitorDriver(BaseMonitorDriver):
def __init__(self, logger):
self.logger = logger
self.... | {
"repo_name": "davidvoler/ate_meteor",
"path": "launcher/api/python/notifier/drivers/redis_driver.py",
"copies": "1",
"size": "1029",
"license": "mit",
"hash": 6098932888038103000,
"line_mean": 35.75,
"line_max": 102,
"alpha_frac": 0.6783284742,
"autogenerated": false,
"ratio": 3.811111111111111,... |
__author__ = 'davidl'
import time
from redlock import RedLock
from redis import Redis
import pickle
"""
dlm = RedLock('example')
my_lock = dlm.acquire()
print ('now example is locked')
dlm.release()
print ('now example it is free')
"""
class ExecutionStatusLock(object):
def __init__(self, execution_id, process_i... | {
"repo_name": "davidvoler/ate_meteor",
"path": "launcher/api/python/locks.py",
"copies": "1",
"size": "4399",
"license": "mit",
"hash": -5002636137272893000,
"line_mean": 32.0751879699,
"line_max": 99,
"alpha_frac": 0.5855876336,
"autogenerated": false,
"ratio": 3.899822695035461,
"config_test"... |
__author__ = 'davidl'
controller_template = \
"""
(function () {
/**
* This Controllers ........
*
* using the following services
*
*/
function $ClassName$Controller($ClassName$Service) {
var self = this;
self.list = [];
self.load = function () {
va... | {
"repo_name": "davidvoler/mongodb-tornado-angular",
"path": "utils/generator/templates/controller.py",
"copies": "2",
"size": "1085",
"license": "mit",
"hash": 1096822488146406400,
"line_mean": 25.4634146341,
"line_max": 92,
"alpha_frac": 0.5142857143,
"autogenerated": false,
"ratio": 4.094339622... |
__author__ = 'davidl'
from src.base_handler import BaseHandler
from bson.json_util import dumps, loads
from bson.objectid import ObjectId
from admin.drivers.projects import ProjectsManager
from tornado.options import options
class ProjectHoursAdminHandler(BaseHandler):
"""
Project hours admin handler
"""... | {
"repo_name": "miooim/project_hours",
"path": "src/admin/ph_admin_handler.py",
"copies": "1",
"size": "1642",
"license": "mit",
"hash": -4845135100976659000,
"line_mean": 22.7971014493,
"line_max": 82,
"alpha_frac": 0.512180268,
"autogenerated": false,
"ratio": 4.4863387978142075,
"config_test"... |
__author__ = 'davidl'
from src.base_handler import BaseHandler
from bson.json_util import dumps, loads
from bson.objectid import ObjectId
from src.utils import get_logger, get_mongodb_connection, get_driver
from tornado.options import options
class LoginHandler(BaseHandler):
def initialize(self):
self.co... | {
"repo_name": "miooim/project_hours",
"path": "src/auth/login_handler.py",
"copies": "1",
"size": "2878",
"license": "mit",
"hash": 7548004615290385000,
"line_mean": 29.2947368421,
"line_max": 111,
"alpha_frac": 0.5090340514,
"autogenerated": false,
"ratio": 4.270029673590504,
"config_test": fa... |
__author__ = 'davidl'
from src.base_handler import BaseHandler
from bson.json_util import dumps, loads
from bson.objectid import ObjectId
from src.utils import get_logger
from tornado.options import options
class LoginHandler(BaseHandler):
def initialize(self):
self.logger = get_logger('auth')
def ... | {
"repo_name": "davidvoler/social-language-learning-platform",
"path": "src/home/login_handler.py",
"copies": "1",
"size": "1806",
"license": "mit",
"hash": 1374196998189038600,
"line_mean": 26.3636363636,
"line_max": 70,
"alpha_frac": 0.5071982281,
"autogenerated": false,
"ratio": 4.4702970297029... |
__author__ = 'davidl'
import os
import ldap3
from tornado.options import options
from ldap3 import Server, Connection
from utils import get_logger, get_mongodb_connection
class LdapAuth(object):
"""
Authentication with LDAP/Active Directory
"""
def __init__(self):
self.connection = get_mong... | {
"repo_name": "miooim/project_hours",
"path": "src/auth/ldap_auth.py",
"copies": "1",
"size": "2927",
"license": "mit",
"hash": -4326190120200604000,
"line_mean": 35.6,
"line_max": 113,
"alpha_frac": 0.5616672361,
"autogenerated": false,
"ratio": 4.846026490066225,
"config_test": false,
"has_... |
__author__ = 'davidl'
import pprint
from utils import get_driver
from tornado.options import options
from xmlrpc.server_process import get_xml_process
def xmlrpc_start():
server = get_xml_process()
return server.start()
def xmlrpc_stop():
server = get_xml_process()
return server.stop()
def xmlrpc... | {
"repo_name": "davidvoler/ate_meteor",
"path": "xmlrpc/utilities.py",
"copies": "1",
"size": "2144",
"license": "mit",
"hash": 1941659048136198000,
"line_mean": 22.5604395604,
"line_max": 80,
"alpha_frac": 0.625,
"autogenerated": false,
"ratio": 3.664957264957265,
"config_test": false,
"has_n... |
__author__ = 'davidl'
template = \
"""
(function () {
/**
* This Controllers ........
*
* using the following services
*
*/
function $ClassName$Controller($ClassName$Service) {
var self = this;
self.list = [];
self.load = function () {
var req = $Cl... | {
"repo_name": "davidvoler/mongodb-tornado-angular",
"path": "utils/generator/templates/service.py",
"copies": "2",
"size": "1060",
"license": "mit",
"hash": -8469060442097092000,
"line_mean": 24.8536585366,
"line_max": 92,
"alpha_frac": 0.5047169811,
"autogenerated": false,
"ratio": 4.06130268199... |
__author__ = 'David Manouchehri (david@davidmanouchehri.com)'
__license__ = 'MIT'
'''
I am using the following content as input for my experiment, if you use another you may have varying success.
SHA512 (v30.MPG) = 20b65b62cf523b15a157e563e90105e68e3f9b8df64afea5ce3323ad4b69e76bff56a738bc484ca30adee6c01cd0d5b3cbfb5243... | {
"repo_name": "Manouchehri/PingPongDetector",
"path": "main.py",
"copies": "1",
"size": "4021",
"license": "mit",
"hash": 7375586070926709000,
"line_mean": 38.0485436893,
"line_max": 147,
"alpha_frac": 0.7097736881,
"autogenerated": false,
"ratio": 2.8138558432470258,
"config_test": false,
"h... |
__author__ = 'David Moreno García'
def serialize_grades(grades):
"""
Returns an string with the representation of the grades in XML format.
:param grades: grades to serialize
:return: an string with the representation in the desired format
"""
result = '<scores>\n'
for student_id, grade ... | {
"repo_name": "davidmogar/quizzer-python",
"path": "quizzer/serializers/assessment_xml_serializer.py",
"copies": "1",
"size": "1099",
"license": "mit",
"hash": -476887358642406600,
"line_mean": 32.303030303,
"line_max": 98,
"alpha_frac": 0.6429872495,
"autogenerated": false,
"ratio": 3.7094594594... |
__author__ = 'David Moser <david.moser@bitmovin.com>'
import unittest
from bitcodin import create_job
from bitcodin import create_input
from bitcodin import create_encoding_profile
from bitcodin import delete_input
from bitcodin import delete_encoding_profile
from bitcodin import Job
from bitcodin import Input
from bi... | {
"repo_name": "bitmovin/bitcodin-python",
"path": "bitcodin/test/job/testcase_create_job_keep_aspect_ratio.py",
"copies": "1",
"size": "2538",
"license": "unlicense",
"hash": -6120671490315326000,
"line_mean": 33.2972972973,
"line_max": 100,
"alpha_frac": 0.658392435,
"autogenerated": false,
"rat... |
__author__ = 'David Moser <david.moser@bitmovin.net>'
import requests
from .exceptions import BitcodinError
from .exceptions import BitcodinInternalServerError
from .exceptions import BitcodinApiKeyNotAuthorizedError
from .exceptions import BitcodinBadRequestError
from .exceptions import BitcodinNotFoundError
class... | {
"repo_name": "bitmovin/bitcodin-python",
"path": "bitcodin/rest.py",
"copies": "1",
"size": "2617",
"license": "unlicense",
"hash": -3637697540175103500,
"line_mean": 30.1547619048,
"line_max": 106,
"alpha_frac": 0.6259075277,
"autogenerated": false,
"ratio": 4.413153456998313,
"config_test": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.