text stringlengths 0 1.05M | meta dict |
|---|---|
"""
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": "cuongthai/cuongthai-s-blog",
"path": "docutils/parsers/rst/roles.py",
"copies": "2",
"size": "13783",
"license": "bsd-3-clause",
"hash": -5576980266694448000,
"line_mean": 36.6078431373,
"line_max": 79,
"alpha_frac": 0.634187042,
"autogenerated": false,
"ratio": 4.162790697674419,
... |
"""
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": "neumerance/deploy",
"path": ".venv/lib/python2.7/site-packages/docutils/parsers/rst/roles.py",
"copies": "4",
"size": "14712",
"license": "apache-2.0",
"hash": 5285176982817548000,
"line_mean": 36.3401015228,
"line_max": 79,
"alpha_frac": 0.6494018488,
"autogenerated": false,
"rati... |
"""$Id: root.py 717 2007-01-04 18:04:57Z rubys $"""
__author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>"
__version__ = "$Revision: 717 $"
__date__ = "$Date: 2007-01-04 18:04:57 +0000 (Thu, 04 Jan 2007) $"
__copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim"
from bas... | {
"repo_name": "AlphaCluster/NewsBlur",
"path": "vendor/feedvalidator/root.py",
"copies": "16",
"size": "5750",
"license": "mit",
"hash": 5844375525889711000,
"line_mean": 32.4302325581,
"line_max": 94,
"alpha_frac": 0.6753043478,
"autogenerated": false,
"ratio": 3.8564721663313213,
"config_test... |
# $Id: rpc.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Remote Procedure Call."""
from __future__ import absolute_import
import struct
from . import dpkt
# RPC.dir
CALL = 0
REPLY = 1
# RPC.Auth.flavor
AUTH_NONE = AUTH_NULL = 0
AUTH_UNIX = 1
AUTH_SHORT = 2
AUTH_DES = 3
# RPC.Reply.stat
MSG_ACCEPT... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/rpc.py",
"copies": "3",
"size": "5082",
"license": "apache-2.0",
"hash": -8877801505236011000,
"line_mean": 28.5465116279,
"line_max": 90,
"alpha_frac": 0.4795356159,
"autogenerated": false,
"ratio": 3.4832076764907... |
# $Id: rpc.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Remote Procedure Call."""
import struct
import dpkt
# RPC.dir
CALL = 0
REPLY = 1
# RPC.Auth.flavor
AUTH_NONE = AUTH_NULL = 0
AUTH_UNIX = 1
AUTH_SHORT = 2
AUTH_DES = 3
# RPC.Reply.stat
MSG_ACCEPTED = 0
MSG_DENIED = 1
# RPC.Reply.Accept.stat
... | {
"repo_name": "lkash/test",
"path": "dpkt/rpc.py",
"copies": "6",
"size": "4854",
"license": "bsd-3-clause",
"hash": -630027343890657700,
"line_mean": 29.149068323,
"line_max": 90,
"alpha_frac": 0.4721878863,
"autogenerated": false,
"ratio": 3.44499645138396,
"config_test": false,
"has_no_key... |
# $Id: rpc.py 23 2006-11-08 15:45:33Z dugsong $
"""Remote Procedure Call."""
import struct
import dpkt
# RPC.dir
CALL = 0
REPLY = 1
# RPC.Auth.flavor
AUTH_NONE = AUTH_NULL = 0
AUTH_UNIX = 1
AUTH_SHORT = 2
AUTH_DES = 3
# RPC.Reply.stat
MSG_ACCEPTED = 0
MSG_DENIED = 1
# RPC.Reply.Accept.stat
SUCCESS = 0
PROG_UNAVAI... | {
"repo_name": "guke001/QMarkdowner",
"path": "dpkt/rpc.py",
"copies": "15",
"size": "4858",
"license": "mit",
"hash": 6604804491012872000,
"line_mean": 32.2739726027,
"line_max": 78,
"alpha_frac": 0.469740634,
"autogenerated": false,
"ratio": 3.4675231977159173,
"config_test": false,
"has_no_... |
# $Id: rpc.py 271 2006-01-11 16:03:33Z dugsong $
"""Remote Procedure Call."""
import struct
import dpkt
# RPC.dir
CALL = 0
REPLY = 1
# RPC.Auth.flavor
AUTH_NONE = AUTH_NULL = 0
AUTH_UNIX = 1
AUTH_SHORT = 2
AUTH_DES = 3
# RPC.Reply.stat
MSG_ACCEPTED = 0
MSG_DENIED = 1
# RPC.Reply.Accept.stat
SUCCESS = 0
PROG_UNAVA... | {
"repo_name": "MercenaryLogic/StompingGround",
"path": "stompingground/dpkt/rpc.py",
"copies": "1",
"size": "4859",
"license": "mit",
"hash": -2740422560684032000,
"line_mean": 32.2808219178,
"line_max": 78,
"alpha_frac": 0.4698497633,
"autogenerated": false,
"ratio": 3.465763195435093,
"config... |
"""$Id: rss.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": "stone5495/NewsBlur",
"path": "vendor/feedvalidator/rss.py",
"copies": "16",
"size": "1563",
"license": "mit",
"hash": -2125336112809196800,
"line_mean": 37.1219512195,
"line_max": 100,
"alpha_frac": 0.6769033909,
"autogenerated": false,
"ratio": 3.383116883116883,
"config_test": ... |
# $Id: rtp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Real-Time Transport Protocol."""
from __future__ import absolute_import
from .dpkt import Packet
from .decorators import deprecated
# version 1100 0000 0000 0000 ! 0xC000 14
# p 0010 0000 0000 0000 ! 0x2000 13
# x 0001 0000 0000 ... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/rtp.py",
"copies": "3",
"size": "4445",
"license": "bsd-3-clause",
"hash": 1335018711523291600,
"line_mean": 34.8467741935,
"line_max": 718,
"alpha_frac": 0.6105736783,
"autogenerated": false,
"ratio": 2.0868544600938965,
"config_test": false,
"has_no... |
# $Id: rtp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Real-Time Transport Protocol"""
from dpkt import Packet
from decorators import deprecated
# version 1100 0000 0000 0000 ! 0xC000 14
# p 0010 0000 0000 0000 ! 0x2000 13
# x 0001 0000 0000 0000 ! 0x1000 12
# cc 0000 1111 0000... | {
"repo_name": "hexcap/dpkt",
"path": "dpkt/rtp.py",
"copies": "6",
"size": "3148",
"license": "bsd-3-clause",
"hash": 5765775470230767000,
"line_mean": 23.7874015748,
"line_max": 79,
"alpha_frac": 0.5371664549,
"autogenerated": false,
"ratio": 2.8880733944954127,
"config_test": false,
"has_no... |
# $Id: rtp.py 23 2006-11-08 15:45:33Z dugsong $
"""Real-Time Transport Protocol"""
from dpkt import Packet
# version 1100 0000 0000 0000 ! 0xC000 14
# p 0010 0000 0000 0000 ! 0x2000 13
# x 0001 0000 0000 0000 ! 0x1000 12
# cc 0000 1111 0000 0000 ! 0x0F00 8
# m 0000 0000 1000 0000 ! 0x0080... | {
"repo_name": "ashrith/dpkt",
"path": "dpkt/rtp.py",
"copies": "15",
"size": "2306",
"license": "bsd-3-clause",
"hash": -1694694482503197000,
"line_mean": 31.9428571429,
"line_max": 79,
"alpha_frac": 0.540329575,
"autogenerated": false,
"ratio": 2.5593784683684793,
"config_test": false,
"has_... |
# $Id: rvp.py,v 1.5 2004/11/09 11:29:31 dvd Exp $
# embedding sample for RVP, a part of RNV, http://davidashen.net/rnv.html
# code kept simple to show the technique, not to provide a general purpose
# module.
#
# details of the protocol are in a long comment near the start of rvp.c
#
import sys, os, string, re, xml.p... | {
"repo_name": "dtolpin/RNV",
"path": "tools/rvp.py",
"copies": "1",
"size": "3966",
"license": "bsd-3-clause",
"hash": -7261839087932771000,
"line_mean": 25.6174496644,
"line_max": 79,
"alpha_frac": 0.6835602622,
"autogenerated": false,
"ratio": 3.165203511572227,
"config_test": false,
"has_n... |
# $Id: rx.py 23 2006-11-08 15:45:33Z jonojono $
"""Rx Protocol."""
import dpkt
# Types
DATA = 0x01
ACK = 0x02
BUSY = 0x03
ABORT = 0x04
ACKALL = 0x05
CHALLENGE = 0x06
RESPONSE = 0x07
DEBUG ... | {
"repo_name": "somethingnew2-0/CS642-HW2",
"path": "dpkt/rx.py",
"copies": "32",
"size": "1030",
"license": "mit",
"hash": -7849405836270798000,
"line_mean": 22.4090909091,
"line_max": 47,
"alpha_frac": 0.386407767,
"autogenerated": false,
"ratio": 3.03834808259587,
"config_test": false,
"has... |
import sadm_sandbox
import sadm_cmd
from sadm_constants import *
from sadm_util import *
from sadm_error import *
from sadm_dispatch import *
from sadm_config import *
from sadm_vcs import update_program_if_needed
from sadm_sandbox import get_by_name_pattern
# From buildscripts...
from textui.ansi import *
from textui.... | {
"repo_name": "perfectsearch/sandman",
"path": "code/sadm/lib/sadm_prompt.py",
"copies": "1",
"size": "9959",
"license": "mit",
"hash": -900025863090103600,
"line_mean": 32.6452702703,
"line_max": 130,
"alpha_frac": 0.5796766744,
"autogenerated": false,
"ratio": 3.703607288955002,
"config_test"... |
import tarfile
from sadm_constants import *
from sadm_error import *
# From buildscripts...
from ioutil import *
import buildinfo
import sandbox
import sandboxtype
import component
if os.name == 'nt':
_PROCLIST_CMD = 'tasklist /V'
else:
_PROCLIST_CMD = 'ps -ef'
_PID_IN_CMD_LOG_PAT = re.compile(r'\s+start\s+(.... | {
"repo_name": "perfectsearch/sandman",
"path": "code/sadm/lib/sadm_sandbox.py",
"copies": "1",
"size": "5293",
"license": "mit",
"hash": -8586137300789196000,
"line_mean": 36.8071428571,
"line_max": 109,
"alpha_frac": 0.5996599282,
"autogenerated": false,
"ratio": 3.3394321766561514,
"config_te... |
"""Slider widgets for selecting a value from a range."""
from pygame import K_KP_PLUS, K_PLUS, K_RIGHT, K_DOWN, K_KP_MINUS, K_MINUS
from pygame import K_LEFT, K_UP, K_PAGEUP, K_PAGEDOWN, K_HOME, K_END, Rect
from Range import Range
from ocempgui.draw import Draw
from Constants import *
from StyleInformation import Sty... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/Scale.py",
"copies": "1",
"size": "17399",
"license": "bsd-2-clause",
"hash": 7664209984137610000,
"line_mean": 37.3237885463,
"line_max": 79,
"alpha_frac": 0.5627334904,
"autogenerated": false,
"ratio": 4.401467240070832,
"config_test": ... |
"""
Function to scan the sub-directory structure in a given directory.
"""
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2011-2013, Graham Klyne, University of Oxford"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
from os.path import join, isdir, normpath
import os
import l... | {
"repo_name": "wf4ever/ro-manager",
"path": "src/MiscUtils/ScanDirectories.py",
"copies": "1",
"size": "4443",
"license": "mit",
"hash": 7672233155959463000,
"line_mean": 39.7614678899,
"line_max": 84,
"alpha_frac": 0.683772226,
"autogenerated": false,
"ratio": 3.9458259325044405,
"config_test"... |
# $Id: ScanDirectories.py 1047 2009-01-15 14:48:58Z graham $
#
"""
Function to scan the sub-directory structure in a given directory.
Note that files are not included in the results returned.
"""
from os.path import join, isdir, normpath
import os, logging
#from functional import partial
logger = logging.getLogger("... | {
"repo_name": "bhavanaananda/DataStage",
"path": "src/AdminUI/MiscLib/ScanDirectories.py",
"copies": "6",
"size": "4908",
"license": "mit",
"hash": -6267346238698686000,
"line_mean": 36.4732824427,
"line_max": 99,
"alpha_frac": 0.6756316218,
"autogenerated": false,
"ratio": 4.09,
"config_test":... |
# $Id: ScanFiles.py 1047 2009-01-15 14:48:58Z graham $
#
"""
Funtions to scan all files with names matching a given pattern in
a directory or directory tree.
Note that directories are not included in the results returned.
"""
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2011-2013, Graham... | {
"repo_name": "wf4ever/ro-manager",
"path": "src/MiscUtils/ScanFiles.py",
"copies": "1",
"size": "4177",
"license": "mit",
"hash": -479690974244343100,
"line_mean": 32.416,
"line_max": 79,
"alpha_frac": 0.6698587503,
"autogenerated": false,
"ratio": 3.8928238583411,
"config_test": false,
"has... |
""" $Id: ScarabConnection.py,v 1.3 2000/03/13 22:32:35 kmacleod Exp $
Scarab Connection class
The Scarab Connection class provides the housekeeping for setting up
connections, setting parameters, and creating the initial root proxy
for a server.
"""
from urllib import splittype, splithost, splitport
import types
im... | {
"repo_name": "mworks/mworks",
"path": "supporting_libs/scarab/Scarab-0.1.00d19/python/ScarabConnection.py",
"copies": "1",
"size": "16374",
"license": "mit",
"hash": -7688913665942233000,
"line_mean": 34.5184381779,
"line_max": 100,
"alpha_frac": 0.5171002809,
"autogenerated": false,
"ratio": 4.... |
""" $Id: ScarabProxy.py,v 1.1 2000/03/04 19:38:38 kmacleod Exp $
ScarabProxy implements surrogates for remote objects
"""
class ScarabProxy:
def __init__(self, connection, object_name):
self._connection_ = connection
self._object_ = object_name
def __repr__(self):
# Prohibit call to __getattr__
return '... | {
"repo_name": "mworks/mworks",
"path": "supporting_libs/scarab/Scarab-0.1.00d19/python/ScarabProxy.py",
"copies": "1",
"size": "1937",
"license": "mit",
"hash": 6837486774085125000,
"line_mean": 27.4852941176,
"line_max": 72,
"alpha_frac": 0.6861125452,
"autogenerated": false,
"ratio": 3.58703703... |
""" $Id: Scarab.py,v 1.3 2000/03/13 22:32:35 kmacleod Exp $
Scarab.py implements the basic user API for using Scarab as either a
client or a server. It can create connections and proxies for remote
servers and run a server loop for implementing a server.
Scarab URLs are two-part URLs that contain an upper-level prot... | {
"repo_name": "mworks/mworks",
"path": "supporting_libs/scarab/Scarab-0.1.00d19/python/Scarab.py",
"copies": "1",
"size": "3477",
"license": "mit",
"hash": 5280108905469691000,
"line_mean": 30.0446428571,
"line_max": 107,
"alpha_frac": 0.7049180328,
"autogenerated": false,
"ratio": 3.625651720542... |
# $Id: sccp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Cisco Skinny Client Control Protocol."""
from __future__ import absolute_import
from . import dpkt
KEYPAD_BUTTON = 0x00000003
OFF_HOOK = 0x00000006
ON_HOOK = 0x00000007
OPEN_RECEIVE_CHANNEL_ACK = 0x00000022
START_TONE = 0x00000082
STOP_TONE =... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/sccp.py",
"copies": "1",
"size": "5492",
"license": "bsd-3-clause",
"hash": 542809333792048960,
"line_mean": 23.5178571429,
"line_max": 62,
"alpha_frac": 0.5145666424,
"autogenerated": false,
"ratio": 3.020902090209021,
"config_test": false,
"has_no_k... |
# $Id: sccp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Cisco Skinny Client Control Protocol."""
import dpkt
KEYPAD_BUTTON = 0x00000003
OFF_HOOK = 0x00000006
ON_HOOK = 0x00000007
OPEN_RECEIVE_CHANNEL_ACK = 0x00000022
START_TONE = 0x00000082
STOP_TONE = 0x00000083
SET_LAMP = 0x00000086
SET_SPEAKER_... | {
"repo_name": "yangbh/dpkt",
"path": "dpkt/sccp.py",
"copies": "6",
"size": "5278",
"license": "bsd-3-clause",
"hash": -4282370109017054000,
"line_mean": 23.6635514019,
"line_max": 62,
"alpha_frac": 0.5115574081,
"autogenerated": false,
"ratio": 2.9819209039548022,
"config_test": false,
"has_... |
# $Id: sccp.py 23 2006-11-08 15:45:33Z dugsong $
"""Cisco Skinny Client Control Protocol."""
import dpkt
KEYPAD_BUTTON = 0x00000003
OFF_HOOK = 0x00000006
ON_HOOK = 0x00000007
OPEN_RECEIVE_CHANNEL_ACK= 0x00000022
START_TONE = 0x00000082
STOP_TONE = 0x00000083
SET_LAMP = 0x00000086
SET_SPEAKER_MODE = 0x00000088... | {
"repo_name": "guke001/QMarkdowner",
"path": "dpkt/sccp.py",
"copies": "15",
"size": "5315",
"license": "mit",
"hash": -6013544520054758000,
"line_mean": 26.1173469388,
"line_max": 61,
"alpha_frac": 0.5061147695,
"autogenerated": false,
"ratio": 2.9792600896860986,
"config_test": false,
"has_... |
"""A widget, which allows scrolling using buttons and a slider."""
from pygame import K_KP_PLUS, K_PLUS, K_RIGHT, K_DOWN, K_KP_MINUS, K_MINUS
from pygame import K_LEFT, K_UP, K_PAGEUP, K_PAGEDOWN, K_HOME, K_END, Rect
from Range import Range
from Constants import *
from StyleInformation import StyleInformation
import ... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/ScrollBar.py",
"copies": "1",
"size": "28886",
"license": "bsd-2-clause",
"hash": -3268360133049812500,
"line_mean": 37.5146666667,
"line_max": 79,
"alpha_frac": 0.5596828914,
"autogenerated": false,
"ratio": 4.3145631067961165,
"config_t... |
"""A widget class, which can contain other widgets and uses optional
scrollbars."""
from pygame import K_RIGHT, K_LEFT, K_HOME, K_END, K_DOWN, K_UP, K_PAGEDOWN
from pygame import K_PAGEUP
from ScrollBar import HScrollBar, VScrollBar
from Bin import Bin
from BaseWidget import BaseWidget
from ViewPort import ViewPort
f... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/ScrolledWindow.py",
"copies": "1",
"size": "16723",
"license": "bsd-2-clause",
"hash": 7641933255451440000,
"line_mean": 40.2913580247,
"line_max": 79,
"alpha_frac": 0.5622196974,
"autogenerated": false,
"ratio": 4.4054267650158065,
"conf... |
# $Id: sctp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Stream Control Transmission Protocol."""
from __future__ import print_function
from __future__ import absolute_import
from . import dpkt
from . import crc32c
# Stream Control Transmission Protocol
# http://tools.ietf.org/html/rfc2960
# Chunk... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/sctp.py",
"copies": "3",
"size": "2523",
"license": "apache-2.0",
"hash": -6877362430263517000,
"line_mean": 22.8018867925,
"line_max": 297,
"alpha_frac": 0.5596512089,
"autogenerated": false,
"ratio": 2.58504098360... |
# $Id: sctp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Stream Control Transmission Protocol."""
import dpkt
import crc32c
# Stream Control Transmission Protocol
# http://tools.ietf.org/html/rfc2960
# Chunk Types
DATA = 0
INIT = 1
INIT_ACK = 2
SACK = 3
HEARTBEAT = 4
HEARTBEAT_ACK = 5
ABORT = 6
SH... | {
"repo_name": "hexcap/dpkt",
"path": "dpkt/sctp.py",
"copies": "6",
"size": "2256",
"license": "bsd-3-clause",
"hash": -4052172062442528300,
"line_mean": 22.7578947368,
"line_max": 296,
"alpha_frac": 0.5505319149,
"autogenerated": false,
"ratio": 2.462882096069869,
"config_test": false,
"has_... |
# $Id: sctp.py 23 2006-11-08 15:45:33Z dugsong $
"""Stream Control Transmission Protocol."""
import dpkt, crc32c
# Stream Control Transmission Protocol
# http://tools.ietf.org/html/rfc2960
# Chunk Types
DATA = 0
INIT = 1
INIT_ACK = 2
SACK = 3
HEARTBEAT = 4
HEARTBEAT_ACK = 5
ABORT = 6
SHUTDOWN = 7
SHUTDO... | {
"repo_name": "zhakui/QMarkdowner",
"path": "dpkt/sctp.py",
"copies": "15",
"size": "2468",
"license": "mit",
"hash": 8760624498417286000,
"line_mean": 26.4222222222,
"line_max": 302,
"alpha_frac": 0.5344408428,
"autogenerated": false,
"ratio": 2.6061246040126718,
"config_test": true,
"has_no... |
# $Id: SD.py,v 1.10 2008-08-05 00:20:44 gosselin_a Exp $
# $Log: not supported by cvs2svn $
# Revision 1.9 2008/06/30 02:59:57 gosselin_a
# Fixed definition of equivNumericTypes list.
#
# Revision 1.8 2008/06/30 02:41:44 gosselin_a
# Preleminary check-in of changes leading to the 0.8 revision.
# - switch to numpy... | {
"repo_name": "ryfeus/lambda-packs",
"path": "HDF4_H5_NETCDF/source2.7/pyhdf/SD.py",
"copies": "1",
"size": "117733",
"license": "mit",
"hash": -3060043927394084000,
"line_mean": 34.0604526504,
"line_max": 113,
"alpha_frac": 0.5522071127,
"autogenerated": false,
"ratio": 4.285719486003422,
"con... |
# $Id: selftest.py 2213 2005-01-11 18:49:47Z fredrik $
# elementtree selftest program
# this test script uses Python's "doctest" module to check that the
# *test script* works as expected.
import sys
try:
from StringIO import StringIO
BytesIO = StringIO
except ImportError:
from io import BytesIO, StringI... | {
"repo_name": "lxml/lxml",
"path": "src/lxml/tests/selftest2.py",
"copies": "1",
"size": "12001",
"license": "bsd-3-clause",
"hash": -8048577246838475000,
"line_mean": 25.5508849558,
"line_max": 91,
"alpha_frac": 0.5513707191,
"autogenerated": false,
"ratio": 3.2780661021578803,
"config_test": ... |
# $Id: selftest.py 3276 2007-09-12 06:52:30Z fredrik $
# -*- coding: iso-8859-1 -*-
# elementtree selftest program
# this test script uses Python's "doctest" module to check that the
# *test script* works as expected.
# TODO: add more elementtree method tests
# TODO: add xml/html parsing tests
# TODO: etc
import re,... | {
"repo_name": "lxml/lxml",
"path": "src/lxml/tests/selftest.py",
"copies": "1",
"size": "35400",
"license": "bsd-3-clause",
"hash": -5018732984266702000,
"line_mean": 27.2521947326,
"line_max": 164,
"alpha_frac": 0.5743502825,
"autogenerated": false,
"ratio": 3.358952462282949,
"config_test": t... |
from twisted.spread import pb
from twisted.internet import reactor
from peloton.utils.config import locateService
from peloton.utils.config import findTemplateTargetsFor
from peloton.utils.config import PelotonSettings
import peloton.utils.logging as logging
class PelotonService(object):
""" Base class for all ser... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/service.py",
"copies": "1",
"size": "8458",
"license": "bsd-3-clause",
"hash": -3442739855671222000,
"line_mean": 43.7566137566,
"line_max": 104,
"alpha_frac": 0.6324190116,
"autogenerated": false,
"ratio": 4.6447007138934655,
"config_test"... |
# $Id: setup.py 532 2009-01-29 04:32:33Z casey.duncan $
import sys
from distutils.core import setup, Extension
if sys.platform != 'win32':
compile_args = ['-funroll-loops']
else:
# XXX insert win32 flag to unroll loops here
compile_args = []
setup(
name='noise',
version='1.0b3',
description='Perlin noise fo... | {
"repo_name": "greyarea/noise",
"path": "setup.py",
"copies": "1",
"size": "1966",
"license": "mit",
"hash": 356684837043012500,
"line_mean": 33.4912280702,
"line_max": 77,
"alpha_frac": 0.7151576806,
"autogenerated": false,
"ratio": 3.498220640569395,
"config_test": false,
"has_no_keywords":... |
# $Id: SFrameHelpers.py 344 2012-12-13 13:10:53Z krasznaa $
##
# @package SFrameHelpers
# @short Collection of SFrame related python functions
#
# This package is a collection of python functions useful for SFrame.
# They can either be used from an interactive python session by
# executing
#
# <code>
# >>> import SFra... | {
"repo_name": "jpavel/cms-ucl-tau",
"path": "SFrame/python/SFrameHelpers.py",
"copies": "1",
"size": "7024",
"license": "mit",
"hash": -2654306918557603000,
"line_mean": 33.9452736318,
"line_max": 94,
"alpha_frac": 0.6452164009,
"autogenerated": false,
"ratio": 3.645044110015568,
"config_test":... |
from twisted.internet.error import CannotListenError
from peloton.plugins import PelotonPlugin
from peloton.coreio import PelotonManagementInterface
from peloton.plugins.support.sshmanhole import PasswordManhole
class PelotonShell(PelotonPlugin):
""" Provides an interpreter inside the event loop to which
one can ... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/plugins/shell.py",
"copies": "1",
"size": "1842",
"license": "bsd-3-clause",
"hash": 5994752656427817000,
"line_mean": 37.375,
"line_max": 84,
"alpha_frac": 0.6498371336,
"autogenerated": false,
"ratio": 4.1863636363636365,
"config_test": f... |
'''
Created on 20. okt. 2009
@author: Odd Andre Hjelkrem
modified by Tomas Levin, corrected units
'''
import SEMBA as S
#Create empty dictionaries to load emission data in
#SHIP = {}
def CreateShip():
S.load_Ship()
create_vehicle_list()
Vehicle_Types = {}
def create_vehicle_list():
for k,v in S.H_SHIP.ite... | {
"repo_name": "tomasle/semba",
"path": "SEMBA/SHIP.py",
"copies": "1",
"size": "9179",
"license": "bsd-2-clause",
"hash": -5222393544046216000,
"line_mean": 23.9456521739,
"line_max": 104,
"alpha_frac": 0.5856847151,
"autogenerated": false,
"ratio": 2.5475992228698305,
"config_test": false,
"... |
# $Id: ShowFeats.py 537 2007-08-20 14:54:35Z landrgr1 $
#
# Created by Greg Landrum Aug 2006
#
#
from __future__ import print_function
# # --- ---- --- ---- --- ---- --- ---- --- ---- --- ----
import sys, os, getopt
from rdkit import RDConfig
from rdkit import Chem
from rdkit.Chem import AllChem
_version = "0.3.2... | {
"repo_name": "InformaticsMatters/pipelines",
"path": "src/python/pipelines/rdkit/show_feats.py",
"copies": "1",
"size": "8263",
"license": "apache-2.0",
"hash": 3940858231345543700,
"line_mean": 30.7807692308,
"line_max": 100,
"alpha_frac": 0.5942151761,
"autogenerated": false,
"ratio": 2.881101... |
# $Id: ShowFeats.py 537 2007-08-20 14:54:35Z landrgr1 $
#
# Created by Greg Landrum Aug 2006
#
#
from __future__ import print_function
_version = "0.3.2"
_usage="""
ShowFeats [optional args] <filenames>
if "-" is provided as a filename, data will be read from stdin (the console)
"""
_welcomeMessage="This is S... | {
"repo_name": "soerendip42/rdkit",
"path": "rdkit/Chem/Features/ShowFeats.py",
"copies": "3",
"size": "12126",
"license": "bsd-3-clause",
"hash": 1101365321808392000,
"line_mean": 32.9663865546,
"line_max": 112,
"alpha_frac": 0.6123206333,
"autogenerated": false,
"ratio": 3.100485809255945,
"co... |
# $Id: ShowFeats.py 537 2007-08-20 14:54:35Z landrgr1 $
#
# Created by Greg Landrum Aug 2006
#
#
from __future__ import print_function
_version = "0.3.2"
_usage = """
ShowFeats [optional args] <filenames>
if "-" is provided as a filename, data will be read from stdin (the console)
"""
_welcomeMessage = "This i... | {
"repo_name": "jandom/rdkit",
"path": "rdkit/Chem/Features/ShowFeats.py",
"copies": "5",
"size": "12247",
"license": "bsd-3-clause",
"hash": 1397273997634990300,
"line_mean": 33.5960451977,
"line_max": 101,
"alpha_frac": 0.6077406712,
"autogenerated": false,
"ratio": 3.074817976399699,
"config_... |
# $Id: ShowFeats.py 537 2007-08-20 14:54:35Z landrgr1 $
#
# Created by Greg Landrum Aug 2006
#
#
_version = "0.3.2"
_usage="""
ShowFeats [optional args] <filenames>
if "-" is provided as a filename, data will be read from stdin (the console)
"""
_welcomeMessage="This is ShowFeats version %s"%(_version)
impor... | {
"repo_name": "rdkit/rdkit-orig",
"path": "rdkit/Chem/Features/ShowFeats.py",
"copies": "2",
"size": "12019",
"license": "bsd-3-clause",
"hash": -4812932672994946000,
"line_mean": 32.8563380282,
"line_max": 112,
"alpha_frac": 0.611198935,
"autogenerated": false,
"ratio": 3.102478058853898,
"con... |
"""Classes for events and event callbacks, which can be used by the
EventManager class."""
class Event (object):
"""Event (signal, data) -> Event
Creates a new Event object for the event management system.
The event object is a simple 'key-value' association containing a
signal identfier ('signal') ... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/events/Signals.py",
"copies": "1",
"size": "3476",
"license": "bsd-2-clause",
"hash": 3169135536607548000,
"line_mean": 38.0561797753,
"line_max": 78,
"alpha_frac": 0.6901611047,
"autogenerated": false,
"ratio": 4.4909560723514215,
"config_test":... |
#$Id: simPIRDetectBatch.py,v 1.1 2005/07/19 17:47:46 phoebusc Exp $
#
# NOT FULLY WORKING. SEE NOTES.
#
# First, run in a separate window:
# build/pc/main.exe -b=1 -gui 5 # assuming 5 nodes in your file
# Then, run like this at TestPIRDetectNoReg directory:
# java net.tinyos.sim.SimDriver -nosf -script "simPIRDete... | {
"repo_name": "ekiwi/tinyos-1.x",
"path": "contrib/nestfe/nesc/apps/TestPIRDetectNoReg/simPIRDetectBatch.py",
"copies": "2",
"size": "9918",
"license": "bsd-3-clause",
"hash": 7946766743356371000,
"line_mean": 35.5977859779,
"line_max": 104,
"alpha_frac": 0.6593063118,
"autogenerated": false,
"ra... |
#$Id: simPIRDetect.py,v 1.2 2005/07/19 17:47:46 phoebusc Exp $
# First, run in a separate window:
# build/pc/main.exe -b=1 -gui 5 # assuming 5 nodes in your file
# Then, run like this at TestPIRDetectNoReg directory:
# java net.tinyos.sim.SimDriver -nosf -script "simPIRDetect.py" -scriptargs "filename simLogName"
#... | {
"repo_name": "fresskarma/tinyos-1.x",
"path": "contrib/nestfe/nesc/apps/TestPIRDetectNoReg/simPIRDetect.py",
"copies": "2",
"size": "7929",
"license": "bsd-3-clause",
"hash": -6831259501337374000,
"line_mean": 33.9295154185,
"line_max": 102,
"alpha_frac": 0.6570815992,
"autogenerated": false,
"r... |
""" Some trivial classes for testing to serialize structures out
to different forms of XML. """
import types
class XMLLanguageSerializer(object):
""" Translates into similarly structured XML or HTML given
tags at init time."""
def __init__(self, header, footer, listStart, listEnd,
listItem, d... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/utils/simplexml.py",
"copies": "1",
"size": "7217",
"license": "bsd-3-clause",
"hash": 5331411732904994000,
"line_mean": 34.0339805825,
"line_max": 79,
"alpha_frac": 0.4187335458,
"autogenerated": false,
"ratio": 4.397928092626447,
"config_... |
# $Id: sip.py 48 2008-05-27 17:31:15Z yardley $
# -*- coding: utf-8 -*-
"""Session Initiation Protocol."""
from __future__ import absolute_import
from . import http
class Request(http.Request):
"""SIP request.
TODO: Longer class information....
Attributes:
__hdr__: Header fields of SIP request.... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/sip.py",
"copies": "3",
"size": "1173",
"license": "apache-2.0",
"hash": -5386231364248902000,
"line_mean": 22.46,
"line_max": 83,
"alpha_frac": 0.494458653,
"autogenerated": false,
"ratio": 3.3706896551724137,
"c... |
# $Id: SiteHierarchy.py,v 1.1 2001/10/11 03:25:54 tavis_rudd Exp $
"""Create menus and crumbs from a site hierarchy.
You define the site hierarchy as lists/tuples. Each location in the hierarchy
is a (url, description) tuple. Each list has the base URL/text in the 0
position, and all the children coming after it. A... | {
"repo_name": "dragondjf/QMarkdowner",
"path": "Cheetah/Tools/SiteHierarchy.py",
"copies": "16",
"size": "5871",
"license": "mit",
"hash": 7941337664225572000,
"line_mean": 34.3674698795,
"line_max": 81,
"alpha_frac": 0.5244421734,
"autogenerated": false,
"ratio": 4.2512671976828385,
"config_te... |
"""$Id: skipDays.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... | {
"repo_name": "canwe/NewsBlur",
"path": "vendor/feedvalidator/skipDays.py",
"copies": "16",
"size": "1294",
"license": "mit",
"hash": 4532562503811512000,
"line_mean": 33.0526315789,
"line_max": 104,
"alpha_frac": 0.6537867079,
"autogenerated": false,
"ratio": 3.0736342042755345,
"config_test":... |
"""$Id: skipHours.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"
fro... | {
"repo_name": "dosiecki/NewsBlur",
"path": "vendor/feedvalidator/skipHours.py",
"copies": "16",
"size": "1363",
"license": "mit",
"hash": -6129460164247129000,
"line_mean": 31.4523809524,
"line_max": 102,
"alpha_frac": 0.6404988995,
"autogenerated": false,
"ratio": 3.1697674418604653,
"config_t... |
# $Id: smb.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Server Message Block."""
from __future__ import print_function
from __future__ import absolute_import
from . import dpkt
# https://msdn.microsoft.com/en-us/library/ee441774.aspx
SMB_FLAGS_LOCK_AND_READ_OK = 0x01
SMB_FLAGS_BUF_AVAIL = 0x02
SM... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/smb.py",
"copies": "3",
"size": "2804",
"license": "apache-2.0",
"hash": -8795794963718097000,
"line_mean": 26.2233009709,
"line_max": 154,
"alpha_frac": 0.5602710414,
"autogenerated": false,
"ratio": 2.635338345864... |
"""
smtps.py - A Python SMTP Server. Listens on a socket for RFC821
messages. As each message is processed, methods on the class
SMTPServerInterface are called. Applications should sub-class this and
specialize the methods to suit. The default implementation does
nothing.
The usage pattern is to subclass SMTPServerI... | {
"repo_name": "clashboom/carol",
"path": "app/smtps.py",
"copies": "1",
"size": "9059",
"license": "apache-2.0",
"hash": -2053761207242857500,
"line_mean": 30.5644599303,
"line_max": 119,
"alpha_frac": 0.582183464,
"autogenerated": false,
"ratio": 4.046002679767754,
"config_test": false,
"has... |
""" $Id: SOAP.py,v 1.2 2000/03/13 22:32:35 kmacleod Exp $
SOAP.py implements the Simple Object Access Protocol
<http://develop.com/SOAP/>
"""
from StringIO import StringIO
from ScarabMarshal import *
from xml.sax import saxlib, saxexts
from types import *
import string
import base64
# just constants
DICT = "dict"
... | {
"repo_name": "mworks/mworks",
"path": "supporting_libs/scarab/Scarab-0.1.00d19/python/SOAP.py",
"copies": "1",
"size": "8690",
"license": "mit",
"hash": -8138549652893928000,
"line_mean": 27.3061889251,
"line_max": 73,
"alpha_frac": 0.5602991945,
"autogenerated": false,
"ratio": 3.51964358039692... |
# $Id: sshmanhole.py 105 2008-04-02 19:39:49Z mp $
# This code modified from source originaly found at
# http://buildbot.net/repos/trunk/buildbot/manhole.py
#
"""
This code modified from source originaly found at
http://buildbot.net/repos/trunk/buildbot/manhole.py
"""
import os.path
import binascii, base64
from twiste... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/plugins/support/sshmanhole.py",
"copies": "1",
"size": "7363",
"license": "bsd-3-clause",
"hash": 7821584598727583000,
"line_mean": 37.1502590674,
"line_max": 79,
"alpha_frac": 0.6413146815,
"autogenerated": false,
"ratio": 4.224325874928285,... |
# $Id: ssl.py 46 2008-05-27 02:08:12Z jon.oberheide $
"""Secure Sockets Layer / Transport Layer Security."""
import dpkt
class SSL2(dpkt.Packet):
__hdr__ = (
('len', 'H', 0),
('msg', 's', ''),
('pad', 's', ''),
)
def unpack(self, buf):
dpkt.Packet.unpack(self, buf)
... | {
"repo_name": "ashumeow/pcaphar",
"path": "src/third_party/dpkt/dpkt/ssl.py",
"copies": "10",
"size": "2100",
"license": "apache-2.0",
"hash": 7132666103386646000,
"line_mean": 27.7671232877,
"line_max": 76,
"alpha_frac": 0.539047619,
"autogenerated": false,
"ratio": 2.9411764705882355,
"config... |
"""Secure Sockets Layer / Transport Layer Security."""
import dpkt
import ssl_ciphersuites
import struct
import binascii
import traceback
import datetime
#
# Note from April 2011: cde...@gmail.com added code that parses SSL3/TLS messages more in depth.
#
# Jul 2012: afleenor@google.com modified and extended SSL supp... | {
"repo_name": "pquerna/tls-client-hello-stats",
"path": "third_party/dpkt/dpkt/ssl.py",
"copies": "1",
"size": "20961",
"license": "apache-2.0",
"hash": 4592996065288656000,
"line_mean": 33.935,
"line_max": 518,
"alpha_frac": 0.64348075,
"autogenerated": false,
"ratio": 3.276692199468501,
"conf... |
"""
Standalone file Reader for the reStructuredText markup syntax.
"""
__docformat__ = 'reStructuredText'
from docutils import frontend, readers
from docutils.transforms import frontmatter, references, misc
class Reader(readers.Reader):
supported = ('standalone',)
"""Contexts this reader supports."""
... | {
"repo_name": "clumsy/intellij-community",
"path": "python/helpers/py2only/docutils/readers/standalone.py",
"copies": "49",
"size": "2328",
"license": "apache-2.0",
"hash": 7674145993452743000,
"line_mean": 35.375,
"line_max": 78,
"alpha_frac": 0.616838488,
"autogenerated": false,
"ratio": 4.4342... |
"""
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": "neumerance/cloudloon2",
"path": ".venv/lib/python2.7/site-packages/docutils/readers/standalone.py",
"copies": "197",
"size": "2340",
"license": "apache-2.0",
"hash": 6805392908729219000,
"line_mean": 34.4545454545,
"line_max": 78,
"alpha_frac": 0.6175213675,
"autogenerated": false,
... |
"""
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": "rimbalinux/MSISDNArea",
"path": "docutils/readers/standalone.py",
"copies": "2",
"size": "2406",
"license": "bsd-3-clause",
"hash": -5714764106682946000,
"line_mean": 34.4545454545,
"line_max": 78,
"alpha_frac": 0.6005818786,
"autogenerated": false,
"ratio": 4.50561797752809,
"co... |
# $Id: startup.py,v 1.1 2011/03/22 02:43:52 paus Exp $
import FWCore.ParameterSet.Config as cms
process = cms.Process('FILEFI')
# import of standard configurations
process.load('Configuration/StandardSequences/Services_cff')
process.load('FWCore/MessageService/MessageLogger_cfi')
process.load('Configuration.Standard... | {
"repo_name": "cpausmit/Kraken",
"path": "filefi/020/startup.py",
"copies": "1",
"size": "1764",
"license": "mit",
"hash": 8202309571245573000,
"line_mean": 35,
"line_max": 154,
"alpha_frac": 0.7783446712,
"autogenerated": false,
"ratio": 2.9747048903878586,
"config_test": true,
"has_no_keywo... |
"""
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": "umitproject/tease-o-matic",
"path": "docutils/statemachine.py",
"copies": "8",
"size": "55215",
"license": "bsd-3-clause",
"hash": -2549302872578249000,
"line_mean": 36.2319622387,
"line_max": 80,
"alpha_frac": 0.5871230644,
"autogenerated": false,
"ratio": 4.394349383207322,
"co... |
"""
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": "rimbalinux/LMD3",
"path": "docutils/statemachine.py",
"copies": "2",
"size": "56698",
"license": "bsd-3-clause",
"hash": 6025836991004962000,
"line_mean": 36.2319622387,
"line_max": 80,
"alpha_frac": 0.5717661999,
"autogenerated": false,
"ratio": 4.482055335968379,
"config_test":... |
# $Id: statemachine.py 6388 2010-08-13 12:24:34Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A finite state machine specialized for regular-expression-based text filters,
this module defines the following classes:
- `StateMachine`, a state m... | {
"repo_name": "akiokio/centralfitestoque",
"path": "src/.pycharm_helpers/docutils/statemachine.py",
"copies": "1",
"size": "57006",
"license": "bsd-2-clause",
"hash": 8387044142694240000,
"line_mean": 36.3809836066,
"line_max": 80,
"alpha_frac": 0.5857453601,
"autogenerated": false,
"ratio": 4.38... |
# $Id: statemachine.py 7037 2011-05-19 08:56:27Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A finite state machine specialized for regular-expression-based text filters,
this module defines the following classes:
- `StateMachine`, a state m... | {
"repo_name": "johngian/remo",
"path": "vendor-local/lib/python/docutils/statemachine.py",
"copies": "6",
"size": "57172",
"license": "bsd-3-clause",
"hash": -4942795082218577000,
"line_mean": 36.3917593198,
"line_max": 80,
"alpha_frac": 0.5861260757,
"autogenerated": false,
"ratio": 4.3863740985... |
# $Id: statemachine.py 7037 2011-05-19 08:56:27Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A finite state machine specialized for regular-expression-based text filters,
this module defines the following classes:
- `StateMachine`, a... | {
"repo_name": "cuongthai/cuongthai-s-blog",
"path": "docutils/statemachine.py",
"copies": "2",
"size": "58701",
"license": "bsd-3-clause",
"hash": -5418455314101009000,
"line_mean": 36.3917593198,
"line_max": 80,
"alpha_frac": 0.5708590995,
"autogenerated": false,
"ratio": 4.4751848745902265,
"... |
# $Id: statemachine.py 7320 2012-01-19 22:33:02Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A finite state machine specialized for regular-expression-based text filters,
this module defines the following classes:
- `StateMachine`, a state m... | {
"repo_name": "neumerance/deploy",
"path": ".venv/lib/python2.7/site-packages/docutils/statemachine.py",
"copies": "4",
"size": "57566",
"license": "apache-2.0",
"hash": 150045733607720580,
"line_mean": 36.4291287386,
"line_max": 80,
"alpha_frac": 0.5861967133,
"autogenerated": false,
"ratio": 4.... |
# $Id: statemachine.py 7464 2012-06-25 13:16:03Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A finite state machine specialized for regular-expression-based text filters,
this module defines the following classes:
- `StateMachine`, a state m... | {
"repo_name": "xfournet/intellij-community",
"path": "python/helpers/py3only/docutils/statemachine.py",
"copies": "44",
"size": "57608",
"license": "apache-2.0",
"hash": 8160966043027777000,
"line_mean": 36.4564369311,
"line_max": 95,
"alpha_frac": 0.5864116095,
"autogenerated": false,
"ratio": 4... |
"""
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": "spreeker/democracygame",
"path": "external_apps/docutils-snapshot/build/lib/docutils/parsers/rst/states.py",
"copies": "2",
"size": "126631",
"license": "bsd-3-clause",
"hash": -813603456845239900,
"line_mean": 41.0980718085,
"line_max": 80,
"alpha_frac": 0.5464459729,
"autogenerated... |
"""
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": "rimbalinux/LMD3",
"path": "docutils/parsers/rst/states.py",
"copies": "2",
"size": "129629",
"license": "bsd-3-clause",
"hash": -8870795672387852000,
"line_mean": 41.0947473404,
"line_max": 80,
"alpha_frac": 0.5337848784,
"autogenerated": false,
"ratio": 4.470427975307791,
"confi... |
"""
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": "akiokio/centralfitestoque",
"path": "src/.pycharm_helpers/docutils/parsers/rst/states.py",
"copies": "1",
"size": "129130",
"license": "bsd-2-clause",
"hash": 7157528635440201000,
"line_mean": 41.2822527832,
"line_max": 86,
"alpha_frac": 0.5473786107,
"autogenerated": false,
"ratio... |
"""
This is the ``docutils.parsers.rst.states`` module, the core of
the reStructuredText parser. It defines the following:
:Classes:
- `RSTStateMachine`: reStructuredText parser's entry point.
- `NestedStateMachine`: recursive StateMachine.
- `RSTState`: reStructuredText State superclass.
- `Inliner`... | {
"repo_name": "paaschpa/badcomputering",
"path": "docutils/parsers/rst/states.py",
"copies": "6",
"size": "129221",
"license": "bsd-3-clause",
"hash": -8601686546023138000,
"line_mean": 41.2705266601,
"line_max": 81,
"alpha_frac": 0.5474032858,
"autogenerated": false,
"ratio": 4.36749247980532,
... |
"""
This is the ``docutils.parsers.rst.states`` module, the core of
the reStructuredText parser. It defines the following:
:Classes:
- `RSTStateMachine`: reStructuredText parser's entry point.
- `NestedStateMachine`: recursive StateMachine.
- `RSTState`: reStructuredText State superclass.
- ... | {
"repo_name": "cuongthai/cuongthai-s-blog",
"path": "docutils/parsers/rst/states.py",
"copies": "2",
"size": "132278",
"license": "bsd-3-clause",
"hash": -5155641622815298000,
"line_mean": 41.2705266601,
"line_max": 81,
"alpha_frac": 0.5347525666,
"autogenerated": false,
"ratio": 4.43930597039970... |
"""
This is the ``docutils.parsers.rst.states`` module, the core of
the reStructuredText parser. It defines the following:
:Classes:
- `RSTStateMachine`: reStructuredText parser's entry point.
- `NestedStateMachine`: recursive StateMachine.
- `RSTState`: reStructuredText State superclass.
- `Inliner`... | {
"repo_name": "neumerance/deploy",
"path": ".venv/lib/python2.7/site-packages/docutils/parsers/rst/states.py",
"copies": "4",
"size": "128822",
"license": "apache-2.0",
"hash": -4708381589462039000,
"line_mean": 41.2505739587,
"line_max": 93,
"alpha_frac": 0.5474297868,
"autogenerated": false,
"r... |
"""A widget class, which can display information of any kind using a
stack technique.
"""
from datetime import datetime
from Container import Container
from Constants import *
from StyleInformation import StyleInformation
import base
_TIMER = 50
class StatusBar (Container):
"""StatusBar () -> StatusBar
A w... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/StatusBar.py",
"copies": "1",
"size": "13618",
"license": "bsd-2-clause",
"hash": 4715660061696632000,
"line_mean": 34.7427821522,
"line_max": 79,
"alpha_frac": 0.5925245998,
"autogenerated": false,
"ratio": 4.356365962891875,
"config_tes... |
# $Id: stp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Spanning Tree Protocol."""
from __future__ import print_function
from __future__ import absolute_import
from . import dpkt
class STP(dpkt.Packet):
"""Spanning Tree Protocol.
TODO: Longer class information....
Attributes:
... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/stp.py",
"copies": "3",
"size": "1938",
"license": "bsd-3-clause",
"hash": 2394489361608326700,
"line_mean": 21.0227272727,
"line_max": 185,
"alpha_frac": 0.5092879257,
"autogenerated": false,
"ratio": 2.841642228739003,
"config_test": false,
"has_no_... |
# $Id: stp.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Spanning Tree Protocol."""
import dpkt
class STP(dpkt.Packet):
__hdr__ = (
('proto_id', 'H', 0),
('v', 'B', 0),
('type', 'B', 0),
('flags', 'B', 0),
('root_id', '8s', ''),
('root_path', 'I',... | {
"repo_name": "lkash/test",
"path": "dpkt/stp.py",
"copies": "6",
"size": "1695",
"license": "bsd-3-clause",
"hash": -9215599178636895000,
"line_mean": 21.012987013,
"line_max": 184,
"alpha_frac": 0.4955752212,
"autogenerated": false,
"ratio": 2.707667731629393,
"config_test": false,
"has_no_... |
# TODO: make font caching much more elegant
"""String drawing functions with font caching capabilities."""
from pygame import font as PygameFont
from Constants import *
__font_cache = {}
def create_file_font (fontfile, size, style=FONT_STYLE_NORMAL):
"""create_file_font (...) -> Font
Creates a new font fr... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/draw/String.py",
"copies": "1",
"size": "9513",
"license": "bsd-2-clause",
"hash": -5981090804328193000,
"line_mean": 40.7236842105,
"line_max": 79,
"alpha_frac": 0.6959949543,
"autogenerated": false,
"ratio": 3.9687108886107634,
"config_test": f... |
""" Useful structures and classes to replace or supplement
core Python structures.
"""
import types
from optparse import OptionParser
class ReadOnlyDict(dict):
""" A dictionary that has entries that may not be
overwritten once assigned UNLESS the key has been explicitly
defined as re-writeable by adding it to th... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/utils/structs.py",
"copies": "1",
"size": "4879",
"license": "bsd-3-clause",
"hash": 3196404754636769300,
"line_mean": 35.1481481481,
"line_max": 82,
"alpha_frac": 0.6081164173,
"autogenerated": false,
"ratio": 4.096557514693535,
"config_te... |
# $Id: stun.py 47 2008-05-27 02:10:00Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Simple Traversal of UDP through NAT."""
from __future__ import print_function
from __future__ import absolute_import
import struct
from . import dpkt
# STUN - RFC 3489
# http://tools.ietf.org/html/rfc3489
# Each packet has a 20 byte he... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/stun.py",
"copies": "3",
"size": "2822",
"license": "bsd-3-clause",
"hash": -3040369323651185000,
"line_mean": 26.1346153846,
"line_max": 139,
"alpha_frac": 0.635719348,
"autogenerated": false,
"ratio": 2.3615062761506276,
"config_test": false,
"has_n... |
# $Id: stun.py 47 2008-05-27 02:10:00Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Simple Traversal of UDP through NAT."""
import struct
import dpkt
# STUN - RFC 3489
# http://tools.ietf.org/html/rfc3489
# Each packet has a 20 byte header followed by 0 or more attribute TLVs.
# Message Types
BINDING_REQUEST = 0x0001
... | {
"repo_name": "bpanneton/dpkt",
"path": "dpkt/stun.py",
"copies": "6",
"size": "1666",
"license": "bsd-3-clause",
"hash": -7848825107995579000,
"line_mean": 22.1388888889,
"line_max": 138,
"alpha_frac": 0.6368547419,
"autogenerated": false,
"ratio": 2.6236220472440945,
"config_test": false,
"... |
"""Style class for widgets."""
import os.path, copy
from UserDict import IterableUserDict
from Constants import *
from StyleInformation import StyleInformation
# Import the default theme engine path.
import sys
sys.path.append (DEFAULTDATADIR)
from themes import default
class WidgetStyle (IterableUserDict):
"""... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/Style.py",
"copies": "1",
"size": "25289",
"license": "bsd-2-clause",
"hash": -3234399560509615000,
"line_mean": 39.0142405063,
"line_max": 83,
"alpha_frac": 0.57499308,
"autogenerated": false,
"ratio": 4.482275788727402,
"config_test": f... |
"""Simple observer subject class."""
from IObserver import IObserver
class Subject (object):
"""Subject (name) -> Subject
A class matching the subscriptable Subject of the observer pattern.
The Subject class allows other classes to be notified whenever its
state(s) change. It has an unique name whi... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/events/Subject.py",
"copies": "1",
"size": "5465",
"license": "bsd-2-clause",
"hash": 98646055335057380,
"line_mean": 37.7588652482,
"line_max": 78,
"alpha_frac": 0.6386093321,
"autogenerated": false,
"ratio": 4.627434377646063,
"config_test": fa... |
"""
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": "amith01994/intellij-community",
"path": "python/helpers/docutils/parsers/rst/tableparser.py",
"copies": "60",
"size": "20328",
"license": "apache-2.0",
"hash": 2825528233025261600,
"line_mean": 37.72,
"line_max": 80,
"alpha_frac": 0.5160369933,
"autogenerated": false,
"ratio": 4.13... |
"""
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": "rimbalinux/MSISDNArea",
"path": "docutils/parsers/rst/tableparser.py",
"copies": "2",
"size": "20853",
"license": "bsd-3-clause",
"hash": 2542611895427078000,
"line_mean": 37.72,
"line_max": 80,
"alpha_frac": 0.5030451254,
"autogenerated": false,
"ratio": 4.228959643074427,
"conf... |
"""
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": "LEXmono/q",
"path": "docutils/parsers/rst/tableparser.py",
"copies": "4",
"size": "21041",
"license": "apache-2.0",
"hash": 2748175589781108000,
"line_mean": 37.6783088235,
"line_max": 79,
"alpha_frac": 0.5171807424,
"autogenerated": false,
"ratio": 4.147644391878573,
"config_tes... |
"""Widget class, which places its children in a table grid"""
from Container import Container
from Constants import *
import base
class Table (Container):
"""Table (rows, cols) -> Table
A container widget, which packs its children in a table like manner.
The Table class is a layout container, which pac... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/Table.py",
"copies": "1",
"size": "13705",
"license": "bsd-2-clause",
"hash": -8869222119175977000,
"line_mean": 35.5466666667,
"line_max": 79,
"alpha_frac": 0.5842393287,
"autogenerated": false,
"ratio": 4.330173775671406,
"config_test":... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nodes, statemachine, utils
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
class Table... | {
"repo_name": "spreeker/democracygame",
"path": "external_apps/docutils-snapshot/build/lib/docutils/parsers/rst/directives/tables.py",
"copies": "2",
"size": "19722",
"license": "bsd-3-clause",
"hash": -2562131729814650400,
"line_mean": 42.9242761693,
"line_max": 87,
"alpha_frac": 0.5469019369,
"au... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import csv
import os.path
import sys
from docutils import io, nodes, statemachine, utils
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
from docutils.utils import SystemMessagePropagation
class Table(... | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "python/helpers/py2only/docutils/parsers/rst/directives/tables.py",
"copies": "5",
"size": "19735",
"license": "apache-2.0",
"hash": -7019802616764362000,
"line_mean": 43.2488789238,
"line_max": 87,
"alpha_frac": 0.5478591335,
"autogenerated": fal... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nodes, statemachine, utils
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
class Table... | {
"repo_name": "gnuhub/intellij-community",
"path": "python/helpers/docutils/parsers/rst/directives/tables.py",
"copies": "49",
"size": "19736",
"license": "apache-2.0",
"hash": 6214422261960931000,
"line_mean": 43.1521252796,
"line_max": 87,
"alpha_frac": 0.5478313741,
"autogenerated": false,
"ra... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nodes, statemachine, utils
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directive... | {
"repo_name": "rimbalinux/MSISDNArea",
"path": "docutils/parsers/rst/directives/tables.py",
"copies": "2",
"size": "20183",
"license": "bsd-3-clause",
"hash": -2367258288781750300,
"line_mean": 43.1521252796,
"line_max": 87,
"alpha_frac": 0.53569836,
"autogenerated": false,
"ratio": 4.33483676975... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nodes, statemachine, utils
from docutils.error_reporting import SafeString
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Directive
from docu... | {
"repo_name": "paaschpa/badcomputering",
"path": "docutils/parsers/rst/directives/tables.py",
"copies": "6",
"size": "20048",
"license": "bsd-3-clause",
"hash": -1399652706849805000,
"line_mean": 43.1585903084,
"line_max": 87,
"alpha_frac": 0.5478850758,
"autogenerated": false,
"ratio": 4.2837606... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nodes, statemachine, utils
from docutils.error_reporting import SafeString
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Dire... | {
"repo_name": "ajaxsys/dict-admin",
"path": "docutils/parsers/rst/directives/tables.py",
"copies": "2",
"size": "20502",
"license": "bsd-3-clause",
"hash": 7466090107343006000,
"line_mean": 43.1585903084,
"line_max": 87,
"alpha_frac": 0.5357526095,
"autogenerated": false,
"ratio": 4.3353774582364... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nodes, statemachine, utils
from docutils.error_reporting import SafeString
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Directive
from docu... | {
"repo_name": "mcr/ietfdb",
"path": "docutils/parsers/rst/directives/tables.py",
"copies": "4",
"size": "20048",
"license": "bsd-3-clause",
"hash": -5380220328328392000,
"line_mean": 43.1585903084,
"line_max": 87,
"alpha_frac": 0.5478850758,
"autogenerated": false,
"ratio": 4.283760683760684,
"... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import csv
import os.path
import sys
from docutils import io, nodes, statemachine, utils
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
from docutils.utils import SystemMessagePropagation
from docutils.... | {
"repo_name": "GunoH/intellij-community",
"path": "python/helpers/py3only/docutils/parsers/rst/directives/tables.py",
"copies": "44",
"size": "20399",
"license": "apache-2.0",
"hash": 8683139622190201000,
"line_mean": 43.636761488,
"line_max": 87,
"alpha_frac": 0.5500759841,
"autogenerated": false,... |
"""
Directives for table elements.
"""
__docformat__ = 'reStructuredText'
import sys
import os.path
import csv
from docutils import io, nodes, statemachine, utils
from docutils.utils.error_reporting import SafeString
from docutils.utils import SystemMessagePropagation
from docutils.parsers.rst import Directive
fro... | {
"repo_name": "gauribhoite/personfinder",
"path": "env/site-packages/docutils/parsers/rst/directives/tables.py",
"copies": "86",
"size": "20344",
"license": "apache-2.0",
"hash": -8469382722651313000,
"line_mean": 43.4192139738,
"line_max": 87,
"alpha_frac": 0.549252851,
"autogenerated": false,
"... |
# $Id: tcp.py 42 2007-08-02 22:38:47Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Transmission Control Protocol."""
from __future__ import print_function
from __future__ import absolute_import
from . import dpkt
from .decorators import deprecated
from .compat import compat_ord
# TCP control flags
TH_FIN = 0x01 # end ... | {
"repo_name": "dimagol/trex-core",
"path": "scripts/external_libs/dpkt-1.9.1/dpkt/tcp.py",
"copies": "3",
"size": "4972",
"license": "apache-2.0",
"hash": -8298814106276147000,
"line_mean": 29.1333333333,
"line_max": 114,
"alpha_frac": 0.5808527755,
"autogenerated": false,
"ratio": 2.854190585533... |
# $Id: tcp.py 42 2007-08-02 22:38:47Z jon.oberheide $
# -*- coding: utf-8 -*-
"""Transmission Control Protocol."""
import dpkt
from decorators import deprecated
# TCP control flags
TH_FIN = 0x01 # end of data
TH_SYN = 0x02 # synchronize sequence numbers
TH_RST = 0x04 # reset connection
TH_PUSH = 0x08 # push
TH_AC... | {
"repo_name": "yangbh/dpkt",
"path": "dpkt/tcp.py",
"copies": "1",
"size": "4732",
"license": "bsd-3-clause",
"hash": 7463971067034633000,
"line_mean": 25.1491712707,
"line_max": 69,
"alpha_frac": 0.6090448014,
"autogenerated": false,
"ratio": 2.482686253934942,
"config_test": true,
"has_no_k... |
# $Id: tcp.py 42 2007-08-02 22:38:47Z jon.oberheide $
"""Transmission Control Protocol."""
import dpkt
# TCP control flags
TH_FIN = 0x01 # end of data
TH_SYN = 0x02 # synchronize sequence numbers
TH_RST = 0x04 # reset connection
TH_PUSH = 0x08 # push
TH_ACK = 0x10 # acknowledgment number set
TH_URG = 0x20... | {
"repo_name": "somethingnew2-0/CS642-HW2",
"path": "dpkt/tcp.py",
"copies": "15",
"size": "3226",
"license": "mit",
"hash": 329827176222244740,
"line_mean": 31.9183673469,
"line_max": 75,
"alpha_frac": 0.5790452573,
"autogenerated": false,
"ratio": 2.6705298013245033,
"config_test": false,
"h... |
# $Id: telnet.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Telnet."""
from __future__ import print_function
from __future__ import absolute_import
import struct
from .compat import compat_ord
IAC = 255 # interpret as command:
DONT = 254 # you are not to use option
DO = 253 # please, you use opt... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/telnet.py",
"copies": "3",
"size": "3943",
"license": "bsd-3-clause",
"hash": 5144583564762358000,
"line_mean": 44.8488372093,
"line_max": 824,
"alpha_frac": 0.6134922648,
"autogenerated": false,
"ratio": 2.3085480093676813,
"config_test": false,
"has... |
# $Id: telnet.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Telnet."""
IAC = 255 # interpret as command:
DONT = 254 # you are not to use option
DO = 253 # please, you use option
WONT = 252 # I won't use option
WILL = 251 # I will use option
SB = 250 # interpret as subnegotiation
GA = 249 # you... | {
"repo_name": "yangbh/dpkt",
"path": "dpkt/telnet.py",
"copies": "6",
"size": "3761",
"license": "bsd-3-clause",
"hash": -2542551538582526000,
"line_mean": 46.025,
"line_max": 823,
"alpha_frac": 0.6048923159,
"autogenerated": false,
"ratio": 2.303123086344152,
"config_test": false,
"has_no_ke... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.