text stringlengths 0 1.05M | meta dict |
|---|---|
# $Id: TemplateExpand.py 1053 2008-07-30 12:03:29Z landrgr1 $
#
# Created by Greg Landrum August, 2006
#
#
from __future__ import print_function
from rdkit import RDLogger as logging
logger = logging.logger()
logger.setLevel(logging.INFO)
from rdkit import Chem
from rdkit.Chem import Crippen
from rdkit.Chem import All... | {
"repo_name": "jandom/rdkit",
"path": "rdkit/Chem/ChemUtils/TemplateExpand.py",
"copies": "1",
"size": "14480",
"license": "bsd-3-clause",
"hash": 5554955400484881000,
"line_mean": 30.9646799117,
"line_max": 101,
"alpha_frac": 0.5944060773,
"autogenerated": false,
"ratio": 3.5885997521685256,
"... |
# $Id: TemplateExpand.py 1053 2008-07-30 12:03:29Z landrgr1 $
#
# Created by Greg Landrum August, 2006
#
#
from rdkit import RDLogger as logging
logger = logging.logger()
logger.setLevel(logging.INFO)
from rdkit import Chem
from rdkit.Chem import Crippen
from rdkit.Chem import AllChem
from rdkit.Chem.ChemUtils.AlignDe... | {
"repo_name": "rdkit/rdkit-orig",
"path": "rdkit/Chem/ChemUtils/TemplateExpand.py",
"copies": "2",
"size": "14044",
"license": "bsd-3-clause",
"hash": 3479630471818914000,
"line_mean": 30.0022075055,
"line_max": 113,
"alpha_frac": 0.597692965,
"autogenerated": false,
"ratio": 3.601025641025641,
... |
# $Id: TestAll.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for WebBrick library functions (Functions.py)
# See http://pyunit.sourceforge.net/pyunit.html
#
import sys, unittest, logging,re, StringIO, os, logging, subprocess
from os.path import normpath, abspath
sys.path.append(".")
from TestConfig import Tes... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "src/AdminUIHandler/tests/TestAdminInterfaceRestfulAPIs.py",
"copies": "2",
"size": "2640",
"license": "mit",
"hash": 1540063455722585600,
"line_mean": 32.0125,
"line_max": 153,
"alpha_frac": 0.6367424242,
"autogenerated": false,
"ratio": 4.1640... |
# $Id: TestAll.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for WebBrick library functions (Functions.py)
# See http://pyunit.sourceforge.net/pyunit.html
#
import sys, unittest, logging, zipfile, re, StringIO, os, logging, cgi
from os.path import normpath, abspath
from rdflib import URIRef
sys.path.append("..... | {
"repo_name": "bhavanaananda/DataStage",
"path": "src/SubmitDatasetHandler/tests/TestGetDatasetMetadataHandler.py",
"copies": "2",
"size": "2943",
"license": "mit",
"hash": -5524040749212299000,
"line_mean": 32.0786516854,
"line_max": 160,
"alpha_frac": 0.6598708801,
"autogenerated": false,
"rati... |
# $Id: TestAll.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for WebBrick library functions (Functions.py)
# See http://pyunit.sourceforge.net/pyunit.html
#
import sys, unittest, logging
# Add main library directory to python path
sys.path.append("../..")
import TestFilePrivateArea
import TestFileSharedArea... | {
"repo_name": "bhavanaananda/DataStage",
"path": "test/FileShare/tests/TestAll.py",
"copies": "1",
"size": "1864",
"license": "mit",
"hash": -4946280272011135000,
"line_mean": 35.5490196078,
"line_max": 77,
"alpha_frac": 0.688304721,
"autogenerated": false,
"ratio": 3.932489451476793,
"config_t... |
# $Id: TestAll.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for WebBrick library functions (Functions.py)
# See http://pyunit.sourceforge.net/pyunit.html
#
import sys, unittest, logging, zipfile, re
from os.path import normpath
# Add main library directory to python path
sys.path.append("../..")
from MiscLi... | {
"repo_name": "bhavanaananda/DataStage",
"path": "test/ZipTest/tests/ZipDirectory.py",
"copies": "2",
"size": "1078",
"license": "mit",
"hash": 2145389650007453000,
"line_mean": 24.0697674419,
"line_max": 60,
"alpha_frac": 0.6103896104,
"autogenerated": false,
"ratio": 3.47741935483871,
"config... |
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2011-2013, Graham Klyne, University of Oxford"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
import sys
import unittest
sys.path.append("../..")
from MiscUtils.Combinators import *
class TestCombinators(unittest.TestCase):
... | {
"repo_name": "wf4ever/ro-manager",
"path": "src/MiscUtils/tests/TestCombinators.py",
"copies": "1",
"size": "1447",
"license": "mit",
"hash": 8561528178223112000,
"line_mean": 25.3090909091,
"line_max": 75,
"alpha_frac": 0.6233586731,
"autogenerated": false,
"ratio": 3.1593886462882095,
"confi... |
# $Id: TestCombinators.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for WebBrick library combinators
# See http://pyunit.sourceforge.net/pyunit.html
#
import sys
import unittest
sys.path.append("../..")
from MiscLib.Combinators import *
class TestCombinators(unittest.TestCase):
def setUp(self):
... | {
"repo_name": "bhavanaananda/DataStage",
"path": "src/AdminUIHandler/MiscLib/tests/TestCombinators.py",
"copies": "8",
"size": "1261",
"license": "mit",
"hash": 4510261431196569600,
"line_mean": 23.7254901961,
"line_max": 68,
"alpha_frac": 0.6201427439,
"autogenerated": false,
"ratio": 3.20865139... |
# $Id: TestFileCIFSwriteHTTPread.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for TestFileCIFSwriteHTTPread module
#
import os
import sys
import httplib
import urllib2
import unittest
import subprocess
sys.path.append("../..")
from TestConfig import TestConfig
import TestHttpUtils
class TestFileCIFSwrite... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "test/FileShare/tests/TestFileCIFSwriteHTTPread.py",
"copies": "2",
"size": "11091",
"license": "mit",
"hash": 6368491128259084000,
"line_mean": 40.5393258427,
"line_max": 138,
"alpha_frac": 0.6344784059,
"autogenerated": false,
"ratio": 4.04043... |
# $Id: TestFilecollabArea.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for access to collab file area
#
import os
import sys
import httplib
import urllib2
import unittest
import subprocess
sys.path.append("../..")
from TestConfig import TestConfig
import TestCifsUtils
import TestHttpUtils
class TestFileC... | {
"repo_name": "bhavanaananda/DataStage",
"path": "test/FileShare/tests/TestFileCollabArea.py",
"copies": "1",
"size": "32069",
"license": "mit",
"hash": -4896925657843513000,
"line_mean": 47.7386018237,
"line_max": 160,
"alpha_frac": 0.6756369079,
"autogenerated": false,
"ratio": 3.96893564356435... |
# $Id: TestFileDefaultArea.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for TestFileDefaultArea module
#
import os
import sys
import httplib
import urllib2
import unittest
import subprocess
sys.path.append("../..")
from TestConfig import TestConfig
class TestFileDefaultArea(unittest.TestCase):
def s... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "test/FileShare/tests/TestFileDefaultArea.py",
"copies": "2",
"size": "2735",
"license": "mit",
"hash": 1829731080190174500,
"line_mean": 24.3240740741,
"line_max": 105,
"alpha_frac": 0.6,
"autogenerated": false,
"ratio": 4.106606606606607,
"c... |
# $Id: TestFilePrivateArea.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for access to private file area
#
import os
import sys
import httplib
import urllib2
import unittest
import subprocess
sys.path.append("../..")
from TestConfig import TestConfig
import TestCifsUtils
import TestHttpUtils
class TestFil... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "test/FileShare/tests/TestFileSilkGroup.py",
"copies": "2",
"size": "32472",
"license": "mit",
"hash": -7191330283020728000,
"line_mean": 47.4656716418,
"line_max": 148,
"alpha_frac": 0.6728566149,
"autogenerated": false,
"ratio": 3.989679321784... |
# $Id: TestFileUserAPublic.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for FileUserAPublic module
#
import os
import sys
import httplib
import urllib2
import unittest
import subprocess
sys.path.append("../..")
from TestConfig import TestConfig
# Initialize authenticated HTTP connection opener
passman = u... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "test/FileShare/tests/TestFileUserAPublic.py",
"copies": "2",
"size": "10033",
"license": "mit",
"hash": -5924021365602610000,
"line_mean": 32.4433333333,
"line_max": 143,
"alpha_frac": 0.5947373667,
"autogenerated": false,
"ratio": 3.9956192751... |
# $Id: TestHttpSession.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for WebBrick library functions (Functions.py)
# See http://pyunit.sourceforge.net/pyunit.html
#
import sys, unittest, logging, zipfile, os, re
from os.path import normpath
#Add main library directory to python path
###sys.path.append("../..... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "src/SubmitDatasetHandler/tests/TestHttpSession.py",
"copies": "2",
"size": "4942",
"license": "mit",
"hash": 5834073734519868000,
"line_mean": 43.9272727273,
"line_max": 203,
"alpha_frac": 0.6513557264,
"autogenerated": false,
"ratio": 4.064144... |
from unittest import TestCase
from peloton.utils.structs import ReadOnlyDict
from peloton.utils.structs import FilteredOptionParser
from peloton.utils.structs import RoundRobinList
from types import ListType
class Test_ReadOnlyDict(TestCase):
def test_readOnlyDict(self):
d = ReadOnlyDict()
d['x'] ... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/utils/tests/testStructs.py",
"copies": "1",
"size": "4475",
"license": "bsd-3-clause",
"hash": -3986547263422614500,
"line_mean": 36.6134453782,
"line_max": 75,
"alpha_frac": 0.6004469274,
"autogenerated": false,
"ratio": 3.5098039215686274,
... |
# $Id: test_symrec.py 1527 2006-05-07 16:41:16Z mu $
from tests import TestCase, add
from yasm import SymbolTable, Expression, YasmError
class TSymbolTable(TestCase):
def setUp(self):
self.symtab = SymbolTable()
def test_keys(self):
self.assertEquals(len(self.symtab.keys()), 0)
self.sy... | {
"repo_name": "relokin/parsec",
"path": "pkgs/tools/yasm/src/tools/python-yasm/tests/test_symrec.py",
"copies": "5",
"size": "3029",
"license": "bsd-3-clause",
"hash": -5842638296220731000,
"line_mean": 36.3950617284,
"line_max": 79,
"alpha_frac": 0.6229778805,
"autogenerated": false,
"ratio": 3.... |
__author__ = "Graham Klyne (GK@ACM.ORG)"
__copyright__ = "Copyright 2011-2013, Graham Klyne, University of Oxford"
__license__ = "MIT (http://opensource.org/licenses/MIT)"
import sys
import logging
import unittest
sys.path.append("../..")
# Test class
class TestExample(unittest.TestCase):
def setUp(... | {
"repo_name": "wf4ever/ro-manager",
"path": "src/MiscUtils/tests/TestTestUtils.py",
"copies": "1",
"size": "1801",
"license": "mit",
"hash": 1977335408395965200,
"line_mean": 21.5125,
"line_max": 77,
"alpha_frac": 0.5813436979,
"autogenerated": false,
"ratio": 4.002222222222223,
"config_test": ... |
# $Id: TestTestUtils.py 1047 2009-01-15 14:48:58Z graham $
#
# Test test runner utiltities
#
import sys
import logging
import unittest
sys.path.append("../..")
# Test class
class TestExample(unittest.TestCase):
def setUp(self):
return
def tearDown(self):
return
# Test cases
def te... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "test/MiscLib/tests/TestTestUtils.py",
"copies": "8",
"size": "1615",
"license": "mit",
"hash": 3488159745750955000,
"line_mean": 20.25,
"line_max": 77,
"alpha_frac": 0.573993808,
"autogenerated": false,
"ratio": 4.194805194805195,
"config_tes... |
# $Id: TestUtils.py 1047 2009-01-15 14:48:58Z graham $
#
# Support functions for running different test suites
#
# Test suites are selected using a command line argument:
#
# Test classes are:
# "unit" These are stand-alone tests that all complete within a few
# seceonds and do not depend ... | {
"repo_name": "bhavanaananda/DataStage",
"path": "test/MiscLib/TestUtils.py",
"copies": "2",
"size": "4223",
"license": "mit",
"hash": -5496629479650041000,
"line_mean": 40,
"line_max": 109,
"alpha_frac": 0.6057305233,
"autogenerated": false,
"ratio": 4.168805528134254,
"config_test": true,
"... |
""" Test functions in peloton.utils """
from unittest import TestCase
from peloton.utils import chop
from peloton.utils import getClassFromString
from peloton.utils import deCompound
class Test_littleUtils(TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_chop(self):... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/utils/tests/testUtils.py",
"copies": "1",
"size": "1490",
"license": "bsd-3-clause",
"hash": 3504891701961555000,
"line_mean": 30.0625,
"line_max": 80,
"alpha_frac": 0.6060402685,
"autogenerated": false,
"ratio": 3.3940774487471526,
"config... |
# $Id: TestWebDAVAccess.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for FileAccess module
#
import os
# Make sure python-kerberos package is installed
import kerberos
import sys
import httplib
import urllib2
import urllib2_kerberos
import re
import base64
import unittest
from urlparse import urlparse
sys.p... | {
"repo_name": "tectronics/admiral-jiscmrd",
"path": "test/FileShare/tests/TestWebDAVAccess.py",
"copies": "1",
"size": "7831",
"license": "mit",
"hash": -8734683012315999000,
"line_mean": 29.7098039216,
"line_max": 143,
"alpha_frac": 0.5844719704,
"autogenerated": false,
"ratio": 3.89795918367346... |
"""$Id: text_html.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"
"""... | {
"repo_name": "manderson23/NewsBlur",
"path": "vendor/feedvalidator/formatter/text_html.py",
"copies": "16",
"size": "3945",
"license": "mit",
"hash": -6186030426157160000,
"line_mean": 33.9115044248,
"line_max": 133,
"alpha_frac": 0.5972116603,
"autogenerated": false,
"ratio": 3.3920894239036974... |
"""$Id: text_xml.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"
"""O... | {
"repo_name": "waltharius/NewsBlur",
"path": "vendor/feedvalidator/formatter/text_xml.py",
"copies": "16",
"size": "1709",
"license": "mit",
"hash": 6056413344371686000,
"line_mean": 29.5178571429,
"line_max": 94,
"alpha_frac": 0.6003510825,
"autogenerated": false,
"ratio": 3.438631790744467,
"... |
# $Id: tftp.py 23 2006-11-08 15:45:33Z dugsong $
"""Trivial File Transfer Protocol."""
import struct
import dpkt
# Opcodes
OP_RRQ = 1 # read request
OP_WRQ = 2 # write request
OP_DATA = 3 # data packet
OP_ACK = 4 # acknowledgment
OP_ERR = 5 # error code
# Error codes
EUNDEF = 0... | {
"repo_name": "somethingnew2-0/CS642-HW2",
"path": "dpkt/tftp.py",
"copies": "15",
"size": "1718",
"license": "mit",
"hash": 8157684574969928000,
"line_mean": 30.2363636364,
"line_max": 74,
"alpha_frac": 0.5279394645,
"autogenerated": false,
"ratio": 3.1465201465201464,
"config_test": false,
... |
# $Id: TimedeltaField.py 638 2009-10-09 13:06:17Z tguettler $
# $HeadURL: svn+ssh://svnserver/svn/djangotools/trunk/dbfields/TimedeltaField.py $
# http://www.djangosnippets.org/snippets/1060/
# Python
import datetime
# Django
from django import forms
from django.db import models
from django.utils.safestring import m... | {
"repo_name": "TigerND/dtx-core",
"path": "src/utils/snippets/TimedeltaField.py",
"copies": "1",
"size": "7378",
"license": "mit",
"hash": 277049678864985600,
"line_mean": 36.0753768844,
"line_max": 141,
"alpha_frac": 0.6150718352,
"autogenerated": false,
"ratio": 3.82279792746114,
"config_test... |
# "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": "tools/python/pytos/util/Timer.py",
"copies": "1",
"size": "2324",
"license": "bsd-3-clause",
"hash": 5328570893840340000,
"line_mean": 35.3125,
"line_max": 81,
"alpha_frac": 0.6940619621,
"autogenerated": false,
"ratio": 3.4947368421052634,
"confi... |
# $Id: tns.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Transparent Network Substrate."""
from __future__ import print_function
from __future__ import absolute_import
from . import dpkt
class TNS(dpkt.Packet):
"""Transparent Network Substrate.
TODO: Longer class information....
Attri... | {
"repo_name": "smutt/dpkt",
"path": "dpkt/tns.py",
"copies": "3",
"size": "1324",
"license": "bsd-3-clause",
"hash": -8422618580284051000,
"line_mean": 23.0727272727,
"line_max": 82,
"alpha_frac": 0.5196374622,
"autogenerated": false,
"ratio": 2.8230277185501067,
"config_test": false,
"has_no... |
# $Id: tns.py 23 2006-11-08 15:45:33Z dugsong $
# -*- coding: utf-8 -*-
"""Transparent Network Substrate."""
import dpkt
class TNS(dpkt.Packet):
__hdr__ = (
('length', 'H', 0),
('pktsum', 'H', 0),
('type', 'B', 0),
('rsvd', 'B', 0),
('hdrsum', 'H', 0),
('msg', '0s'... | {
"repo_name": "hexcap/dpkt",
"path": "dpkt/tns.py",
"copies": "6",
"size": "1079",
"license": "bsd-3-clause",
"hash": -8576773103628848000,
"line_mean": 23.5227272727,
"line_max": 81,
"alpha_frac": 0.4958294717,
"autogenerated": false,
"ratio": 2.6381418092909534,
"config_test": false,
"has_n... |
"""A button widget, which can retain its state."""
from ButtonBase import ButtonBase
from Label import Label
from Constants import *
import base
class ToggleButton (ButtonBase):
"""ToggleButton (text) -> ToggleButton
A button widget class, which can retain its state.
The default ToggleButton widget loo... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/ToggleButton.py",
"copies": "1",
"size": "10058",
"license": "bsd-2-clause",
"hash": -2289239302563515400,
"line_mean": 35.4420289855,
"line_max": 78,
"alpha_frac": 0.5896798568,
"autogenerated": false,
"ratio": 4.498211091234347,
"config... |
"""Tooltip Window class."""
from BaseWidget import BaseWidget
from Constants import *
from StyleInformation import StyleInformation
import base
class TooltipWindow (BaseWidget):
"""TooltipWindow (text) -> TooltipWindow
A widget class that displays a line of text using a certain color.
The TooltipWindow... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/TooltipWindow.py",
"copies": "1",
"size": "4749",
"license": "bsd-2-clause",
"hash": -2738372936177544000,
"line_mean": 36.6904761905,
"line_max": 78,
"alpha_frac": 0.6727732154,
"autogenerated": false,
"ratio": 4.467544684854186,
"config... |
# $Id: Train.py 36 2010-01-14 19:20:52Z tlev $
# -*- coding: iso-8859-1 -*-
"""
Created on 20. okt. 2009
Original code written by Odd A. Hjelkrem, this was later changed by Tomas Levin by segmenting into
functions and a change to numerical integration was used to calculate energy in the acceleration phase.
Format of ... | {
"repo_name": "tomasle/semba",
"path": "SEMBA/TRAIN.py",
"copies": "1",
"size": "18348",
"license": "bsd-2-clause",
"hash": 6965378125238010000,
"line_mean": 39.6829268293,
"line_max": 173,
"alpha_frac": 0.7032919119,
"autogenerated": false,
"ratio": 3.01677079907925,
"config_test": false,
"h... |
"""A Renderer that plays nicely with a threadedselectreactor from
Twisted.
Many thanks to Bob Ippolito for his work on threadedselectreactor and
the pygamedemo.py he created.
Written by Ben Olsen <ben@rickstranger.com>
"""
from pygame import QUIT, event
from pygame import error as PygameError
from pygame import tim... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/TwistedRenderer.py",
"copies": "1",
"size": "5915",
"license": "bsd-2-clause",
"hash": -7184643629516985000,
"line_mean": 34.6325301205,
"line_max": 78,
"alpha_frac": 0.6475063398,
"autogenerated": false,
"ratio": 4.501522070015221,
"conf... |
"""
Transforms needed by most or all documents:
- `Decorations`: Generate a document's header & footer.
- `Messages`: Placement of system messages stored in
`nodes.document.transform_messages`.
- `TestMessages`: Like `Messages`, used on test runs.
- `FinalReferences`: Resolve remaining references.
"""
__docformat_... | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "python/helpers/py2only/docutils/transforms/universal.py",
"copies": "5",
"size": "6541",
"license": "apache-2.0",
"hash": -2266339016640107800,
"line_mean": 31.3811881188,
"line_max": 78,
"alpha_frac": 0.5801865158,
"autogenerated": false,
"rat... |
"""$Id: uri.py 511 2006-03-07 05:19:10Z rubys $"""
# This is working code, with tests, but not yet integrated into validation.
# (Change unique in validators.py to use Uri(self.value), rather than the
# plain value.)
# Ideally, this would be part of the core Python classes.
# It's probably not ready for deployment, b... | {
"repo_name": "Suninus/NewsBlur",
"path": "vendor/feedvalidator/uri.py",
"copies": "18",
"size": "4858",
"license": "mit",
"hash": 7089723332173912000,
"line_mean": 19.8497854077,
"line_max": 106,
"alpha_frac": 0.5317002882,
"autogenerated": false,
"ratio": 2.9388989715668483,
"config_test": fa... |
# "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/Util.py",
"copies": "2",
"size": "2323",
"license": "bsd-3-clause",
"hash": -2885064478895254000,
"line_mean": 35.296875,
"line_max": 81,
"alpha_frac": 0.6939302626,
"autogenerated": false,
"ratio": 3.493233082706767,
"confi... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import os.path
import types
import warnings
import unicodedata
from types import StringType, UnicodeType
from docutils import ApplicationError, DataError
from docutils import nodes
class SystemM... | {
"repo_name": "PatrickKennedy/Sybil",
"path": "docutils/utils.py",
"copies": "2",
"size": "21280",
"license": "bsd-2-clause",
"hash": -3848641082463060000,
"line_mean": 34.8853288364,
"line_max": 79,
"alpha_frac": 0.6027255639,
"autogenerated": false,
"ratio": 4.310309904800486,
"config_test": ... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import os.path
import warnings
import unicodedata
from docutils import ApplicationError, DataError
from docutils import nodes
from docutils._compat import b
class SystemMessage(ApplicationError)... | {
"repo_name": "spreeker/democracygame",
"path": "external_apps/docutils-snapshot/build/lib/docutils/utils.py",
"copies": "2",
"size": "22277",
"license": "bsd-3-clause",
"hash": -7065284704467101000,
"line_mean": 34.8727858293,
"line_max": 79,
"alpha_frac": 0.6051981865,
"autogenerated": false,
"... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import os.path
import warnings
import unicodedata
from docutils import ApplicationError, DataError
from docutils import nodes
from docutils._compat import b
class SystemMessage(... | {
"repo_name": "rimbalinux/LMD3",
"path": "docutils/utils.py",
"copies": "2",
"size": "23796",
"license": "bsd-3-clause",
"hash": 7530035242062554000,
"line_mean": 34.7222222222,
"line_max": 79,
"alpha_frac": 0.5884182215,
"autogenerated": false,
"ratio": 4.401775804661487,
"config_test": false,... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import os
import os.path
import sys
import unicodedata
import warnings
from docutils import ApplicationError, DataError
from docutils import nodes
from docutils._compat import bytes
class SystemMessage(ApplicationE... | {
"repo_name": "Soya93/Extract-Refactoring",
"path": "python/helpers/py2only/docutils/utils.py",
"copies": "5",
"size": "24559",
"license": "apache-2.0",
"hash": -8878203385654736000,
"line_mean": 35.3298816568,
"line_max": 84,
"alpha_frac": 0.6036076387,
"autogenerated": false,
"ratio": 4.3413470... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import os.path
import warnings
import unicodedata
from docutils import ApplicationError, DataError
from docutils import nodes
from docutils._compat import bytes
class SystemMessage(ApplicationEr... | {
"repo_name": "alphafoobar/intellij-community",
"path": "python/helpers/docutils/utils.py",
"copies": "40",
"size": "24558",
"license": "apache-2.0",
"hash": 2989172734709786600,
"line_mean": 35.3822222222,
"line_max": 84,
"alpha_frac": 0.6036322176,
"autogenerated": false,
"ratio": 4.34193776520... |
"""
Miscellaneous utilities for the documentation utilities.
"""
__docformat__ = 'reStructuredText'
import sys
import os
import os.path
import warnings
import unicodedata
from docutils import ApplicationError, DataError
from docutils import nodes
from docutils.error_reporting import ErrorOutput, SafeSt... | {
"repo_name": "cuongthai/cuongthai-s-blog",
"path": "docutils/utils.py",
"copies": "2",
"size": "26343",
"license": "bsd-3-clause",
"hash": 5664519041428383000,
"line_mean": 35.7948350072,
"line_max": 84,
"alpha_frac": 0.591428463,
"autogenerated": false,
"ratio": 4.364314115308151,
"config_tes... |
"""$Id: validators.py 749 2007-04-02 15:45:49Z rubys $"""
__author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>"
__version__ = "$Revision: 749 $"
__date__ = "$Date: 2007-04-02 15:45:49 +0000 (Mon, 02 Apr 2007) $"
__copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim"
fr... | {
"repo_name": "manderson23/NewsBlur",
"path": "vendor/feedvalidator/validators.py",
"copies": "16",
"size": "36588",
"license": "mit",
"hash": 5543148569904567000,
"line_mean": 40.3423728814,
"line_max": 168,
"alpha_frac": 0.6007160818,
"autogenerated": false,
"ratio": 2.9535033903777848,
"conf... |
"""A proxy class for widgets, that need to be scrolled."""
from pygame import Rect
from Bin import Bin
from BaseWidget import BaseWidget
from StyleInformation import StyleInformation
import base
class ViewPort (Bin):
"""ViewPort (widget) -> ViewPort
A proxy class for widgets, which need scrolling abilities.... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/ViewPort.py",
"copies": "1",
"size": "9380",
"license": "bsd-2-clause",
"hash": -1127505410490381600,
"line_mean": 37.4426229508,
"line_max": 79,
"alpha_frac": 0.6045842217,
"autogenerated": false,
"ratio": 4.451827242524917,
"config_test... |
# $Id: views.py 1d272b240620 2009/09/08 11:37:42 jpartogi $
from django.shortcuts import get_object_or_404
from django.views.generic import list_detail
from tagging.models import Tag, TaggedItem
from simple_blog.forms import *
from simple_blog.models import *
def entry_list(request, category_name=None, tag_name=None... | {
"repo_name": "jpartogi/django-simple-blog",
"path": "simple_blog/views.py",
"copies": "1",
"size": "1120",
"license": "bsd-3-clause",
"hash": -3122685985055882000,
"line_mean": 40.5185185185,
"line_max": 91,
"alpha_frac": 0.64375,
"autogenerated": false,
"ratio": 3.7583892617449663,
"config_te... |
# $Id: views.py 22499ef140b8 2009/09/05 12:08:01 jpartogi $
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils.translation import ugettext as _
from django.contrib import messages
from .forms import ContactForm
from .models import EmailError
def form(request):... | {
"repo_name": "jpartogi/django-contact-form",
"path": "contact_form/views.py",
"copies": "1",
"size": "1057",
"license": "bsd-3-clause",
"hash": -1434012539266767600,
"line_mean": 33.0967741935,
"line_max": 90,
"alpha_frac": 0.6291390728,
"autogenerated": false,
"ratio": 4.177865612648222,
"con... |
"""
V (Vgroup) API (:mod:`pyhdf.V`)
===============================
A module of the pyhdf package implementing the V (Vgroup)
API of the NCSA HDF4 library.
Introduction
------------
V is one of the modules composing pyhdf, a python package implementing
the NCSA HDF library and letting one manage HDF files from withi... | {
"repo_name": "fhs/python-hdf4",
"path": "pyhdf/V.py",
"copies": "1",
"size": "53723",
"license": "mit",
"hash": -4833337207382305000,
"line_mean": 33.0665821179,
"line_max": 76,
"alpha_frac": 0.5839398395,
"autogenerated": false,
"ratio": 4.266100214404828,
"config_test": false,
"has_no_keyw... |
"""
V (Vgroup) API (:mod:`pyhdf.V`)
===============================
A module of the pyhdf package implementing the V (Vgroup)
API of the NCSA HDF4 library.
(see: hdf.ncsa.uiuc.edu)
Introduction
------------
V is one of the modules composing pyhdf, a python package implementing
the NCSA HDF library and letting one ma... | {
"repo_name": "ryfeus/lambda-packs",
"path": "HDF4_H5_NETCDF/source2.7/pyhdf/V.py",
"copies": "1",
"size": "53727",
"license": "mit",
"hash": 1570582760324417000,
"line_mean": 33.0475285171,
"line_max": 76,
"alpha_frac": 0.5838405271,
"autogenerated": false,
"ratio": 4.261004044729955,
"config_... |
# $Id: vrrp.py 23 2006-11-08 15:45:33Z dugsong $
"""Virtual Router Redundancy Protocol."""
import dpkt
class VRRP(dpkt.Packet):
__hdr__ = (
('vtype', 'B', 0x21),
('vrid', 'B', 0),
('priority', 'B', 0),
('count', 'B', 0),
('atype', 'B', 0),
('advtime', 'B', 0),
... | {
"repo_name": "ashumeow/pcaphar",
"path": "src/third_party/dpkt/dpkt/vrrp.py",
"copies": "11",
"size": "1266",
"license": "apache-2.0",
"hash": -5168097775377628000,
"line_mean": 25.9361702128,
"line_max": 67,
"alpha_frac": 0.4763033175,
"autogenerated": false,
"ratio": 2.910344827586207,
"conf... |
# $Id: vrrp.py 88 2013-03-05 19:43:17Z andrewflnr@gmail.com $
# -*- coding: utf-8 -*-
"""Virtual Router Redundancy Protocol."""
import dpkt
from decorators import deprecated
class VRRP(dpkt.Packet):
__hdr__ = (
('_v_type', 'B', 0x21),
('vrid', 'B', 0),
('priority', 'B', 0),
('coun... | {
"repo_name": "jack8daniels2/dpkt",
"path": "dpkt/vrrp.py",
"copies": "6",
"size": "2520",
"license": "bsd-3-clause",
"hash": 6537049532573989000,
"line_mean": 22.5514018692,
"line_max": 90,
"alpha_frac": 0.4916666667,
"autogenerated": false,
"ratio": 2.9577464788732395,
"config_test": true,
... |
# $Id: vrrp.py 88 2013-03-05 19:43:17Z andrewflnr@gmail.com $
"""Virtual Router Redundancy Protocol."""
import dpkt
class VRRP(dpkt.Packet):
__hdr__ = (
('vtype', 'B', 0x21),
('vrid', 'B', 0),
('priority', 'B', 0),
('count', 'B', 0),
('atype', 'B', 0),
('advtime', ... | {
"repo_name": "somethingnew2-0/CS642-HW2",
"path": "dpkt/vrrp.py",
"copies": "2",
"size": "1285",
"license": "mit",
"hash": -4080898741693309000,
"line_mean": 26.3404255319,
"line_max": 67,
"alpha_frac": 0.4824902724,
"autogenerated": false,
"ratio": 2.9204545454545454,
"config_test": false,
... |
# $Id: VS.py,v 1.4 2005-07-14 01:36:41 gosselin_a Exp $
# $Log: not supported by cvs2svn $
# Revision 1.3 2004/08/02 17:06:20 gosselin
# pyhdf-0.7.2
#
# Revision 1.2 2004/08/02 15:36:04 gosselin
# pyhdf-0.7-1
#
# Author: Andre Gosselin
# Maurice-Lamontagne Institute
# gosselina@dfo-mpo.gc.ca
"""
VS... | {
"repo_name": "fhs/pyhdf",
"path": "pyhdf/VS.py",
"copies": "1",
"size": "95695",
"license": "mit",
"hash": -1736249271370498600,
"line_mean": 35.7069428462,
"line_max": 89,
"alpha_frac": 0.5589424735,
"autogenerated": false,
"ratio": 4.324806797125683,
"config_test": false,
"has_no_keywords"... |
"""
VTK inside Blender module.
This module provides code so that polydata from vtk can
be used inside of blender.
Python needs to find the vtk stuff and this module in order
for this to work, and you can either a) set your PYTHONPATH
in your environment, or you can b) hardcode your vtk path's
... | {
"repo_name": "unterweg/peanoclaw",
"path": "blender/VTKBlender.py",
"copies": "2",
"size": "11458",
"license": "bsd-3-clause",
"hash": 4189661370885415000,
"line_mean": 26.1516587678,
"line_max": 78,
"alpha_frac": 0.668528539,
"autogenerated": false,
"ratio": 2.762295081967213,
"config_test": ... |
# $Id: vtpWRT.py 2401 2006-12-20 20:29:15Z cpbotha $
from module_base import ModuleBase
from module_mixins import FilenameViewModuleMixin
import module_utils
import types
from modules.viewers.slice3dVWRmodules.selectedPoints import outputSelectedPoints
class points_reader(FilenameViewModuleMixin, ModuleBase):
def... | {
"repo_name": "chrisidefix/devide",
"path": "modules/readers/points_reader.py",
"copies": "7",
"size": "1795",
"license": "bsd-3-clause",
"hash": -2391106429337194500,
"line_mean": 26.196969697,
"line_max": 81,
"alpha_frac": 0.6139275766,
"autogenerated": false,
"ratio": 4.0610859728506785,
"co... |
# $Id: vtpWRT.py 2401 2006-12-20 20:29:15Z cpbotha $
from module_base import ModuleBase
from module_mixins import FilenameViewModuleMixin
import module_utils
import types
class points_writer(FilenameViewModuleMixin, ModuleBase):
def __init__(self, module_manager):
# call parent constructor
Module... | {
"repo_name": "fvpolpeta/devide",
"path": "modules/writers/points_writer.py",
"copies": "7",
"size": "1825",
"license": "bsd-3-clause",
"hash": -3016213426091495000,
"line_mean": 27.0769230769,
"line_max": 77,
"alpha_frac": 0.5945205479,
"autogenerated": false,
"ratio": 4.0198237885462555,
"con... |
# $Id: WebInputMixin.py,v 1.10 2006/01/06 21:56:54 tavis_rudd Exp $
"""Provides helpers for Template.webInput(), a method for importing web
transaction variables in bulk. See the docstring of webInput for full details.
Meta-Data
================================================================================
Author: ... | {
"repo_name": "bcui6611/healthchecker",
"path": "Cheetah/Utils/WebInputMixin.py",
"copies": "16",
"size": "3869",
"license": "apache-2.0",
"hash": -24264941728142090,
"line_mean": 36.931372549,
"line_max": 80,
"alpha_frac": 0.6141121737,
"autogenerated": false,
"ratio": 3.9319105691056913,
"con... |
"""Toplevel Window class."""
from BaseWidget import BaseWidget
from Bin import Bin
from Container import Container
from Constants import *
from StyleInformation import StyleInformation
import base
class Window (Bin):
"""Window (title=None) -> Window
A widget class, that implements a window-like behaviour.
... | {
"repo_name": "prim/ocempgui",
"path": "ocempgui/widgets/Window.py",
"copies": "1",
"size": "12717",
"license": "bsd-2-clause",
"hash": -4046622043938781000,
"line_mean": 35.2307692308,
"line_max": 79,
"alpha_frac": 0.5672721554,
"autogenerated": false,
"ratio": 4.487297106563162,
"config_test"... |
""" The PelotonWorker and related classes are defined in this module.
A worker is started by a PSC. Separating
workers from PSC by process ensures that user code running in a service
is unable to derail a PSC or cause such issues that may interfere with
other services. In this way a service may even make use of the ... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/worker.py",
"copies": "1",
"size": "10346",
"license": "bsd-3-clause",
"hash": -1462811722712096000,
"line_mean": 38.3384030418,
"line_max": 98,
"alpha_frac": 0.6112507249,
"autogenerated": false,
"ratio": 4.321637426900585,
"config_test": ... |
# $Id: /work/modules/celementtree/selftest.py 1128 2005-12-16T21:57:13.668520Z Fredrik $
# elementtree selftest program
# this test script uses Python's "doctest" module to check that the
# *test script* works as expected.
import sys, StringIO
import cElementTree as ElementTree
def unserialize(text):
import St... | {
"repo_name": "prats226/python-amazon-product-api-0.2.8",
"path": "tests/build/cElementTree/selftest.py",
"copies": "1",
"size": "18060",
"license": "bsd-3-clause",
"hash": -4323028278743729000,
"line_mean": 26.1987951807,
"line_max": 94,
"alpha_frac": 0.5677740864,
"autogenerated": false,
"ratio... |
"""
Auxiliary transforms mainly to be used by Writer components.
This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::
from docutils import writers
from docutils.transforms import writers
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, la... | {
"repo_name": "kdwink/intellij-community",
"path": "python/helpers/py2only/docutils/transforms/writer_aux.py",
"copies": "5",
"size": "2553",
"license": "apache-2.0",
"hash": -9057898937839919000,
"line_mean": 28.0113636364,
"line_max": 77,
"alpha_frac": 0.5871523698,
"autogenerated": false,
"rat... |
"""
Auxiliary transforms mainly to be used by Writer components.
This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::
from docutils import writers
from docutils.transforms import writers
"""
__docformat__ = 'reStructuredText'
from docutils imp... | {
"repo_name": "rimbalinux/MSISDNArea",
"path": "docutils/transforms/writer_aux.py",
"copies": "2",
"size": "2648",
"license": "bsd-3-clause",
"hash": -5466556861300985000,
"line_mean": 28.0909090909,
"line_max": 77,
"alpha_frac": 0.5679758308,
"autogenerated": false,
"ratio": 4.661971830985915,
... |
"""
Auxiliary transforms mainly to be used by Writer components.
This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::
from docutils import writers
from docutils.transforms import writers
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, ut... | {
"repo_name": "chirilo/remo",
"path": "vendor-local/lib/python/docutils/transforms/writer_aux.py",
"copies": "6",
"size": "2602",
"license": "bsd-3-clause",
"hash": 7546197465620724000,
"line_mean": 28.5681818182,
"line_max": 79,
"alpha_frac": 0.5810914681,
"autogenerated": false,
"ratio": 4.6381... |
"""
Auxiliary transforms mainly to be used by Writer components.
This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::
from docutils import writers
from docutils.transforms import writers
"""
__docformat__ = 'reStructuredText'
from docutils imp... | {
"repo_name": "ajaxsys/dict-admin",
"path": "docutils/transforms/writer_aux.py",
"copies": "2",
"size": "2690",
"license": "bsd-3-clause",
"hash": -1782652355335115800,
"line_mean": 28.5681818182,
"line_max": 79,
"alpha_frac": 0.5620817844,
"autogenerated": false,
"ratio": 4.727592267135325,
"c... |
"""
Auxiliary transforms mainly to be used by Writer components.
This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::
from docutils import writers
from docutils.transforms import writers
"""
__docformat__ = 'reStructuredText'
from docutils import nodes, la... | {
"repo_name": "suncycheng/intellij-community",
"path": "python/helpers/py3only/docutils/transforms/writer_aux.py",
"copies": "44",
"size": "2602",
"license": "apache-2.0",
"hash": -1307849995317812500,
"line_mean": 28.5681818182,
"line_max": 79,
"alpha_frac": 0.5818601076,
"autogenerated": false,
... |
import datetime
import xmlrpclib
from twisted.application import service
from twisted.web import xmlrpc
from peloton.coreio import PelotonRequestInterface
def dump_xmlrpc_date(self, value, write):
# according to spec at http://www.xmlrpc.com/spec XML-RPC date
# is ISO 8601 format e.g. 19980717T14:08:55
dat... | {
"repo_name": "aquamatt/Peloton",
"path": "src/peloton/adapters/xmlrpc.py",
"copies": "1",
"size": "2451",
"license": "bsd-3-clause",
"hash": -103273594877179410,
"line_mean": 37.9047619048,
"line_max": 103,
"alpha_frac": 0.6597307222,
"autogenerated": false,
"ratio": 3.631111111111111,
"config... |
# $('img[src^="https://z2.muscache.com/ac"]').each(function(x, y){console.log(x, y.src);})
from urlparse import urlsplit
from os.path import basename
import urllib2
import re
import os
import json
with open('./input.json') as json_data:
houseNumber = json.load(json_data)['houseNumber']
print houseNumber
... | {
"repo_name": "Jeff-Tian/mybnb",
"path": "batch_download_pic.py",
"copies": "1",
"size": "1274",
"license": "apache-2.0",
"hash": 5873959632851549000,
"line_mean": 27.3111111111,
"line_max": 90,
"alpha_frac": 0.6130298273,
"autogenerated": false,
"ratio": 3.300518134715026,
"config_test": false... |
# $ ipython --gui=wx
# In [1]: %run visualization/plot-2.py
# In [2]: plot("z_dual_1.norms")
from mayavi import mlab
import numpy
import re
def mycolor(x):
"""Returns a color vector (a triple of floats) based on x, where x is
in the range [0, 1].
"""
lut = [
[ 0, 0, 0, 255],
... | {
"repo_name": "FreeON/spammpack",
"path": "spammsand/visualization/plot-2.py",
"copies": "1",
"size": "24103",
"license": "bsd-3-clause",
"hash": -3819621512518133000,
"line_mean": 34.6026587888,
"line_max": 104,
"alpha_frac": 0.4756254408,
"autogenerated": false,
"ratio": 2.9300996839290057,
"... |
# Author: Jamie Caesar
# Twitter: @j_cae
#
# This script will grab the detailed CDP information from a Cisco IOS or NX-OS
# device and export it to a CSV file containing the important information, such
# as Remote Device hostname, model and IP information, in addition to the local
# and remote interfaces that connec... | {
"repo_name": "DN0000/SecureCRT",
"path": "SaveCDPtoCSV.py",
"copies": "1",
"size": "7033",
"license": "apache-2.0",
"hash": -5067805128009831000,
"line_mean": 32.0187793427,
"line_max": 95,
"alpha_frac": 0.6323048486,
"autogenerated": false,
"ratio": 3.8347873500545258,
"config_test": false,
... |
# Author: Jamie Caesar
# Twitter: @j_cae
#
# This script will grab the route table information from a Cisco IOS device
# and export some statistics to a CSV file.
#
# The path where the file is saved is specified in the "savepath" variable in
# the Main() function.
#
# This script is tested on SecureCRT version 7.... | {
"repo_name": "DN0000/SecureCRT",
"path": "GetNextHops.py",
"copies": "1",
"size": "9844",
"license": "apache-2.0",
"hash": -5054337613390694000,
"line_mean": 36.2878787879,
"line_max": 95,
"alpha_frac": 0.5777123121,
"autogenerated": false,
"ratio": 4.0660883932259395,
"config_test": false,
... |
# Author: Jamie Caesar
# Twitter: @j_cae
#
# This SecureCRT script will prompt the user for a command to a Cisco IOS or NX-OS
# device and dump the output to a file. The path where the file is saved is
# specified in the "savepath" variable in the Main() function.
#
# This script is tested on SecureCRT version 7.2 ... | {
"repo_name": "DN0000/SecureCRT",
"path": "SaveOutput.py",
"copies": "1",
"size": "4300",
"license": "apache-2.0",
"hash": -4229957184237279700,
"line_mean": 32.8582677165,
"line_max": 87,
"alpha_frac": 0.6595348837,
"autogenerated": false,
"ratio": 3.9741219963031424,
"config_test": false,
"... |
#$language = "python"
#$interface = "1.0"
# Document_Device.py
#
# Description:
# Sends a series of Cisco Show commands one by one as listed in the
# COMMANDS array. The results of each command are captured into a
# variable, and then written to an individual log file (one log file
# for each command).
#
# ... | {
"repo_name": "DN0000/SecureCRT",
"path": "Document_Device.py",
"copies": "1",
"size": "5211",
"license": "apache-2.0",
"hash": -9112977324417495000,
"line_mean": 27.3206521739,
"line_max": 84,
"alpha_frac": 0.7031279985,
"autogenerated": false,
"ratio": 3.3489717223650386,
"config_test": false... |
# $language = "python"
# $interface = "1.0"
# for GCCLABFs01,GCCLABFs02
import os
import csv
import re
def main():
crt.Screen.Synchronous = True
# Create an Excel compatible spreadsheet
fileobj = open('vlanbrief7k.csv', 'wb')
intdesc = open('intdesc7k.csv','rb')
worksheet = csv.writer(fileobj)
intdescws ... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "showvlanbrief_7k.py",
"copies": "1",
"size": "1721",
"license": "artistic-2.0",
"hash": -5224165668528648000,
"line_mean": 25.0757575758,
"line_max": 72,
"alpha_frac": 0.6786751888,
"autogenerated": false,
"ratio": 3.1636029411764706,
"config... |
# $language = "python"
# $interface = "1.0"
# for GCCLABFs01,GCCLABFs02
import os
import csv
#import re
def main():
crt.Screen.Synchronous = True
vid = crt.Dialog.Prompt("Enter vlan id ", "Vlan", "", False)
# Create an Excel compatible spreadsheet
fileobj = open('vlanid'+vid+'_7k.csv', 'ab')
worksheet = csv... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "showvlanidvid_7k.py",
"copies": "1",
"size": "1718",
"license": "artistic-2.0",
"hash": -5789295401713680000,
"line_mean": 25.4307692308,
"line_max": 71,
"alpha_frac": 0.6682188591,
"autogenerated": false,
"ratio": 3.1236363636363635,
"config... |
# $language = "python"
# $interface = "1.0"
# for GCCLABFs01,GCCLABFs02
import os
import csv
#import re
def vlans(vid):
crt.Screen.Synchronous = True
# Create an Excel compatible spreadsheet
fileobj = open('allvlans7k.csv','ab')
intdesc = open('intdesc7k.csv','rb')
worksheet = csv.writer(fileobj)
intdesc... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "allvlanids_7k.py",
"copies": "1",
"size": "1756",
"license": "artistic-2.0",
"hash": 6800028602247554000,
"line_mean": 23.7323943662,
"line_max": 71,
"alpha_frac": 0.666856492,
"autogenerated": false,
"ratio": 3.059233449477352,
"config_test"... |
# $language = "python"
# $interface = "1.0"
# for GCCLABFs01,GCCLABFs02
import os
import csv
def main():
crt.Screen.Synchronous = True
# Create an Excel compatible spreadsheet
filename = crt.Dialog.Prompt("Enter file name to write to: ", "Show Interface Description", "intdesc7k.csv", False)
fileobj = open(file... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "shintdesc_7k.py",
"copies": "1",
"size": "1327",
"license": "artistic-2.0",
"hash": -6550734718966654000,
"line_mean": 24.5192307692,
"line_max": 116,
"alpha_frac": 0.6963074604,
"autogenerated": false,
"ratio": 3.137115839243499,
"config_tes... |
# $language = "python"
# $interface = "1.0"
# for GCCLABVM1,GCCLABVM2
import os
import csv
import re
def main():
crt.Screen.Synchronous = True
vid = crt.Dialog.Prompt("Enter vlan id ", "Vlan", "", False)
# Create an Excel compatible spreadsheet
fileobj = open('vlanid'+vid+'.csv', 'wb')
worksheet = csv.write... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "showvlanidvid_legacy.py",
"copies": "1",
"size": "1679",
"license": "artistic-2.0",
"hash": -7051099530736382000,
"line_mean": 25.234375,
"line_max": 71,
"alpha_frac": 0.6724240619,
"autogenerated": false,
"ratio": 3.18595825426945,
"config_t... |
# $language = "python"
# $interface = "1.0"
# for GCCLABVM1,GCCLABVM2
import os
import csv
def main():
crt.Screen.Synchronous = True
# Create an Excel compatible spreadsheet
filename = crt.Dialog.Prompt("Enter file name to write to: ", "Show Interface Description", "intdesc.csv", False)
fileobj = open(filename... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "shintdesc_legacy.py",
"copies": "1",
"size": "1392",
"license": "artistic-2.0",
"hash": -2626914138821538000,
"line_mean": 23.8571428571,
"line_max": 114,
"alpha_frac": 0.694683908,
"autogenerated": false,
"ratio": 3.185354691075515,
"config_... |
# $language = "python"
# $interface = "1.0"
# for GCCLABVM1,GCCLABVM2
import os
import csv
def vlans(vid):
crt.Screen.Synchronous = True
# Create an Excel compatible spreadsheet
filename = 'allvlans.csv'
fileobj = open(filename, 'ab')
intdesc = open('intdesc.csv','rb')
worksheet = csv.writer(fileobj)
in... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "allvlanids_legacy.py",
"copies": "1",
"size": "1753",
"license": "artistic-2.0",
"hash": 6160089622922742000,
"line_mean": 23.3472222222,
"line_max": 71,
"alpha_frac": 0.6697090702,
"autogenerated": false,
"ratio": 3.119217081850534,
"config_... |
# $language = "python"
# $interface = "1.0"
# for GCCSFRMs01-06, SCCSFRMs01-12
import os
import csv
import re
import sys
import datetime
import msvcrt
int_total10g = 0
int_total1g = 0
def connect(str_hostname, str_username, str_password, csvws_10g, csvws_1g, csvws_pair):
"""
(str, str, str, csv.writer, csv.writer... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "sfrms_iso8601.py",
"copies": "1",
"size": "5485",
"license": "artistic-2.0",
"hash": 6318878909526014000,
"line_mean": 35.5666666667,
"line_max": 147,
"alpha_frac": 0.6958979034,
"autogenerated": false,
"ratio": 2.844917012448133,
"config_tes... |
# $language = "python"
# $interface = "1.0"
# for GCCSFRMs01-06, SCCSFRMs01-12
import os
import csv
import re
import sys
import datetime
import msvcrt
# Port count for GCC or SCC servers
int_xcc_10g = 0
int_xcc_1g = 0
# Port count for all servers
int_total10g = 0
int_total1g = 0
def connect(str_hostname, str_userna... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "sh_int_desc.py",
"copies": "1",
"size": "8153",
"license": "artistic-2.0",
"hash": 87620879255111550,
"line_mean": 36.5714285714,
"line_max": 121,
"alpha_frac": 0.6601251073,
"autogenerated": false,
"ratio": 2.74881995954147,
"config_test": f... |
# $language = "python"
# $interface = "1.0"
# for GCCSFRMs01-06, SCCSFRMs01-12
import os
import csv
import re
import sys
import msvcrt
int_total10g = 0
int_total1g = 0
def connect(str_hostname, str_username, str_password, csvws_10g, csvws_1g, csvws_pair):
"""
(str, str, str, csv.writer, csv.writer) -> None
Conne... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "sfrms_pairs.py",
"copies": "1",
"size": "4716",
"license": "artistic-2.0",
"hash": 15388217250624512,
"line_mean": 33.6764705882,
"line_max": 150,
"alpha_frac": 0.6957167091,
"autogenerated": false,
"ratio": 2.852994555353902,
"config_test": ... |
# $language = "python"
# $interface = "1.0"
# for GCCSFRMs01-06, SCCSFRMs01-12
import os
import csv
import re
import sys
import msvcrt
int_total10g = 0
int_total1g = 0
def connect(str_hostname,str_username,str_password):
# Declaring global variables to count total ports
global int_total10g
global int_total1g
# ... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "shintdesc_sfrms.py",
"copies": "1",
"size": "4287",
"license": "artistic-2.0",
"hash": 3276675791262315500,
"line_mean": 30.2919708029,
"line_max": 150,
"alpha_frac": 0.6906927922,
"autogenerated": false,
"ratio": 2.831571994715984,
"config_t... |
# $language = "python"
# $interface = "1.0"
# for GCCSFRMs01-06, SCCSFRMs01-12
import os
import csv
import re
def connect(hostname,username,password):
# Connect to the session
cmd = "/SSH2 /L %s /PASSWORD %s /C 3DES /M SHA1 %s" % (username, password, hostname+".rns.fg.rbc.com")
crt.Session.Connect(cmd)
crt.Sc... | {
"repo_name": "kelvinongtoronto/SecureCRT",
"path": "shintdesc_gcc_scc.py",
"copies": "1",
"size": "1969",
"license": "artistic-2.0",
"hash": 395250507047055170,
"line_mean": 27.1285714286,
"line_max": 114,
"alpha_frac": 0.6841036059,
"autogenerated": false,
"ratio": 3.0479876160990713,
"config... |
# $language = "python"
# $interface = "1.0"
import os
import sys
import logging
from ConfigParser import NoOptionError
# Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT)
if 'crt' in globals():
script_dir, script_name = os.path.split(crt.ScriptFullName)
if script... | {
"repo_name": "jamiecaesar/SecureCRT",
"path": "s_document_device.py",
"copies": "2",
"size": "9880",
"license": "apache-2.0",
"hash": -70414872157356770,
"line_mean": 49.6666666667,
"line_max": 128,
"alpha_frac": 0.6733805668,
"autogenerated": false,
"ratio": 4.333333333333333,
"config_test": ... |
# $language = "python"
# $interface = "1.0"
import os
import sys
import logging
from datetime import datetime
# Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT)
if 'crt' in globals():
script_dir, script_name = os.path.split(crt.ScriptFullName)
if script_dir not ... | {
"repo_name": "jamiecaesar/SecureCRT",
"path": "m_inventory_report.py",
"copies": "2",
"size": "11982",
"license": "apache-2.0",
"hash": 7648009640914017000,
"line_mean": 45.80859375,
"line_max": 123,
"alpha_frac": 0.6266065765,
"autogenerated": false,
"ratio": 4.071355759429154,
"config_test":... |
# $language = "python"
# $interface = "1.0"
import os
import sys
import logging
import csv
# Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT)
if 'crt' in globals():
script_dir, script_name = os.path.split(crt.ScriptFullName)
if script_dir not in sys.path:
... | {
"repo_name": "jamiecaesar/SecureCRT",
"path": "import_sessions_from_csv.py",
"copies": "3",
"size": "5178",
"license": "apache-2.0",
"hash": -1385163621106916400,
"line_mean": 40.432,
"line_max": 119,
"alpha_frac": 0.551178061,
"autogenerated": false,
"ratio": 4.3330543933054395,
"config_test"... |
# $language = "python"
# $interface = "1.0"
import os
import sys
import logging
# Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT)
if 'crt' in globals():
script_dir, script_name = os.path.split(crt.ScriptFullName)
if script_dir not in sys.path:
sys.path.... | {
"repo_name": "jamiecaesar/SecureCRT",
"path": "s_add_global_config.py",
"copies": "2",
"size": "8289",
"license": "apache-2.0",
"hash": -377276276363865340,
"line_mean": 48.0473372781,
"line_max": 119,
"alpha_frac": 0.6400048257,
"autogenerated": false,
"ratio": 4.308212058212058,
"config_test... |
""" $lic$
Copyright (C) 2016-2020 by Tsinghua University and The Board of Trustees of
Stanford University
This program is free software: you can redistribute it and/or modify it under
the terms of the Modified BSD-3 License as published by the Open Source
Initiative.
This program is distributed in the hope that it wi... | {
"repo_name": "stanford-mast/nn_dataflow",
"path": "nn_dataflow/nns/__init__.py",
"copies": "1",
"size": "3346",
"license": "bsd-3-clause",
"hash": -3860328478447068000,
"line_mean": 33.8541666667,
"line_max": 80,
"alpha_frac": 0.6338912134,
"autogenerated": false,
"ratio": 3.1154562383612663,
... |
""" $lic$
Copyright (c) 2016-2021, Mingyu Gao
This program is free software: you can redistribute it and/or modify it under
the terms of the Modified BSD-3 License as published by the Open Source
Initiative.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the imp... | {
"repo_name": "gaomy3832/easypyplot",
"path": "easypyplot/pdf.py",
"copies": "1",
"size": "2251",
"license": "bsd-3-clause",
"hash": -5261756350559406000,
"line_mean": 35.3064516129,
"line_max": 79,
"alpha_frac": 0.7067969791,
"autogenerated": false,
"ratio": 3.828231292517007,
"config_test": f... |
"""
Create AII FreeIPA plugin
- creates the 'ipa aii' and 'ipa aii_find' commands
"""
import re
from ipalib import Command, Bool, Str
from ipalib.plugins.dns import add_records_for_host
from ipalib.errors import AlreadyActive, AlreadyInactive
class aii(Command): # class name has to be lowercase
"""aii command"... | {
"repo_name": "kwaegema/aii",
"path": "aii-freeipa/src/main/python/aii.py",
"copies": "3",
"size": "8562",
"license": "apache-2.0",
"hash": 8055869638687578000,
"line_mean": 34.3801652893,
"line_max": 125,
"alpha_frac": 0.5568792338,
"autogenerated": false,
"ratio": 3.860234445446348,
"config_t... |
###${MARKDOWN}
# This tutorial is for a basic architecture search using a random searcher.
#
# If running this tutorial with an MPI based communicator, use the
# [launch_mpi_based_search.sh](examples/tutorials/xx.full_search/launch_mpi_based_search.sh)
# script to run the search. Run the script as
# `./examples/tutoria... | {
"repo_name": "negrinho/deep_architect",
"path": "dev/tutorials/full_search/search.py",
"copies": "1",
"size": "6160",
"license": "mit",
"hash": -6946065070931441000,
"line_mean": 46.0229007634,
"line_max": 102,
"alpha_frac": 0.6660714286,
"autogenerated": false,
"ratio": 4.134228187919463,
"co... |
$[/myProject/wsadmin_scripts/preamble.py]
clusterName = '''
$[wasClusterName]
'''.strip()
clusterMembers = '''
$[wasClusterMembers]
'''.strip()
syncNodes = '''
$[wasSyncNodes]
'''.strip()
if not isClusterExists(clusterName):
bailOut("Cluster %s does not exist" % (clusterName))
sys.exit(1)
# Cluster exists, c... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/Cluster/remove_cluster_members.py",
"copies": "1",
"size": "1335",
"license": "apache-2.0",
"hash": 5390117786280776000,
"line_mean": 28.6666666667,
"line_max": 151,
"alpha_frac": 0.6764044944,
"autogen... |
$[/myProject/wsadmin_scripts/preamble.py]
clusterName = '''
$[wasClusterName]
'''.strip()
genUniquePorts = '''
$[wasClusterMembersGenUniquePorts]
'''.strip()
clusterMemberWeight = '''
$[wasClusterMemberWeight]
'''.strip()
membersList = '''
$[wasClusterMembersList]
'''.strip()
syncNodes = '''
$[wasSyncNodes]
'''.st... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/Cluster/create_cluster_members.py",
"copies": "1",
"size": "1496",
"license": "apache-2.0",
"hash": -6887610253830054000,
"line_mean": 26.2,
"line_max": 129,
"alpha_frac": 0.6831550802,
"autogenerated":... |
$[/myProject/wsadmin_scripts/preamble.py]
clusterName = '''
$[wasClusterName]
'''.strip()
preferLocal = '''
$[wasPreferLocal]
'''.strip()
createFirstMember = '''
$[wasCreateFirstClusterMember]
'''.strip()
firstMemberNode = '''
$[wasFirstClusterMemberNode]
'''.strip()
firstMemberName = '''
$[wasFirstClusterMemberNa... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/Cluster/create_cluster.py",
"copies": "1",
"size": "6277",
"license": "apache-2.0",
"hash": -4054412067017351000,
"line_mean": 32.747311828,
"line_max": 157,
"alpha_frac": 0.6888641071,
"autogenerated":... |
$[/myProject/wsadmin_scripts/preamble.py]
scope = '''
$[/myJobStep/tmpl/factoryScope]
'''.strip()
factoryType = '''
$[/myJobStep/tmpl/factoryType]
'''.strip()
# this parameter is responsible for flow
api = '''
$[/myJobStep/tmpl/wasApi]
'''.strip()
requestParams = '''
$[/myJobStep/tmpl/requestParameters]
'''.strip()
... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/JMS/create_or_update_wmq_jms_connection_factory.py",
"copies": "1",
"size": "1427",
"license": "apache-2.0",
"hash": 6992209663415995000,
"line_mean": 22.7833333333,
"line_max": 91,
"alpha_frac": 0.689558... |
$[/myProject/wsadmin_scripts/preamble.py]
scope = '''
$[/myJobStep/tmpl/factoryScope]
'''.strip()
# this parameter is responsible for flow
api = '''
$[/myJobStep/tmpl/wasApi]
'''.strip()
requestParams = '''
$[/myJobStep/tmpl/requestParameters]
'''.strip()
editParams = '''
$[/myJobStep/tmpl/editParameters]
'''.strip... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/JMS/create_or_update_sib_jms_connection_factory.py",
"copies": "1",
"size": "1359",
"license": "apache-2.0",
"hash": -4887193719842915000,
"line_mean": 22.8421052632,
"line_max": 91,
"alpha_frac": 0.69094... |
$[/myProject/wsadmin_scripts/preamble.py]
scope = '''
$[/myJobStep/tmpl/queueScope]
'''.strip()
# this parameter is responsible for flow
api = '''
$[/myJobStep/tmpl/wasApi]
'''.strip()
requestParams = '''
$[/myJobStep/tmpl/requestParameters]
'''.strip()
resName = '''
$[queueAdministrativeName]
'''.strip()
mode = "... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/JMS/create_or_update_jms_queue.py",
"copies": "1",
"size": "1767",
"license": "apache-2.0",
"hash": -2112040736213038300,
"line_mean": 24.9852941176,
"line_max": 78,
"alpha_frac": 0.6644029428,
"autogen... |
$[/myProject/wsadmin_scripts/preamble.py]
scope = '''
$[/myJobStep/tmpl/specScope]
'''.strip()
# this parameter is responsible for flow
api = '''
$[/myJobStep/tmpl/wasApi]
'''.strip()
requestParams = '''
$[/myJobStep/tmpl/requestParameters]
'''.strip()
resName = '''
$[specAdministrativeName]
'''.strip()
mode = "cr... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/JMS/create_or_update_sib_jms_activation_spec.py",
"copies": "1",
"size": "1272",
"license": "apache-2.0",
"hash": -8855119619596951000,
"line_mean": 23,
"line_max": 88,
"alpha_frac": 0.6886792453,
"auto... |
$[/myProject/wsadmin_scripts/preamble.py]
scope = '''
$[/myJobStep/tmpl/topicScope]
'''.strip()
# this parameter is responsible for flow
api = '''
$[/myJobStep/tmpl/wasApi]
'''.strip()
requestParams = '''
$[/myJobStep/tmpl/requestParameters]
'''.strip()
resName = '''
$[topicAdministrativeName]
'''.strip()
mode = "... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/JMS/create_or_update_jms_topic.py",
"copies": "1",
"size": "1767",
"license": "apache-2.0",
"hash": -7928497842262585000,
"line_mean": 24.9852941176,
"line_max": 78,
"alpha_frac": 0.6644029428,
"autogen... |
$[/myProject/wsadmin_scripts/preamble.py]
# start application server jython script.
# properties retrieval section
serversList = '''
$[wasServersList]
'''.strip();
waitTime = '''
$[wasWaitTime]
'''.strip()
# Mandatory parameters validation.
if not serversList:
logError("Missing servers list to be started")
... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/Server/start_application_servers.py",
"copies": "1",
"size": "3379",
"license": "apache-2.0",
"hash": -1481921765869631200,
"line_mean": 32.1274509804,
"line_max": 109,
"alpha_frac": 0.6507842557,
"auto... |
$[/myProject/wsadmin_scripts/preamble.py]
# stop application server jython script.
# properties retrieval section
serversList = '''
$[wasServersList]
'''.strip();
waitTime = '''
$[wasWaitTime]
'''.strip()
# Mandatory parameters validation.
if not serversList:
logError("Missing servers list to be stopped")
... | {
"repo_name": "electric-cloud/EC-WebSphere",
"path": "src/main/resources/project/wsadmin_scripts/Server/stop_application_servers.py",
"copies": "1",
"size": "3371",
"license": "apache-2.0",
"hash": 3906159006067610600,
"line_mean": 32.0490196078,
"line_max": 109,
"alpha_frac": 0.6496588549,
"autoge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.