text stringlengths 0 1.05M | meta dict |
|---|---|
# $Id: Module.py,v 1.3 2017/09/06 03:03:58 tyamamot Exp $
import re, sys
from Instance import *
from Pin import *
from settings import *
class Module:
def __init__(self, line):
self.name = line.split(" ")[1]
self.module_line = line.split(" ")[1:]
self.instances = {}
... | {
"repo_name": "tyamamot5/Verilog-netlist-viewer",
"path": "Module.py",
"copies": "1",
"size": "5083",
"license": "apache-2.0",
"hash": -2977560448193724400,
"line_mean": 33.3445945946,
"line_max": 167,
"alpha_frac": 0.5551839465,
"autogenerated": false,
"ratio": 3.6940406976744184,
"config_test... |
# $Id: //modules/xmlrpclib/selftest.py#5 $
# minimal xmlrpclib selftest (2.1 and later)
import xmlrpclib, string
def roundtrip(data):
"""
Make sure the given data survives a marshal/unmarshal roundtrip
>>> roundtrip((1,))
>>> roundtrip((1L,))
>>> roundtrip(("1",))
>>> roundtrip(([], []))
... | {
"repo_name": "HuaweiSNC/OPS2",
"path": "src/python/xmlrpclib_1_0_1/selftest.py",
"copies": "1",
"size": "1643",
"license": "mit",
"hash": -3948107326539617000,
"line_mean": 31.86,
"line_max": 76,
"alpha_frac": 0.5709068777,
"autogenerated": false,
"ratio": 3.2470355731225298,
"config_test": tr... |
# $Id: //modules/xmlrpclib/selftest.py#5 $
# minimal xmlrpclib selftest (2.1 and later)
import xmlrpclib, string
def roundtrip(data):
"""
Make sure the given data survives a marshal/unmarshal roundtrip
>>> roundtrip((1,))
>>> roundtrip((1L,))
>>> roundtrip(("1",))
>>> roundtrip(([... | {
"repo_name": "Yinxiaoli/iros2015_folding",
"path": "src/folding_control/src/xmlrpclib-1.0.1/selftest.py",
"copies": "1",
"size": "1693",
"license": "mit",
"hash": -4225847033256891000,
"line_mean": 31.86,
"line_max": 76,
"alpha_frac": 0.5540460721,
"autogenerated": false,
"ratio": 3.339250493096... |
# "Copyright (c) 2000-2003 The Regents of the University of California.
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose, without fee, and without written agreement
# is hereby granted, provided that the above copyright notice, the follo... | {
"repo_name": "ekiwi/tinyos-1.x",
"path": "contrib/nestfe/python/pytos/MoteIF.py",
"copies": "2",
"size": "2230",
"license": "bsd-3-clause",
"hash": 5880945245105777000,
"line_mean": 32.2835820896,
"line_max": 77,
"alpha_frac": 0.730941704,
"autogenerated": false,
"ratio": 3.303703703703704,
"c... |
# $Id: mrt.py 29 2007-01-26 02:29:07Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Multi-threaded Routing Toolkit."""
from __future__ import absolute_import
from . import dpkt
from . import bgp
# Multi-threaded Routing Toolkit
# http://www.ietf.org/internet-drafts/draft-ietf-grow-mrt-03.txt
# MRT Types
NULL = 0
START ... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/mrt.py",
"copies": "3",
"size": "2018",
"license": "apache-2.0",
"hash": 5578432291937465000,
"line_mean": 19.8041237113,
"line_max": 64,
"alpha_frac": 0.4945490585,
"autogenerated": false,
"ratio": 2.70147255689424... |
# $Id: mrt.py 29 2007-01-26 02:29:07Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Multi-threaded Routing Toolkit."""
import dpkt
import bgp
import struct
# Multi-threaded Routing Toolkit
# http://www.ietf.org/internet-drafts/draft-ietf-grow-mrt-03.txt
# MRT Types
NULL = 0
START = 1
DIE = 2
I_AM_DEAD = 3
PEER_DOWN = 4... | {
"repo_name": "jack8daniels2/dpkt",
"path": "dpkt/mrt.py",
"copies": "1",
"size": "5037",
"license": "bsd-3-clause",
"hash": -5298554033432286000,
"line_mean": 25.3717277487,
"line_max": 86,
"alpha_frac": 0.4792535239,
"autogenerated": false,
"ratio": 2.969929245283019,
"config_test": false,
... |
# $Id: mrt.py 29 2007-01-26 02:29:07Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Multi-threaded Routing Toolkit."""
import dpkt
import bgp
# Multi-threaded Routing Toolkit
# http://www.ietf.org/internet-drafts/draft-ietf-grow-mrt-03.txt
# MRT Types
NULL = 0
START = 1
DIE = 2
I_AM_DEAD = 3
PEER_DOWN = 4
BGP = 5 # De... | {
"repo_name": "hexcap/dpkt",
"path": "dpkt/mrt.py",
"copies": "5",
"size": "1965",
"license": "bsd-3-clause",
"hash": 4662202836246866000,
"line_mean": 19.46875,
"line_max": 64,
"alpha_frac": 0.4885496183,
"autogenerated": false,
"ratio": 2.6771117166212535,
"config_test": false,
"has_no_keyw... |
# $Id: mrt.py 29 2007-01-26 02:29:07Z jon.oberheide $
"""Multi-threaded Routing Toolkit."""
import dpkt
import bgp
# Multi-threaded Routing Toolkit
# http://www.ietf.org/internet-drafts/draft-ietf-grow-mrt-03.txt
# MRT Types
NULL = 0
START = 1
DIE = 2
I_AM_DEAD = 3
PEER_DOWN = 4
BGP = 5 # Deprecated by BG... | {
"repo_name": "ashrith/dpkt",
"path": "dpkt/mrt.py",
"copies": "15",
"size": "1986",
"license": "bsd-3-clause",
"hash": -6928588478149755000,
"line_mean": 20.5869565217,
"line_max": 64,
"alpha_frac": 0.4783484391,
"autogenerated": false,
"ratio": 2.565891472868217,
"config_test": false,
"has_... |
# $Id: MurckoScaffold.py 3672 2010-06-14 17:10:00Z landrgr1 $
#
# Created by Peter Gedeck, September 2008
#
"""
Generation of Murcko scaffolds from a molecule
"""
from rdkit import Chem
from rdkit.Chem import AllChem
murckoTransforms = [AllChem.ReactionFromSmarts('[*:1]-[!#1;D1]>>[*:1][H]'),
All... | {
"repo_name": "jandom/rdkit",
"path": "rdkit/Chem/Scaffolds/MurckoScaffold.py",
"copies": "1",
"size": "4215",
"license": "bsd-3-clause",
"hash": -7029800277970723000,
"line_mean": 29.7664233577,
"line_max": 91,
"alpha_frac": 0.6730723606,
"autogenerated": false,
"ratio": 2.5607533414337786,
"c... |
# @(#) $Id: NameTree.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $
__revision__ = "$Id: NameTree.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $"
'''
TODO:
- missing lots of inline doc here
- ???
'''
from Acspy.Util.ACSCorba import nameService
from Acspy.Util import NodeList
import CosNaming
import stri... | {
"repo_name": "csrg-utfsm/acscb",
"path": "LGPL/CommonSoftware/acspycommon/src/Acspy/Util/NameTree.py",
"copies": "3",
"size": "6447",
"license": "mit",
"hash": -4831142977122012000,
"line_mean": 22.4436363636,
"line_max": 80,
"alpha_frac": 0.5712734605,
"autogenerated": false,
"ratio": 3.2511346... |
"""
Textbox subclass for easier text manipulation, this module defines
the following class:
- `Command`: `Textbox` subclass. Improved word traversal.
How To Use This Module
======================
(See the individual classes, methods, and attributes for details.)
1. Import it: ``>>> import command_``.
2. Initializ... | {
"repo_name": "shearch/shearch",
"path": "src/command_.py",
"copies": "1",
"size": "19453",
"license": "bsd-3-clause",
"hash": -8296280585950252000,
"line_mean": 32.7140381282,
"line_max": 108,
"alpha_frac": 0.5147792114,
"autogenerated": false,
"ratio": 3.9522551808208046,
"config_test": false... |
# $Id: netbios.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Network Basic Input/Output System."""
from __future__ import absolute_import
import struct
from . import dpkt
from . import dns
def encode_name(name):
"""Return the NetBIOS first-level encoded name."""
l = []
for c in struct.... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/netbios.py",
"copies": "3",
"size": "5106",
"license": "apache-2.0",
"hash": 8902814193257640000,
"line_mean": 29.2130177515,
"line_max": 89,
"alpha_frac": 0.5305522914,
"autogenerated": false,
"ratio": 3.0574850299... |
# $Id: netbios.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Network Basic Input/Output System."""
import struct
import dpkt
import dns
def encode_name(name):
"""Return the NetBIOS first-level encoded name."""
l = []
for c in struct.pack('16s', name):
c = ord(c)
l.append... | {
"repo_name": "bpanneton/dpkt",
"path": "dpkt/netbios.py",
"copies": "6",
"size": "5010",
"license": "bsd-3-clause",
"hash": 928337984464081800,
"line_mean": 29.1807228916,
"line_max": 89,
"alpha_frac": 0.526746507,
"autogenerated": false,
"ratio": 3.0474452554744524,
"config_test": false,
"h... |
# $Id: netbios.py 23 2006-11-08 15:45:33Z dugsong $
"""Network Basic Input/Output System."""
import struct
import dpkt, dns
def encode_name(name):
"""Return the NetBIOS first-level encoded name."""
l = []
for c in struct.pack('16s', name):
c = ord(c)
l.append(chr((c >> 4) + 0x41))
... | {
"repo_name": "guke001/QMarkdowner",
"path": "dpkt/netbios.py",
"copies": "15",
"size": "5008",
"license": "mit",
"hash": -3659465484502234000,
"line_mean": 31.5194805195,
"line_max": 87,
"alpha_frac": 0.5237619808,
"autogenerated": false,
"ratio": 2.949352179034158,
"config_test": false,
"ha... |
# $Id: NetUtils.py 1047 2009-01-15 14:48:58Z graham $
#
# Network utilities
#
import logging
from string import split
from Functions import all, formatIntList, formatInt
def ipAdrStrToInt( adrStr ):
"""
Convert a dotted ip address to 32 bit integer.
"""
adrParts = split( adrStr, ".", 3 )
return... | {
"repo_name": "bhavanaananda/DataStage",
"path": "src/AdminUIHandler/MiscLib/NetUtils.py",
"copies": "8",
"size": "6193",
"license": "mit",
"hash": -379277511526986400,
"line_mean": 30.5969387755,
"line_max": 108,
"alpha_frac": 0.6106894881,
"autogenerated": false,
"ratio": 3.2560462670872767,
... |
""" Create a new domain key file which is composed of the following:
- A random 50 character cookie
- A public key
- The corresponding private key
"""
import os
import sys
import peloton
from peloton.utils.crypto import makeCookie
from peloton.utils.crypto import newKey
from peloton.utils.crypto import makeKeyAn... | {
"repo_name": "aquamatt/Peloton",
"path": "src/tools/newkey.py",
"copies": "1",
"size": "1906",
"license": "bsd-3-clause",
"hash": 7995949379822885000,
"line_mean": 33.0535714286,
"line_max": 121,
"alpha_frac": 0.6259181532,
"autogenerated": false,
"ratio": 4.012631578947368,
"config_test": fal... |
# $Id:#
import FWCore.ParameterSet.Config as cms
process = cms.Process('FILLER')
# import of standard configurations
process.load('Configuration/StandardSequences/Services_cff')
process.load('FWCore/MessageService/MessageLogger_cfi')
process.load('Configuration/StandardSequences/GeometryIdeal_cff')
process.load('Con... | {
"repo_name": "cpausmit/Kraken",
"path": "filefi/014/startup.py",
"copies": "1",
"size": "1811",
"license": "mit",
"hash": 3497872704986014700,
"line_mean": 35.9591836735,
"line_max": 162,
"alpha_frac": 0.7835450028,
"autogenerated": false,
"ratio": 2.9884488448844886,
"config_test": true,
"h... |
# @(#) $Id: NodeList.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $
__revision__ = "$Id: NodeList.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $"
'''
TODO:
- most inline doc is missing
'''
#
# NamingContext utility
#
import CosNaming
class nodeList(object):
def __init__ (self, context): # pragma: NO COVER
(... | {
"repo_name": "csrg-utfsm/acscb",
"path": "LGPL/CommonSoftware/acspycommon/src/Acspy/Util/NodeList.py",
"copies": "3",
"size": "1547",
"license": "mit",
"hash": 347175752832672640,
"line_mean": 28.75,
"line_max": 78,
"alpha_frac": 0.5778926955,
"autogenerated": false,
"ratio": 3.2028985507246377,... |
"""
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": "PatrickKennedy/Sybil",
"path": "docutils/nodes.py",
"copies": "2",
"size": "60239",
"license": "bsd-2-clause",
"hash": 7451813651599731000,
"line_mean": 32.4289678135,
"line_max": 79,
"alpha_frac": 0.5927721244,
"autogenerated": false,
"ratio": 4.241884374339835,
"config_test": 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 el... | {
"repo_name": "rimbalinux/LMD3",
"path": "docutils/nodes.py",
"copies": "2",
"size": "66826",
"license": "bsd-3-clause",
"hash": 8759068132292633000,
"line_mean": 32.7695109261,
"line_max": 79,
"alpha_frac": 0.5738335378,
"autogenerated": false,
"ratio": 4.2713966123362095,
"config_test": false... |
"""
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": "clumsy/intellij-community",
"path": "python/helpers/py2only/docutils/nodes.py",
"copies": "5",
"size": "64847",
"license": "apache-2.0",
"hash": 515670505707655000,
"line_mean": 32.7744791667,
"line_max": 79,
"alpha_frac": 0.5914845714,
"autogenerated": false,
"ratio": 4.1907069923... |
"""
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": "ajaxsys/dict-admin",
"path": "docutils/nodes.py",
"copies": "2",
"size": "66890",
"license": "bsd-3-clause",
"hash": 1256835174158147800,
"line_mean": 32.7847113885,
"line_max": 79,
"alpha_frac": 0.5747645388,
"autogenerated": false,
"ratio": 4.271664857270579,
"config_test": fal... |
"""
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": "ddd332/presto",
"path": "presto-docs/target/sphinx/docutils/nodes.py",
"copies": "4",
"size": "65462",
"license": "apache-2.0",
"hash": 4041163557065037000,
"line_mean": 32.847983454,
"line_max": 79,
"alpha_frac": 0.5916103999,
"autogenerated": false,
"ratio": 4.201668806161746,
... |
# $Id: ntp.py 382 2006-07-31 04:07:52Z jonojono $
"""Network Time Protocol."""
import time
import dpkt
# NTP v4
# Leap Indicator (LI) Codes
NO_WARNING = 0
LAST_MINUTE_61_SECONDS = 1
LAST_MINUTE_59_SECONDS = 2
ALARM_CONDITION = 3
# Mode Codes
RESERVED = 0
SYMMETRIC_ACTIVE = 1
SYMMETRIC_PASSIVE = 2
CLIENT = 3
S... | {
"repo_name": "MercenaryLogic/StompingGround",
"path": "stompingground/dpkt/ntp.py",
"copies": "1",
"size": "2307",
"license": "mit",
"hash": 64271993063687180,
"line_mean": 26.4642857143,
"line_max": 206,
"alpha_frac": 0.5253576073,
"autogenerated": false,
"ratio": 2.639588100686499,
"config_t... |
# $Id: ntp.py 48 2008-05-27 17:31:15Z yardley $
"""Network Time Protocol."""
import dpkt
# NTP v4
# Leap Indicator (LI) Codes
NO_WARNING = 0
LAST_MINUTE_61_SECONDS = 1
LAST_MINUTE_59_SECONDS = 2
ALARM_CONDITION = 3
# Mode Codes
RESERVED = 0
SYMMETRIC_ACTIVE = 1
SYMMETRIC_PASSIVE = 2
CLIENT = 3
SERVER = 4
BR... | {
"repo_name": "ashrith/dpkt",
"path": "dpkt/ntp.py",
"copies": "15",
"size": "2293",
"license": "bsd-3-clause",
"hash": -5913369074134112000,
"line_mean": 26.6265060241,
"line_max": 206,
"alpha_frac": 0.5233318796,
"autogenerated": false,
"ratio": 2.6386651323360186,
"config_test": true,
"has... |
#$Id: NTSerializer.py,v 1.6 2003/10/29 15:25:24 kendall Exp $
from rdflib.syntax.serializers import Serializer
class NTSerializer(Serializer):
def __init__(self, store):
"""
I serialize RDF graphs in NTriples format.
"""
super(NTSerializer, self).__init__(store)
def serialize... | {
"repo_name": "alcides/rdflib",
"path": "rdflib/syntax/serializers/NTSerializer.py",
"copies": "1",
"size": "1480",
"license": "bsd-3-clause",
"hash": 2601552337186026500,
"line_mean": 35.0975609756,
"line_max": 143,
"alpha_frac": 0.6135135135,
"autogenerated": false,
"ratio": 3.7373737373737375,... |
# $Id: numfmt.py,v 1.4 2013/10/21 06:59:21 olpa Exp $
import re
re_maybe_numfmt = re.compile('[0#.,]*[0#][0#.,]*')
def extract_number_format(s_fmt):
# If don't know what does the format "Standard/GENERAL" mean.
# As far as I understand, the presentation can differ depending
# on the locale and user settings. Her... | {
"repo_name": "youlanhai/ExcelToCode",
"path": "xl2code/numfmt.py",
"copies": "1",
"size": "3005",
"license": "mit",
"hash": 6504459173429956000,
"line_mean": 30.3020833333,
"line_max": 83,
"alpha_frac": 0.5550748752,
"autogenerated": false,
"ratio": 2.946078431372549,
"config_test": false,
"... |
"""
This file has common functions for interacting with Splunk
for use in the Octopus TA integrations.
"""
import ConfigParser
import os, logging, sys, time
import splunk.bundle as sb
import splunk.Intersplunk as isp
from splunk.clilib import cli_common as cli
import splunk
def setup_logging():
"""
Setup loggin... | {
"repo_name": "cmeerbeek/splunk-addon-octopus-deploy",
"path": "TA-OctopusNT-Fwd/bin/octopus_common.py",
"copies": "2",
"size": "3107",
"license": "mit",
"hash": -7830624025907502000,
"line_mean": 34.3181818182,
"line_max": 131,
"alpha_frac": 0.7019633087,
"autogenerated": false,
"ratio": 3.09770... |
import splunk.admin as admin
import splunk.entity as en
# import your required python modules
'''
Copyright (C) 2005 - 2010 Splunk Inc. All Rights Reserved.
Description: This skeleton python script handles the parameters in the configuration page.
handleList method: lists configurable parameters in the config... | {
"repo_name": "cmeerbeek/splunk-addon-octopus-deploy",
"path": "TA-OctopusNIX-Fwd/bin/octopus_conf_handler.py",
"copies": "2",
"size": "2769",
"license": "mit",
"hash": -1487339614324145400,
"line_mean": 31.2093023256,
"line_max": 91,
"alpha_frac": 0.6504153124,
"autogenerated": false,
"ratio": 3... |
"""$Id: opml.py 699 2006-09-25 02:01:18Z rubys $"""
__author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>"
__version__ = "$Revision: 699 $"
__date__ = "$Date: 2006-09-25 02:01:18 +0000 (Mon, 25 Sep 2006) $"
__copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim"
from bas... | {
"repo_name": "waltharius/NewsBlur",
"path": "vendor/feedvalidator/opml.py",
"copies": "16",
"size": "6331",
"license": "mit",
"hash": 9109807740678620000,
"line_mean": 31.3010204082,
"line_max": 127,
"alpha_frac": 0.6422366135,
"autogenerated": false,
"ratio": 3.4019344438473937,
"config_test"... |
# $Id: PARHelpers.py 344 2012-12-13 13:10:53Z krasznaa $
##########################################################################
# Project: SFrame - ROOT-based analysis framework for ATLAS #
# #
# author Stefan Ask <Stefan.Ask@... | {
"repo_name": "jpavel/cms-ucl-tau",
"path": "SFrame/python/PARHelpers.py",
"copies": "1",
"size": "11519",
"license": "mit",
"hash": 2455119844852149000,
"line_mean": 33.3850746269,
"line_max": 146,
"alpha_frac": 0.5945828631,
"autogenerated": false,
"ratio": 3.520476772616137,
"config_test": t... |
# $Id: parseInput.py,v 1.2 2005/07/19 17:47:46 phoebusc Exp $
## Parses input file of OscopeMsgs
# Supports:
# 1) Default TinyOS packets of OscopeMsgs
# (with 10 samples or even 11 samples per packet)
# 2) Telos packets of OscopeMsgs
# 3) GGB dumped output
# See PIRDataFormat.txt for details on these data formats
#
... | {
"repo_name": "fresskarma/tinyos-1.x",
"path": "contrib/nestfe/nesc/apps/TestPIRDetectNoReg/parseInput.py",
"copies": "2",
"size": "4249",
"license": "bsd-3-clause",
"hash": -4905242507078528000,
"line_mean": 38.3425925926,
"line_max": 94,
"alpha_frac": 0.549305719,
"autogenerated": false,
"ratio... |
"""
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": "PatrickKennedy/Sybil",
"path": "docutils/transforms/parts.py",
"copies": "2",
"size": "6145",
"license": "bsd-2-clause",
"hash": 3142189523887116300,
"line_mean": 36.4695121951,
"line_max": 78,
"alpha_frac": 0.6087876322,
"autogenerated": false,
"ratio": 4.273296244784423,
"confi... |
"""
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": "spreeker/democracygame",
"path": "external_apps/docutils-snapshot/docutils/parsers/rst/directives/parts.py",
"copies": "10",
"size": "4052",
"license": "bsd-3-clause",
"hash": -7043641712419857000,
"line_mean": 31.9430894309,
"line_max": 77,
"alpha_frac": 0.6073543929,
"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.
... | {
"repo_name": "rimbalinux/MSISDNArea",
"path": "docutils/parsers/rst/directives/parts.py",
"copies": "2",
"size": "4175",
"license": "bsd-3-clause",
"hash": 2135020183837352700,
"line_mean": 31.9430894309,
"line_max": 77,
"alpha_frac": 0.5894610778,
"autogenerated": false,
"ratio": 4.326424870466... |
"""
Transforms related to document parts.
"""
__docformat__ = 'reStructuredText'
import sys
from docutils import nodes
from docutils.transforms import Transform
class SectNum(Transform):
"""
Automatically assigns numbers to the titles of document sections.
It is possible to limit the maximum section... | {
"repo_name": "MER-GROUP/intellij-community",
"path": "python/helpers/py2only/docutils/transforms/parts.py",
"copies": "5",
"size": "6947",
"license": "apache-2.0",
"hash": 973878429905803000,
"line_mean": 37.8100558659,
"line_max": 78,
"alpha_frac": 0.6090398733,
"autogenerated": false,
"ratio":... |
"""
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... | {
"repo_name": "rimbalinux/MSISDNArea",
"path": "docutils/transforms/parts.py",
"copies": "2",
"size": "7160",
"license": "bsd-3-clause",
"hash": 3900566636396623400,
"line_mean": 37.7777777778,
"line_max": 78,
"alpha_frac": 0.5946927374,
"autogenerated": false,
"ratio": 4.389944819129369,
"conf... |
"""
Directives for document parts.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, languages
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
from docutils.transforms import parts
class Contents(Directive):
"""
Table of contents.
The table of c... | {
"repo_name": "MichaelNedzelsky/intellij-community",
"path": "python/helpers/py2only/docutils/parsers/rst/directives/parts.py",
"copies": "5",
"size": "4241",
"license": "apache-2.0",
"hash": -6302639254382275000,
"line_mean": 32.3937007874,
"line_max": 77,
"alpha_frac": 0.6078755011,
"autogenerate... |
"""
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": "holmes/intellij-community",
"path": "python/helpers/docutils/parsers/rst/directives/parts.py",
"copies": "41",
"size": "4241",
"license": "apache-2.0",
"hash": 5813985434273503000,
"line_mean": 32.3937007874,
"line_max": 77,
"alpha_frac": 0.6078755011,
"autogenerated": false,
"rati... |
"""
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.
... | {
"repo_name": "cuongthai/cuongthai-s-blog",
"path": "docutils/parsers/rst/directives/parts.py",
"copies": "2",
"size": "4402",
"license": "bsd-3-clause",
"hash": -3910978530612231000,
"line_mean": 32.6614173228,
"line_max": 77,
"alpha_frac": 0.5851885507,
"autogenerated": false,
"ratio": 4.328416... |
"""
Directives for document parts.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, languages
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
from docutils.transforms import parts
class Contents(Directive):
"""
Table of contents.
The table of c... | {
"repo_name": "JetBrains/intellij-community",
"path": "python/helpers/py3only/docutils/parsers/rst/directives/parts.py",
"copies": "44",
"size": "4251",
"license": "apache-2.0",
"hash": 7492878561025526000,
"line_mean": 32.7380952381,
"line_max": 77,
"alpha_frac": 0.6033874382,
"autogenerated": fal... |
"""
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": "sabi0/intellij-community",
"path": "python/helpers/py2only/docutils/parsers/rst/directives/parts.py",
"copies": "136",
"size": "4251",
"license": "apache-2.0",
"hash": -1130091255926002700,
"line_mean": 32.7380952381,
"line_max": 77,
"alpha_frac": 0.6033874382,
"autogenerated": false... |
from twisted.internet import reactor
from twisted.spread import pb
from twisted.internet.error import CannotListenError
from peloton.adapters import AbstractPelotonAdapter
from peloton.coreio import PelotonRequestInterface
from peloton.coreio import PelotonInternodeInterface
from peloton.events import RemoteEventHandl... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/adapters/pb.py",
"copies": "1",
"size": "10468",
"license": "bsd-3-clause",
"hash": 3356340066919036000,
"line_mean": 41.0441767068,
"line_max": 102,
"alpha_frac": 0.6479747803,
"autogenerated": false,
"ratio": 4.318481848184819,
"config_te... |
# $Id: pcap.py 371 2006-06-06 12:18:12Z dugsong $
"""Libpcap file format."""
import sys, time
import dpkt
TCPDUMP_MAGIC = 0xa1b2c3d4L
PMUDPCT_MAGIC = 0xd4c3b2a1L
PCAP_VERSION_MAJOR = 2
PCAP_VERSION_MINOR = 4
DLT_NULL = 0
DLT_EN10MB = 1
DLT_EN3MB = 2
DLT_AX25 = 3
DLT_PRONET = 4
DLT_CHAOS = 5... | {
"repo_name": "MercenaryLogic/StompingGround",
"path": "stompingground/dpkt/pcap.py",
"copies": "1",
"size": "3665",
"license": "mit",
"hash": -6848304551501262000,
"line_mean": 25.3669064748,
"line_max": 75,
"alpha_frac": 0.5129604366,
"autogenerated": false,
"ratio": 2.9556451612903225,
"conf... |
'''
Created on 20. okt. 2009
@author: levin
'''
from math import *
import SEMBA as S
#Create empty dictionaries to load emission data in
Vehicle_Types = {}
def create_vehicle_list():
for k,v in S.H_PC.items():
k=0
Vehicle_Types[v[0]]= v[2] +" "+ v[3]+" "+v[4]
def CreatePC():
S.load_PC()
S.load_P... | {
"repo_name": "tomasle/semba",
"path": "SEMBA/PC.py",
"copies": "1",
"size": "6038",
"license": "bsd-2-clause",
"hash": 1820447009696073500,
"line_mean": 25.252173913,
"line_max": 76,
"alpha_frac": 0.6015236833,
"autogenerated": false,
"ratio": 3.1349948078920042,
"config_test": false,
"has_n... |
"""
Python Enhancement Proposal (PEP) Reader.
"""
__docformat__ = 'reStructuredText'
from docutils.parsers import rst
from docutils.readers import standalone
from docutils.transforms import peps, frontmatter
class Reader(standalone.Reader):
supported = ('pep',)
"""Contexts this reader supports."""
se... | {
"repo_name": "MichaelNedzelsky/intellij-community",
"path": "python/helpers/py2only/docutils/readers/pep.py",
"copies": "5",
"size": "1535",
"license": "apache-2.0",
"hash": 1071093278285077100,
"line_mean": 31.6595744681,
"line_max": 75,
"alpha_frac": 0.674267101,
"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',)
"""Contexts this reader s... | {
"repo_name": "Distrotech/intellij-community",
"path": "python/helpers/docutils/readers/pep.py",
"copies": "61",
"size": "1554",
"license": "apache-2.0",
"hash": -5672985877778856000,
"line_mean": 31.375,
"line_max": 75,
"alpha_frac": 0.675032175,
"autogenerated": false,
"ratio": 3.90452261306532... |
"""
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": "rimbalinux/MSISDNArea",
"path": "docutils/readers/pep.py",
"copies": "2",
"size": "1602",
"license": "bsd-3-clause",
"hash": 4833572402919962000,
"line_mean": 31.375,
"line_max": 75,
"alpha_frac": 0.6548064919,
"autogenerated": false,
"ratio": 3.9653465346534653,
"config_test": f... |
"""
Python Enhancement Proposal (PEP) Reader.
"""
__docformat__ = 'reStructuredText'
from docutils.parsers import rst
from docutils.readers import standalone
from docutils.transforms import peps, frontmatter
class Reader(standalone.Reader):
supported = ('pep',)
"""Contexts this reader supports."""
se... | {
"repo_name": "GunoH/intellij-community",
"path": "python/helpers/py3only/docutils/readers/pep.py",
"copies": "44",
"size": "1536",
"license": "apache-2.0",
"hash": -6169440003144018000,
"line_mean": 31.6808510638,
"line_max": 75,
"alpha_frac": 0.6744791667,
"autogenerated": false,
"ratio": 3.908... |
"""
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 os
import re
import ... | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "python/helpers/py2only/docutils/transforms/peps.py",
"copies": "5",
"size": "10957",
"license": "apache-2.0",
"hash": -699088058678748200,
"line_mean": 35.0427631579,
"line_max": 79,
"alpha_frac": 0.5321712147,
"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
imp... | {
"repo_name": "rimbalinux/LMD3",
"path": "docutils/transforms/peps.py",
"copies": "2",
"size": "11305",
"license": "bsd-3-clause",
"hash": -8322641547668679000,
"line_mean": 35.1875,
"line_max": 79,
"alpha_frac": 0.5192392747,
"autogenerated": false,
"ratio": 4.336401994629843,
"config_test": f... |
"""
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 os
import re
import ... | {
"repo_name": "apixandru/intellij-community",
"path": "python/helpers/py3only/docutils/transforms/peps.py",
"copies": "44",
"size": "11021",
"license": "apache-2.0",
"hash": -7752096150628550000,
"line_mean": 35.1344262295,
"line_max": 79,
"alpha_frac": 0.5307140913,
"autogenerated": false,
"rati... |
"""
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": "cuongthai/cuongthai-s-blog",
"path": "docutils/transforms/peps.py",
"copies": "2",
"size": "11370",
"license": "bsd-3-clause",
"hash": -4548867373509582300,
"line_mean": 35.2786885246,
"line_max": 79,
"alpha_frac": 0.5178540018,
"autogenerated": false,
"ratio": 4.349655700076511,
... |
"""
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": "achang97/YouTunes",
"path": "lib/python2.7/site-packages/docutils/transforms/peps.py",
"copies": "10",
"size": "11056",
"license": "mit",
"hash": 602424495491174800,
"line_mean": 35.2491803279,
"line_max": 79,
"alpha_frac": 0.5320188133,
"autogenerated": false,
"ratio": 4.263787119... |
# $Id: pim.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Protocol Independent Multicast."""
from __future__ import absolute_import
from . import dpkt
from .decorators import deprecated
class PIM(dpkt.Packet):
"""Protocol Independent Multicast.
TODO: Longer class information....
Attrib... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/pim.py",
"copies": "3",
"size": "1240",
"license": "bsd-3-clause",
"hash": -3314260106456645600,
"line_mean": 21.5454545455,
"line_max": 72,
"alpha_frac": 0.5508064516,
"autogenerated": false,
"ratio": 2.857142857142857,
"config_test": false,
"has_no_... |
# $Id: pim.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Protocol Independent Multicast."""
import dpkt
from decorators import deprecated
class PIM(dpkt.Packet):
__hdr__ = (
('_v_type', 'B', 0x20),
('rsvd', 'B', 0),
('sum', 'H', 0)
)
@property
def v(self):
... | {
"repo_name": "hexcap/dpkt",
"path": "dpkt/pim.py",
"copies": "6",
"size": "1185",
"license": "bsd-3-clause",
"hash": 3446851758194239500,
"line_mean": 22.7,
"line_max": 63,
"alpha_frac": 0.4886075949,
"autogenerated": false,
"ratio": 3.3380281690140845,
"config_test": false,
"has_no_keywords... |
# $Id: Pin.py,v 1.1 2017/08/27 00:40:41 tyamamot Exp $
from Module import *
# Extpin is the special call only for inputs and outputs of class Pin
#class Extpin:
# def get_name(self):
# return ""
class Pin:
def __init__(self, name, module, inout):
self.name = name
self.module = module... | {
"repo_name": "tyamamot5/Verilog-netlist-viewer",
"path": "Pin.py",
"copies": "1",
"size": "1702",
"license": "apache-2.0",
"hash": -7073108229787554000,
"line_mean": 22.9718309859,
"line_max": 69,
"alpha_frac": 0.5787309048,
"autogenerated": false,
"ratio": 3.5311203319502074,
"config_test": f... |
# $Id: pppoe.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""PPP-over-Ethernet."""
from __future__ import absolute_import
import struct
import codecs
from . import dpkt
from . import ppp
from .decorators import deprecated
# RFC 2516 codes
PPPoE_PADI = 0x09
PPPoE_PADO = 0x07
PPPoE_PADR = 0x19
PPPoE_PA... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/pppoe.py",
"copies": "3",
"size": "4030",
"license": "bsd-3-clause",
"hash": 6135819986621833000,
"line_mean": 24.5063291139,
"line_max": 96,
"alpha_frac": 0.5816377171,
"autogenerated": false,
"ratio": 2.9181752353367125,
"config_test": true,
"has_no... |
# $Id: pppoe.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""PPP-over-Ethernet."""
import dpkt
import ppp
from decorators import deprecated
# RFC 2516 codes
PPPoE_PADI = 0x09
PPPoE_PADO = 0x07
PPPoE_PADR = 0x19
PPPoE_PADS = 0x65
PPPoE_PADT = 0xA7
PPPoE_SESSION = 0x00
class PPPoE(dpkt.Packet):
__... | {
"repo_name": "yangbh/dpkt",
"path": "dpkt/pppoe.py",
"copies": "6",
"size": "1440",
"license": "bsd-3-clause",
"hash": 7336883327411163000,
"line_mean": 21.1538461538,
"line_max": 57,
"alpha_frac": 0.5020833333,
"autogenerated": false,
"ratio": 3.044397463002114,
"config_test": false,
"has_n... |
# $Id: ppp.py 65 2010-03-26 02:53:51Z dugsong $
# -*- coding: utf-8 -*-
"""Point-to-Point Protocol."""
import struct
import dpkt
# XXX - finish later
# http://www.iana.org/assignments/ppp-numbers
PPP_IP = 0x21 # Internet Protocol
PPP_IP6 = 0x57 # Internet Protocol v6
# Protocol field compression
PFC_BIT = 0x01
... | {
"repo_name": "hexcap/dpkt",
"path": "dpkt/ppp.py",
"copies": "6",
"size": "1621",
"license": "bsd-3-clause",
"hash": 2090922085786027500,
"line_mean": 23.5606060606,
"line_max": 74,
"alpha_frac": 0.5305367057,
"autogenerated": false,
"ratio": 3.288032454361055,
"config_test": false,
"has_no_... |
# $Id: ppp.py 65 2010-03-26 02:53:51Z dugsong $
"""Point-to-Point Protocol."""
import struct
import dpkt
# XXX - finish later
# http://www.iana.org/assignments/ppp-numbers
PPP_IP = 0x21 # Internet Protocol
PPP_IP6 = 0x57 # Internet Protocol v6
# Protocol field compression
PFC_BIT = 0x01
class PPP(dpkt.Packet):
... | {
"repo_name": "wofanli/trex-core",
"path": "scripts/external_libs/dpkt-1.8.6/dpkt/ppp.py",
"copies": "15",
"size": "1604",
"license": "apache-2.0",
"hash": 1289118461443130400,
"line_mean": 24.4603174603,
"line_max": 74,
"alpha_frac": 0.5274314214,
"autogenerated": false,
"ratio": 3.2208835341365... |
"""
Every PSC and service has a profile used either declare the capabilities,
requirements and restrictions of a component. Classes here deal with comparing
profiles so as to simplify finding a match between, for example, services
and PSCs.
"""
import re
from fnmatch import fnmatchcase
import os
from types import Strin... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/profile.py",
"copies": "1",
"size": "7424",
"license": "bsd-3-clause",
"hash": -2195595440006133800,
"line_mean": 37.2731958763,
"line_max": 82,
"alpha_frac": 0.6295797414,
"autogenerated": false,
"ratio": 4.382526564344746,
"config_test": ... |
"""A self-filling widget for progress states."""
from BaseWidget import BaseWidget
from Constants import *
import base
class ProgressBar (BaseWidget):
"""ProgressBar () -> ProgressBar
A widget class, which can display a progress state.
The Progressbar widget is a graphical state indicator, which can
... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/ProgressBar.py",
"copies": "1",
"size": "8098",
"license": "bsd-2-clause",
"hash": 7451137792997620000,
"line_mean": 35.6425339367,
"line_max": 78,
"alpha_frac": 0.6254630773,
"autogenerated": false,
"ratio": 4.408274360370169,
"config_te... |
""" Platform dependent implementations of some processes. For now,
makeDaemon."""
import os
def POSIX_makeDaemon():
""" Detach from the console, redirect stdin/out/err to/from
/dev/null."""
# File mode creation mask of the daemon.
UMASK = 0
# Default maximum for the number of available file descriptor... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/psc_platform.py",
"copies": "1",
"size": "1970",
"license": "bsd-3-clause",
"hash": -4631176222497227000,
"line_mean": 31.2950819672,
"line_max": 101,
"alpha_frac": 0.6096446701,
"autogenerated": false,
"ratio": 3.5368043087971275,
"config_... |
from twisted.spread import pb
from twisted.internet import reactor
from twisted.internet.error import ConnectionRefusedError
from twisted.internet.error import ConnectionDone
from twisted.internet.defer import Deferred
from peloton.exceptions import PelotonConnectionError
from peloton.exceptions import PelotonError
fr... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/pscproxies.py",
"copies": "1",
"size": "10097",
"license": "bsd-3-clause",
"hash": -5892515390481571000,
"line_mean": 39.0714285714,
"line_max": 101,
"alpha_frac": 0.6135485788,
"autogenerated": false,
"ratio": 4.174038859032658,
"config_te... |
""" PSC: Peloton Service Controller
The service controller is the primary unit in the Peloton mesh.
PSC units link together to form a mesh; each PSC manages a number
of services.
How those services are managed is dependent on the controller; some
may be developed to work in different ways. The default behaviour
for... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/psc.py",
"copies": "1",
"size": "6998",
"license": "bsd-3-clause",
"hash": 8918095472367793000,
"line_mean": 34.8871794872,
"line_max": 129,
"alpha_frac": 0.6284652758,
"autogenerated": false,
"ratio": 4.349285270354257,
"config_test": true... |
""" Core code for Peloton TAP utilities (event viewers). This same
code can be hooked into GUIs or console tools via handler hooks. """
from twisted.internet import reactor
from twisted.spread import pb
from peloton.utils.config import PelotonSettings
class EventHandler(pb.Referenceable):
def __init__(self, callb... | {
"repo_name": "aquamatt/Peloton",
"path": "src/tools/ptap/tapcore.py",
"copies": "1",
"size": "5294",
"license": "bsd-3-clause",
"hash": 974978182210717300,
"line_mean": 34.0662251656,
"line_max": 76,
"alpha_frac": 0.6195693238,
"autogenerated": false,
"ratio": 4.307567127746135,
"config_test":... |
""" This plugin module is ONLY for testing and first-stop
try-before-you-buy. As an MQ provider it does little to ensure
stability, capacity, persistence... in fact it does almost nothing x
that AMQP does, it is simply a call-alike module that allows shallow
testing.
"""
from peloton.plugins import PelotonPlugin
fro... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/plugins/pseudomq.py",
"copies": "1",
"size": "13652",
"license": "bsd-3-clause",
"hash": 8456619988366326000,
"line_mean": 37.4591549296,
"line_max": 92,
"alpha_frac": 0.5987401113,
"autogenerated": false,
"ratio": 4.332592827673754,
"confi... |
""" The PWP (Peloton Worker Process) is spawned by the PSC to
run a service worker.
Originaly workers were spawned by forking but this has a couple of
disadvantages:
- It's not compatible with non-POSIX systems, notably a certain
well known platform.
- The forking seemed to leave the worker processes i... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/pwp.py",
"copies": "1",
"size": "1074",
"license": "bsd-3-clause",
"hash": 5126764069858576000,
"line_mean": 28.027027027,
"line_max": 68,
"alpha_frac": 0.6918063315,
"autogenerated": false,
"ratio": 3.487012987012987,
"config_test": false,... |
"""$Id: pydbbdb.py,v 1.45 2008/05/31 11:49:01 rockyb Exp $
Routines here have to do with the subclassing of bdb. Defines Python
debugger Basic Debugger (Bdb) class. This file could/should probably
get merged into bdb.py
"""
import bdb, inspect, linecache, time, types
from repr import Repr
from fns import *
## from co... | {
"repo_name": "carlgao/lenga",
"path": "images/lenny64-peon/usr/share/python-support/pydb/pydb/pydbbdb.py",
"copies": "1",
"size": "17883",
"license": "mit",
"hash": 2853046352200622000,
"line_mean": 37.7917570499,
"line_max": 79,
"alpha_frac": 0.5442599116,
"autogenerated": false,
"ratio": 4.172... |
"""
Additional support for Pygments formatter.
"""
import pygments
import pygments.formatter
class OdtPygmentsFormatter(pygments.formatter.Formatter):
def __init__(self, rststyle_function, escape_function):
pygments.formatter.Formatter.__init__(self)
self.rststyle_function = rststyle_function... | {
"repo_name": "gauribhoite/personfinder",
"path": "env/site-packages/docutils/writers/odf_odt/pygmentsformatter.py",
"copies": "244",
"size": "4671",
"license": "apache-2.0",
"hash": -6294248373775035000,
"line_mean": 41.8532110092,
"line_max": 79,
"alpha_frac": 0.5099550417,
"autogenerated": false... |
"""
Additional support for Pygments formatter.
"""
import pygments
import pygments.formatter
class OdtPygmentsFormatter(pygments.formatter.Formatter):
def __init__(self, rststyle_function, escape_function):
pygments.formatter.Formatter.__init__(self)
self.rststyle_function = rs... | {
"repo_name": "rimbalinux/LMD3",
"path": "docutils/writers/odf_odt/pygmentsformatter.py",
"copies": "2",
"size": "4780",
"license": "bsd-3-clause",
"hash": 7162684639399672000,
"line_mean": 41.8532110092,
"line_max": 79,
"alpha_frac": 0.4983263598,
"autogenerated": false,
"ratio": 4.0269587194608... |
""" Setup Peloton logging via the Python logging module. """
import peloton.utils.logging as pul
import logging
import logging.handlers
import os
import cPickle as pickle
from peloton.utils import chop
class NullHandler(logging.Handler):
""" A logging handler that simply looses everying down the bit bucket..."""
... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/utils/logging/python_logger.py",
"copies": "1",
"size": "3194",
"license": "bsd-3-clause",
"hash": -8051107589625680000,
"line_mean": 29.7115384615,
"line_max": 94,
"alpha_frac": 0.6164683782,
"autogenerated": false,
"ratio": 4.15885416666666... |
# "Copyright (c) 2000-2003 The Regents of the University of California.
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose, without fee, and without written agreement
# is hereby granted, provided that the above copyright notice, the follo... | {
"repo_name": "fresskarma/tinyos-1.x",
"path": "contrib/nestfe/python/pytos/PyTOS.py",
"copies": "2",
"size": "4969",
"license": "bsd-3-clause",
"hash": -7944662334493245000,
"line_mean": 29.6728395062,
"line_max": 108,
"alpha_frac": 0.6568726102,
"autogenerated": false,
"ratio": 3.48213034337771... |
# $Id: qq.py 48 2008-05-27 17:31:15Z yardley $
# -*- coding: utf-8 -*-
from dpkt import Packet
# header_type
QQ_HEADER_BASIC_FAMILY = 0x02
QQ_HEADER_P2P_FAMILY = 0x00
QQ_HEADER_03_FAMILY = 0x03
QQ_HEADER_04_FAMILY = 0x04
QQ_HEADER_05_FAMILY = 0x05
header_type_str = [
"QQ_HEADER_P2P_FAMILY",
"Unknown Type",
... | {
"repo_name": "yangbh/dpkt",
"path": "dpkt/qq.py",
"copies": "6",
"size": "6747",
"license": "bsd-3-clause",
"hash": 3247853693665956000,
"line_mean": 29.1205357143,
"line_max": 51,
"alpha_frac": 0.6613309619,
"autogenerated": false,
"ratio": 2.274014155712841,
"config_test": false,
"has_no_k... |
# $Id: qq.py 48 2008-05-27 17:31:15Z yardley $
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .dpkt import Packet
# header_type
QQ_HEADER_BASIC_FAMILY = 0x02
QQ_HEADER_P2P_FAMILY = 0x00
QQ_HEADER_03_FAMILY = 0x03
QQ_HEADER_04_FAMILY = 0x04
QQ_HEADER_05_FAMILY = 0x05
header_type_str = [
"QQ_... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/qq.py",
"copies": "3",
"size": "6789",
"license": "apache-2.0",
"hash": -1543794029059876900,
"line_mean": 28.9074889868,
"line_max": 51,
"alpha_frac": 0.6616585653,
"autogenerated": false,
"ratio": 2.27971793149764... |
# $Id: qq.py 48 2008-05-27 17:31:15Z yardley $
from dpkt import Packet
# header_type
QQ_HEADER_BASIC_FAMILY = 0x02
QQ_HEADER_P2P_FAMILY = 0x00
QQ_HEADER_03_FAMILY = 0x03
QQ_HEADER_04_FAMILY = 0x04
QQ_HEADER_05_FAMILY = 0x05
header_type_str = [
"QQ_HEADER_P2P_FAMILY",
"Unknown Type",
"QQ_HEADER_03_FAMILY"... | {
"repo_name": "ashrith/dpkt",
"path": "dpkt/qq.py",
"copies": "15",
"size": "6813",
"license": "bsd-3-clause",
"hash": 8849146160514403000,
"line_mean": 29.4151785714,
"line_max": 51,
"alpha_frac": 0.653456627,
"autogenerated": false,
"ratio": 2.2763113932509187,
"config_test": false,
"has_no... |
"""A button, which switches its state in dependance of other buttons."""
from ToggleButton import ToggleButton
from ButtonBase import ButtonBase
from Constants import *
from StyleInformation import StyleInformation
import base
class RadioButton (ToggleButton):
"""RadioButton (text, group=None) -> RadioButton
... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/RadioButton.py",
"copies": "1",
"size": "8065",
"license": "bsd-2-clause",
"hash": -2420178175952565000,
"line_mean": 36.1658986175,
"line_max": 78,
"alpha_frac": 0.6376937384,
"autogenerated": false,
"ratio": 4.510626398210291,
"config_t... |
# $Id: radius.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Remote Authentication Dial-In User Service."""
from __future__ import absolute_import
from . import dpkt
from .compat import compat_ord
# http://www.untruth.org/~josh/security/radius/radius-auth.html
# RFC 2865
class RADIUS(dpkt.Packet):
... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/radius.py",
"copies": "3",
"size": "2403",
"license": "bsd-3-clause",
"hash": 3558894598638732300,
"line_mean": 22.5588235294,
"line_max": 69,
"alpha_frac": 0.6604244694,
"autogenerated": false,
"ratio": 2.774826789838337,
"config_test": false,
"has_n... |
# $Id: radius.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Remote Authentication Dial-In User Service."""
import dpkt
# http://www.untruth.org/~josh/security/radius/radius-auth.html
# RFC 2865
class RADIUS(dpkt.Packet):
__hdr__ = (
('code', 'B', 0),
('id', 'B', 0),
('l... | {
"repo_name": "jack8daniels2/dpkt",
"path": "dpkt/radius.py",
"copies": "6",
"size": "2132",
"license": "bsd-3-clause",
"hash": -2434160725207229400,
"line_mean": 22.4285714286,
"line_max": 69,
"alpha_frac": 0.6627579737,
"autogenerated": false,
"ratio": 2.66167290886392,
"config_test": false,
... |
# $Id: radius.py 23 2006-11-08 15:45:33Z dugsong $
"""Remote Authentication Dial-In User Service."""
import dpkt
# http://www.untruth.org/~josh/security/radius/radius-auth.html
# RFC 2865
class RADIUS(dpkt.Packet):
__hdr__ = (
('code', 'B', 0),
('id', 'B', 0),
('len', 'H', 4),
('... | {
"repo_name": "wofanli/trex-core",
"path": "scripts/external_libs/dpkt-1.8.6/dpkt/radius.py",
"copies": "15",
"size": "2150",
"license": "apache-2.0",
"hash": 6606767442723667000,
"line_mean": 23.4318181818,
"line_max": 69,
"alpha_frac": 0.6525581395,
"autogenerated": false,
"ratio": 2.4655963302... |
"""An abstract widget suitable for scale ranges and numerical
adjustments.
"""
from BaseWidget import BaseWidget
from Constants import *
class Range (BaseWidget):
"""Range (minimum, maximum, step=1.0) -> Range
An abstract widget class for scale ranges and numerical adjustments.
The Range widget class i... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/Range.py",
"copies": "1",
"size": "8310",
"license": "bsd-2-clause",
"hash": 2551461976987325400,
"line_mean": 36.264573991,
"line_max": 79,
"alpha_frac": 0.629843562,
"autogenerated": false,
"ratio": 4.453376205787781,
"config_test": fal... |
"""$Id: rdf.py 699 2006-09-25 02:01:18Z rubys $"""
__author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>"
__version__ = "$Revision: 699 $"
__date__ = "$Date: 2006-09-25 02:01:18 +0000 (Mon, 25 Sep 2006) $"
__copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim"
from base... | {
"repo_name": "slava-sh/NewsBlur",
"path": "vendor/feedvalidator/rdf.py",
"copies": "16",
"size": "5026",
"license": "mit",
"hash": 3504104132879171000,
"line_mean": 29.8343558282,
"line_max": 94,
"alpha_frac": 0.6689216076,
"autogenerated": false,
"ratio": 3.5519434628975266,
"config_test": fa... |
"""
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": "spreeker/democracygame",
"path": "external_apps/docutils-snapshot/build/lib/docutils/transforms/references.py",
"copies": "2",
"size": "35602",
"license": "bsd-3-clause",
"hash": -5906110973453113000,
"line_mean": 38.734375,
"line_max": 83,
"alpha_frac": 0.529661255,
"autogenerated":... |
"""
Transforms for resolving references.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, utils
from docutils.transforms import Transform
class PropagateTargets(Transform):
"""
Propagate empty internal targets to the next element.
Given the following nodes::
<target ids="in... | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "python/helpers/py2only/docutils/transforms/references.py",
"copies": "5",
"size": "36066",
"license": "apache-2.0",
"hash": 8158379801457955000,
"line_mean": 38.9844789357,
"line_max": 83,
"alpha_frac": 0.5283923917,
"autogenerated": false,
"ra... |
"""
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": "kool79/intellij-community",
"path": "python/helpers/docutils/transforms/references.py",
"copies": "57",
"size": "36103",
"license": "apache-2.0",
"hash": -5396356238175250000,
"line_mean": 38.9369469027,
"line_max": 83,
"alpha_frac": 0.5287095255,
"autogenerated": false,
"ratio": 4... |
"""
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": "rimbalinux/LMD3",
"path": "docutils/transforms/references.py",
"copies": "2",
"size": "37007",
"license": "bsd-3-clause",
"hash": -2784785204825700400,
"line_mean": 38.9369469027,
"line_max": 83,
"alpha_frac": 0.5157943092,
"autogenerated": false,
"ratio": 4.729329073482428,
"con... |
"""
Transforms for resolving references.
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, utils
from docutils.transforms import Transform
class PropagateTargets(Transform):
"""
Propagate empty internal targets to the next element.
Given the following nodes::
<target ids="in... | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "python/helpers/py3only/docutils/transforms/references.py",
"copies": "44",
"size": "36116",
"license": "apache-2.0",
"hash": -2431087759323646500,
"line_mean": 38.9955703212,
"line_max": 83,
"alpha_frac": 0.5282146417,
"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": "HesselTjeerdsma/Cyber-Physical-Pacman-Game",
"path": "Algor/flask/lib/python2.7/site-packages/docutils/transforms/references.py",
"copies": "7",
"size": "36584",
"license": "apache-2.0",
"hash": -7792882722659829000,
"line_mean": 39.0700985761,
"line_max": 83,
"alpha_frac": 0.527279685... |
"""A specialized event manager and render group class for widgets."""
from pygame import display, Surface, event, QUIT, VIDEORESIZE, KMOD_SHIFT
from pygame import K_TAB, KMOD_LALT, KMOD_RALT, KMOD_ALT, KMOD_CTRL, KMOD_RCTRL
from pygame import KMOD_LCTRL, KMOD_RSHIFT, KMOD_LSHIFT, KEYUP, KEYDOWN, mouse
from pygame imp... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/Renderer.py",
"copies": "1",
"size": "56115",
"license": "bsd-2-clause",
"hash": -9000527306651276000,
"line_mean": 37.1994554118,
"line_max": 79,
"alpha_frac": 0.5864742048,
"autogenerated": false,
"ratio": 4.46491088478676,
"config_test... |
from twisted.internet import reactor
from twisted.internet.error import CannotListenError
from twisted.web import server
from twisted.web import resource
from twisted.web.static import FileTransfer
from peloton.adapters import AbstractPelotonAdapter
from peloton.adapters.xmlrpc import PelotonXMLRPCHandler
from peloton... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/adapters/http.py",
"copies": "1",
"size": "9813",
"license": "bsd-3-clause",
"hash": -4940887955729227000,
"line_mean": 40.0585774059,
"line_max": 150,
"alpha_frac": 0.598389891,
"autogenerated": false,
"ratio": 4.257266811279827,
"config_t... |
# $Id: rfb.py 47 2008-05-27 02:10:00Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Remote Framebuffer Protocol."""
from __future__ import absolute_import
from . import dpkt
# Remote Framebuffer Protocol
# http://www.realvnc.com/docs/rfbproto.pdf
# Client to Server Messages
CLIENT_SET_PIXEL_FORMAT = 0
CLIENT_SET_ENCODI... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/rfb.py",
"copies": "3",
"size": "1924",
"license": "bsd-3-clause",
"hash": -4312186176761077000,
"line_mean": 18.24,
"line_max": 53,
"alpha_frac": 0.5088357588,
"autogenerated": false,
"ratio": 3.0251572327044025,
"config_test": false,
"has_no_keyword... |
# $Id: rfb.py 47 2008-05-27 02:10:00Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Remote Framebuffer Protocol."""
import dpkt
# Remote Framebuffer Protocol
# http://www.realvnc.com/docs/rfbproto.pdf
# Client to Server Messages
CLIENT_SET_PIXEL_FORMAT = 0
CLIENT_SET_ENCODINGS = 2
CLIENT_FRAMEBUFFER_UPDATE_REQUEST = 3
... | {
"repo_name": "yangbh/dpkt",
"path": "dpkt/rfb.py",
"copies": "6",
"size": "1716",
"license": "bsd-3-clause",
"hash": -8595211902806908000,
"line_mean": 18.0666666667,
"line_max": 53,
"alpha_frac": 0.4994172494,
"autogenerated": false,
"ratio": 2.9084745762711863,
"config_test": false,
"has_n... |
# $Id: rfb.py 47 2008-05-27 02:10:00Z jon.oberheide $
"""Remote Framebuffer Protocol."""
import dpkt
# Remote Framebuffer Protocol
# http://www.realvnc.com/docs/rfbproto.pdf
# Client to Server Messages
CLIENT_SET_PIXEL_FORMAT = 0
CLIENT_SET_ENCODINGS = 2
CLIENT_FRAMEBUFFER_UPDATE_REQUEST = 3
... | {
"repo_name": "dproc/trex_odp_porting_integration",
"path": "scripts/external_libs/dpkt-1.8.6/dpkt/rfb.py",
"copies": "32",
"size": "1843",
"license": "apache-2.0",
"hash": -7750087256625411000,
"line_mean": 21.7530864198,
"line_max": 53,
"alpha_frac": 0.459576777,
"autogenerated": false,
"ratio"... |
"""
Parse a WHOIS research dump and write out (just) the RPKI-relevant
fields in myrpki-format CSV syntax.
Unfortunately, unlike the ARIN and APNIC databases, the RIPE database
doesn't really have any useful concept of an organizational handle.
More precisely, while it has handles out the wazoo, none of them are
usef... | {
"repo_name": "farrokhi/dotfiles",
"path": "bin/ripe-to-csv.py",
"copies": "1",
"size": "4542",
"license": "bsd-2-clause",
"hash": -6763835724299402000,
"line_mean": 31.9130434783,
"line_max": 81,
"alpha_frac": 0.6583003082,
"autogenerated": false,
"ratio": 3.4804597701149427,
"config_test": fa... |
# $Id: rip.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Routing Information Protocol."""
from __future__ import print_function
from __future__ import absolute_import
from . import dpkt
# RIP v2 - RFC 2453
# http://tools.ietf.org/html/rfc2453
REQUEST = 1
RESPONSE = 2
class RIP(dpkt.Packet):
"... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/rip.py",
"copies": "3",
"size": "2208",
"license": "bsd-3-clause",
"hash": 3979859437658804000,
"line_mean": 21.08,
"line_max": 185,
"alpha_frac": 0.495923913,
"autogenerated": false,
"ratio": 2.816326530612245,
"config_test": false,
"has_no_keywords"... |
# $Id: rip.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Routing Information Protocol."""
import dpkt
# RIP v2 - RFC 2453
# http://tools.ietf.org/html/rfc2453
REQUEST = 1
RESPONSE = 2
class RIP(dpkt.Packet):
__hdr__ = (
('cmd', 'B', REQUEST),
('v', 'B', 2),
('rsvd', 'H... | {
"repo_name": "hexcap/dpkt",
"path": "dpkt/rip.py",
"copies": "6",
"size": "1963",
"license": "bsd-3-clause",
"hash": 5640214970032284000,
"line_mean": 21.0674157303,
"line_max": 184,
"alpha_frac": 0.4803871625,
"autogenerated": false,
"ratio": 2.700137551581843,
"config_test": false,
"has_no... |
"""
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": "spreeker/democracygame",
"path": "external_apps/docutils-snapshot/build/lib/docutils/parsers/rst/roles.py",
"copies": "2",
"size": "12978",
"license": "bsd-3-clause",
"hash": 4114028113499681300,
"line_mean": 36.5086705202,
"line_max": 79,
"alpha_frac": 0.6514100786,
"autogenerated":... |
"""
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={}, c... | {
"repo_name": "rimbalinux/MSISDNArea",
"path": "docutils/parsers/rst/roles.py",
"copies": "2",
"size": "13537",
"license": "bsd-3-clause",
"hash": -6054533389781365000,
"line_mean": 36.6771428571,
"line_max": 79,
"alpha_frac": 0.6347048829,
"autogenerated": false,
"ratio": 4.185837971552258,
"c... |
"""
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": "paaschpa/badcomputering",
"path": "docutils/parsers/rst/roles.py",
"copies": "6",
"size": "13426",
"license": "bsd-3-clause",
"hash": 3878989175920361000,
"line_mean": 36.6078431373,
"line_max": 79,
"alpha_frac": 0.6510502011,
"autogenerated": false,
"ratio": 4.105810397553517,
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.