text
stringlengths
0
1.05M
meta
dict
__author__ = 'traviswarren' from django.test import TestCase from teamtemp.tests.factories import TeamTemperatureFactory, TeamResponseFactory class TeamTemperatureStatsTestCases(TestCase): def test_stats_count(self): team_temp = TeamTemperatureFactory() self.assertEqual(team_temp.stats()['coun...
{ "repo_name": "teamtemp/teamtemp", "path": "teamtemp/tests/models/test_temp_model.py", "copies": "1", "size": "1506", "license": "mit", "hash": 6659193100633004000, "line_mean": 28.5294117647, "line_max": 80, "alpha_frac": 0.6733067729, "autogenerated": false, "ratio": 3.952755905511811, "confi...
__author__ = 'traviswarren' import factory from datetime import datetime from django.contrib.auth.models import User as DjangoUser from django.contrib.auth.hashers import make_password from teamtemp.responses.models import TeamTemperature, TemperatureResponse, User class DjangoUserFactory(factory.django.DjangoMod...
{ "repo_name": "teamtemp/teamtemp", "path": "teamtemp/tests/factories.py", "copies": "1", "size": "1265", "license": "mit", "hash": 1877136121180080000, "line_mean": 27.1111111111, "line_max": 80, "alpha_frac": 0.7422924901, "autogenerated": false, "ratio": 3.7537091988130564, "config_test": fal...
__author__ = 'traviswarren' import factory from datetime import datetime from django.contrib.auth.models import User as DjangoUser from django.contrib.auth.hashers import make_password from wordplay.responses.models import User, Survey, Response class DjangoUserFactory(factory.django.DjangoModelFactory): clas...
{ "repo_name": "mvillis/wordplay", "path": "wordplay/tests/factories.py", "copies": "1", "size": "1284", "license": "apache-2.0", "hash": 2016199276859998000, "line_mean": 25.2040816327, "line_max": 74, "alpha_frac": 0.6931464174, "autogenerated": false, "ratio": 3.938650306748466, "config_test"...
__author__ = 'trawick' from tastypie import fields from tastypie.resources import ModelResource, ALL, ALL_WITH_RELATIONS from repo.models import Course, CourseCategory, ICan, LearningObjective, GlossaryItem, MultipleChoiceItem, \ ReferenceText, TrueFalseItem from core.utils import CORSResource class CourseCatego...
{ "repo_name": "trawick/edurepo", "path": "src/edurepo/repo/api.py", "copies": "1", "size": "3675", "license": "apache-2.0", "hash": 7111621464289280000, "line_mean": 30.4102564103, "line_max": 108, "alpha_frac": 0.6361904762, "autogenerated": false, "ratio": 4.195205479452055, "config_test": fa...
import direct.directbase.DirectStart from panda3d.core import FrameBufferProperties, TextNode, Vec4, BitMask32, Point3 from panda3d.core import WindowProperties, GraphicsOutput, Texture , GraphicsPipe from direct.showbase.DirectObject import DirectObject from direct.gui.OnscreenText import OnscreenText from sys import...
{ "repo_name": "toontownfunserver/Panda3D-1.9.0", "path": "samples/Distortion/Tut-Distortion.py", "copies": "3", "size": "5260", "license": "bsd-3-clause", "hash": 5049518623835275000, "line_mean": 43.2016806723, "line_max": 121, "alpha_frac": 0.6564638783, "autogenerated": false, "ratio": 3.81712...
__author__ = "Trent Spencer, University of Kansas" __version__ = "1.3" # Change these to your values, you will also likely have to edit the variable names (such as RH for humidity # or AT for the Temperature) in the below code CWOPid = "FW####" DataFile = 'Mesonet.dat' Lat = '####.##N' Lon = '#####.##W' StationHeigh...
{ "repo_name": "t-spencer/MesoToCWOP", "path": "MesoToCWOP.py", "copies": "1", "size": "3577", "license": "mit", "hash": -5766275688264119000, "line_mean": 34.068627451, "line_max": 118, "alpha_frac": 0.6273413475, "autogenerated": false, "ratio": 2.5752339812814973, "config_test": false, "has...
__author__ = 'trevorbillwaite' # Week Four Assignment # Introduction to Computer Science # piggetty.py # correlation with Nicole Ignasiak and Rebekah Orth # Define a function called piggy(string) that returns a string vowels = "AEIOUaeiou" def piggy(word): n=0 endword="" for letter in word: # Is letter a vowel...
{ "repo_name": "trevorbillwaite/Week-Four-Assignment", "path": "piggetty.py", "copies": "1", "size": "1429", "license": "mit", "hash": -1411669269545363500, "line_mean": 21.6825396825, "line_max": 62, "alpha_frac": 0.6634009797, "autogenerated": false, "ratio": 2.812992125984252, "config_test": ...
__author__ = 'Trevor Danger Grant' from googleads import adwords from py2neo import neo4j, node, rel from progressbar import Percentage, Bar, RotatingMarker, ETA, ProgressBar from datetime import datetime, timedelta from time import sleep DB= 'example' COLLECTION= 'example1' SEED_KEYWORDS = ['pizza', 'velvet undergro...
{ "repo_name": "rawkintrevo/charlotte", "path": "neo4j recorder.py", "copies": "1", "size": "4549", "license": "apache-2.0", "hash": 8284536948060243000, "line_mean": 33.4621212121, "line_max": 121, "alpha_frac": 0.6654209716, "autogenerated": false, "ratio": 3.0125827814569535, "config_test": f...
__author__ = 'Trevor Danger Grant' from googleads import adwords from pymongo import MongoClient, errors from progressbar import Percentage, Bar, RotatingMarker, ETA, FileTransferSpeed, ProgressBar DB= 'example' COLLECTION= 'example1' SEED_KEYWORDS = ['pizza', 'velvet underground'] TOTAL_DAILY_OPS = 9950 PAGE_SIZE= ...
{ "repo_name": "rawkintrevo/charlotte", "path": "mongo recorder.py", "copies": "1", "size": "2483", "license": "apache-2.0", "hash": 1530379073631751000, "line_mean": 26.2857142857, "line_max": 92, "alpha_frac": 0.6318968989, "autogenerated": false, "ratio": 3.039167686658507, "config_test": fal...
"""Class for parsing ASN.1""" from .compat import * from .codec import * #Takes a byte array which has a DER TLV field at its head class ASN1Parser: def __init__(self, bytes): p = Parser(bytes) p.get(1) #skip Type #Get Length self.length = self._getASN1Length(p) #Get Valu...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/utils/asn1parser.py", "copies": "3", "size": "1183", "license": "apache-2.0", "hash": -8178694455388941000, "line_mean": 27.1666666667, "line_max": 72, "alpha_frac": 0.6103127642, "autogenerated": false, "ratio": 3.65123...
"""Class for parsing ASN.1""" from .compat import * from .codec import * #Takes a byte array which has a DER TLV field at its head #DER ASN.1 notation with TYPE-LENGTH-VALUE format class ASN1Parser(object): def __init__(self, bytes): p = Parser(bytes) p.get(1) #skip Type #Get Length ...
{ "repo_name": "su-vikas/pytlspect", "path": "utils/asn1parser.py", "copies": "1", "size": "1284", "license": "mit", "hash": 8323724492781426000, "line_mean": 26.9130434783, "line_max": 72, "alpha_frac": 0.6144859813, "autogenerated": false, "ratio": 3.689655172413793, "config_test": false, "h...
"""Abstract class for AES.""" class AES(object): def __init__(self, key, mode, IV, implementation): if len(key) not in (16, 24, 32): raise AssertionError() if mode != 2: raise AssertionError() if len(IV) != 16: raise AssertionError() self.isBlock...
{ "repo_name": "FusionSP/android_external_chromium_org", "path": "third_party/tlslite/tlslite/utils/aes.py", "copies": "149", "size": "1064", "license": "bsd-3-clause", "hash": -1739239728106831000, "line_mean": 30.3235294118, "line_max": 72, "alpha_frac": 0.5817669173, "autogenerated": false, "ra...
"""Abstract class for RSA.""" from .cryptomath import * class RSAKey(object): """This is an abstract base class for RSA keys. Particular implementations of RSA keys, such as L{openssl_rsakey.OpenSSL_RSAKey}, L{python_rsakey.Python_RSAKey}, and L{pycrypto_rsakey.PyCrypto_RSAKey}, inherit fro...
{ "repo_name": "guorendong/iridium-browser-ubuntu", "path": "third_party/tlslite/tlslite/utils/rsakey.py", "copies": "49", "size": "8764", "license": "bsd-3-clause", "hash": 4692925111010577000, "line_mean": 32.9689922481, "line_max": 101, "alpha_frac": 0.603947969, "autogenerated": false, "ratio"...
"""Base class for SharedKeyDB and VerifierDB.""" import anydbm import thread class BaseDB: def __init__(self, filename, type): self.type = type self.filename = filename if self.filename: self.db = None else: self.db = {} self.lock = thread.allocate_...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/basedb.py", "copies": "3", "size": "3487", "license": "apache-2.0", "hash": 8094791345731748000, "line_mean": 27.3577235772, "line_max": 78, "alpha_frac": 0.5520504732, "autogenerated": false, "ratio": 4.337064676616915,...
"""Classes for reading/writing binary data (such as TLS records).""" from .compat import * class Writer: def __init__(self): self.bytes = createByteArrayZeros(0) def add(self, x, length): self.bytes += createByteArrayZeros(length) newIndex = len(self.bytes) - 1 for count in r...
{ "repo_name": "freshplanet/AppEngine-SocketPool", "path": "tlslite/utils/codec.py", "copies": "3", "size": "2531", "license": "apache-2.0", "hash": -5702252528533300000, "line_mean": 28.1034482759, "line_max": 72, "alpha_frac": 0.584749111, "autogenerated": false, "ratio": 3.9546875, "config_te...
"""Classes for reading/writing binary data (such as TLS records).""" from .compat import * class Writer(object): def __init__(self): self.bytes = bytearray(0) def add(self, x, length): self.bytes += bytearray(length) newIndex = len(self.bytes) - 1 for count in range(length): ...
{ "repo_name": "sgraham/nope", "path": "third_party/tlslite/tlslite/utils/codec.py", "copies": "115", "size": "2526", "license": "bsd-3-clause", "hash": -6220097014824257000, "line_mean": 28.0344827586, "line_max": 72, "alpha_frac": 0.5819477435, "autogenerated": false, "ratio": 3.965463108320251,...
"""Class for caching TLS sessions.""" import thread import time class SessionCache: """This class is used by the server to cache TLS sessions. Caching sessions allows the client to use TLS session resumption and avoid the expense of a full handshake. To use this class, simply pass a SessionCache in...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/sessioncache.py", "copies": "3", "size": "3568", "license": "apache-2.0", "hash": -6637995130825273000, "line_mean": 32.6603773585, "line_max": 77, "alpha_frac": 0.6163116592, "autogenerated": false, "ratio": 4.324848484...
"""Class for post-handshake certificate checking.""" from .x509 import X509 from .x509certchain import X509CertChain from .errors import * from .utils.tackwrapper import * class Checker: """This class is passed to a handshake function to check the other party's certificate chain. If a handshake functio...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/checker.py", "copies": "1", "size": "4235", "license": "apache-2.0", "hash": -6420675699854319000, "line_mean": 35.5086206897, "line_max": 82, "alpha_frac": 0.5848878394, "autogenerated": false, "ratio": 4.73713646532438...
"""Class for post-handshake certificate checking.""" from .x509 import X509 from .x509certchain import X509CertChain from .errors import * class Checker: """This class is passed to a handshake function to check the other party's certificate chain. If a handshake function completes successfully, but the...
{ "repo_name": "freshplanet/AppEngine-SocketPool", "path": "tlslite/checker.py", "copies": "2", "size": "2748", "license": "apache-2.0", "hash": -4360704069420708000, "line_mean": 34.7012987013, "line_max": 79, "alpha_frac": 0.6284570597, "autogenerated": false, "ratio": 4.933572710951526, "conf...
"""Class for post-handshake certificate checking.""" from .x509 import X509 from .x509certchain import X509CertChain from .errors import * class Checker(object): """This class is passed to a handshake function to check the other party's certificate chain. If a handshake function completes successfully,...
{ "repo_name": "bright-sparks/chromium-spacewalk", "path": "third_party/tlslite/tlslite/checker.py", "copies": "118", "size": "2756", "license": "bsd-3-clause", "hash": -6886884816716238000, "line_mean": 34.8051948052, "line_max": 79, "alpha_frac": 0.6288098694, "autogenerated": false, "ratio": 4....
"""Class for setting handshake parameters.""" from .constants import CertificateType from .utils import cryptomath from .utils import cipherfactory class HandshakeSettings: """This class encapsulates various parameters that can be used with a TLS handshake. @sort: minKeySize, maxKeySize, cipherNames, cer...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/handshakesettings.py", "copies": "1", "size": "5882", "license": "apache-2.0", "hash": -3207568608351665700, "line_mean": 38.7432432432, "line_max": 76, "alpha_frac": 0.6545392724, "autogenerated": false, "ratio": 4.0904...
"""Class for storing SRP password verifiers.""" from .utils.cryptomath import * from .utils.compat import * from tlslite import mathtls from .basedb import BaseDB class VerifierDB(BaseDB): """This class represent an in-memory or on-disk database of SRP password verifiers. A VerifierDB can be passed to a...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/verifierdb.py", "copies": "3", "size": "3218", "license": "apache-2.0", "hash": 6337729186987591000, "line_mean": 33.6129032258, "line_max": 72, "alpha_frac": 0.6367308888, "autogenerated": false, "ratio": 4.063131313131...
"""Class representing an X.509 certificate chain.""" from .utils import cryptomath from .utils.tackwrapper import * from .utils.pem import * from .x509 import X509 class X509CertChain: """This class represents a chain of X.509 certificates. @type x509List: list @ivar x509List: A list of L{tlslite.x509.X...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/x509certchain.py", "copies": "2", "size": "2778", "license": "apache-2.0", "hash": -1198768613618509600, "line_mean": 29.5274725275, "line_max": 75, "alpha_frac": 0.5950323974, "autogenerated": false, "ratio": 4.08529411...
"""Class representing an X.509 certificate chain.""" from .utils import cryptomath from .utils.tackwrapper import * from .utils.pem import * from .x509 import X509 class X509CertChain(object): """This class represents a chain of X.509 certificates. @type x509List: list @ivar x509List: A list of L{tlslit...
{ "repo_name": "GladeRom/android_external_chromium_org", "path": "third_party/tlslite/tlslite/x509certchain.py", "copies": "118", "size": "2786", "license": "bsd-3-clause", "hash": 3990740414121880600, "line_mean": 29.6153846154, "line_max": 75, "alpha_frac": 0.5954773869, "autogenerated": false, ...
"""Class representing an X.509 certificate chain.""" # from utils import cryptomath from utils.tackwrapper import * from utils.pem import * from x509 import X509 class X509CertChain(object): """This class represents a chain of X.509 certificates. @type x509List: list @ivar x509List: A list of L{tlslite....
{ "repo_name": "su-vikas/pytlspect", "path": "x509certchain.py", "copies": "1", "size": "2752", "license": "mit", "hash": -6424931853839827000, "line_mean": 29.2417582418, "line_max": 75, "alpha_frac": 0.6028343023, "autogenerated": false, "ratio": 4.058997050147493, "config_test": false, "has...
"""Class representing a TLS session.""" from .utils.compat import * from .mathtls import * from .constants import * class Session: """ This class represents a TLS session. TLS distinguishes between connections and sessions. A new handshake creates both a connection and a session. Data is trans...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/session.py", "copies": "2", "size": "4447", "license": "apache-2.0", "hash": 2026085946034869500, "line_mean": 34.576, "line_max": 73, "alpha_frac": 0.667191365, "autogenerated": false, "ratio": 4.26366251198466, "conf...
"""Exception classes. @sort: TLSError, TLSAbruptCloseError, TLSAlert, TLSLocalAlert, TLSRemoteAlert, TLSAuthenticationError, TLSNoAuthenticationError, TLSAuthenticationTypeError, TLSFingerprintError, TLSAuthorizationError, TLSValidationError, TLSFaultError """ from .constants import AlertDescription, AlertLevel clas...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/errors.py", "copies": "2", "size": "5939", "license": "apache-2.0", "hash": -7338228973669996000, "line_mean": 37.3161290323, "line_max": 78, "alpha_frac": 0.7129146321, "autogenerated": false, "ratio": 4.547473200612558...
"""Factory functions for asymmetric cryptography. @sort: generateRSAKey, parsePEMKey, parseAsPublicKey """ from .compat import * from .rsakey import RSAKey from .python_rsakey import Python_RSAKey from tlslite.utils import cryptomath if cryptomath.m2cryptoLoaded: from .openssl_rsakey import OpenSSL_RSAKey if c...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/utils/keyfactory.py", "copies": "1", "size": "6983", "license": "apache-2.0", "hash": -78552869174508290, "line_mean": 35.5602094241, "line_max": 76, "alpha_frac": 0.6773593012, "autogenerated": false, "ratio": 3.4213620...
"""Factory functions for symmetric cryptography.""" import os from tlslite.utils import python_aes from tlslite.utils import python_aesgcm from tlslite.utils import python_rc4 from tlslite.utils import cryptomath tripleDESPresent = False if cryptomath.m2cryptoLoaded: from tlslite.utils import openssl_aes ...
{ "repo_name": "hujiajie/chromium-crosswalk", "path": "third_party/tlslite/tlslite/utils/cipherfactory.py", "copies": "56", "size": "3543", "license": "bsd-3-clause", "hash": -7603430788326262000, "line_mean": 27.8048780488, "line_max": 76, "alpha_frac": 0.6212249506, "autogenerated": false, "rati...
from .compat import * import binascii #This code is shared with tackpy (somewhat), so I'd rather make minimal #changes, and preserve the use of a2b_base64 throughout. def dePem(s, name): """Decode a PEM string into a bytearray of its payload. The input must contain an appropriate PEM prefix and postfix ...
{ "repo_name": "hefen1/chromium", "path": "third_party/tlslite/tlslite/utils/pem.py", "copies": "116", "size": "3587", "license": "bsd-3-clause", "hash": -7729003407913335000, "line_mean": 35.6020408163, "line_max": 78, "alpha_frac": 0.6431558405, "autogenerated": false, "ratio": 2.902103559870550...
from .cryptomath import base64ToBytes import binascii #This code is shared with tackpy (somewhat), so I'd rather make minimal #changes, and preserve the use of a2b_base64 throughout. def a2b_base64(s): return base64ToBytes(s) def b2a_base64(b): return bytesToBase64(b) def dePem(s, name): """Decode ...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/utils/pem.py", "copies": "2", "size": "3703", "license": "apache-2.0", "hash": -5611311794300382000, "line_mean": 34.6057692308, "line_max": 78, "alpha_frac": 0.6454226303, "autogenerated": false, "ratio": 2.888455538221...
import os #Functions for manipulating datetime objects #CCYY-MM-DDThh:mm:ssZ def parseDateClass(s): year, month, day = s.split("-") day, tail = day[:2], day[2:] hour, minute, second = tail[1:].split(":") second = second[:2] year, month, day = int(year), int(month), int(day) hour, minute, secon...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/utils/datefuncs.py", "copies": "1", "size": "2284", "license": "apache-2.0", "hash": 6678036859474626000, "line_mean": 28.6623376623, "line_max": 72, "alpha_frac": 0.627408056, "autogenerated": false, "ratio": 3.37869822...
"""Miscellaneous functions to mask Python version differences.""" import sys import os import math import binascii if sys.version_info >= (3,0): def compat26Str(x): return x # Python 3 requires bytes instead of bytearrays for HMAC # So, python 2.6 requires strings, python 3 requires 'bytes'...
{ "repo_name": "su-vikas/pytlspect", "path": "utils/compat.py", "copies": "5", "size": "2741", "license": "mit", "hash": -8601866353131182000, "line_mean": 28.4731182796, "line_max": 96, "alpha_frac": 0.6059832178, "autogenerated": false, "ratio": 3.587696335078534, "config_test": false, "has_...
"""Miscellaneous functions to mask Python version differences.""" import sys import os import math # Requires Python 2.5 # from hashlib import md5 # from hashlib import sha1 from tlslite.pickable.pureSha1 import sha1 from tlslite.pickable.pureMd5 import md5 # Requires Python 2.6, will need to be changed for Python...
{ "repo_name": "freshplanet/AppEngine-SocketPool", "path": "tlslite/utils/compat.py", "copies": "1", "size": "1105", "license": "apache-2.0", "hash": -6532264974044227000, "line_mean": 23.5555555556, "line_max": 96, "alpha_frac": 0.6570135747, "autogenerated": false, "ratio": 2.962466487935657, ...
"""Miscellaneous functions to mask Python version differences.""" import sys import os import math # Requires Python 2.5 from hashlib import md5 from hashlib import sha1 # Requires Python 2.6, will need to be changed for Python 3 def createByteArraySequence(seq): return bytearray(seq) def createByteArrayZeros(...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/utils/compat.py", "copies": "1", "size": "1025", "license": "apache-2.0", "hash": -1749929331262375000, "line_mean": 23.4047619048, "line_max": 96, "alpha_frac": 0.6380487805, "autogenerated": false, "ratio": 2.979651162...
""" A state machine for using TLS Lite with asynchronous I/O. """ class AsyncStateMachine: """ This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted. This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readable or writ...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/integration/asyncstatemachine.py", "copies": "1", "size": "7063", "license": "apache-2.0", "hash": -5444499511759246000, "line_mean": 28.6764705882, "line_max": 72, "alpha_frac": 0.5680305819, "autogenerated": false, "ra...
"""OpenSSL/M2Crypto 3DES implementation.""" from .cryptomath import * from .tripledes import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_TripleDES(key, mode, IV) class OpenSSL_TripleDES(TripleDES): def __init__(self, key, mode, IV): TripleDES.__init__(self, key,...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/utils/openssl_tripledes.py", "copies": "1", "size": "1771", "license": "apache-2.0", "hash": 1978306534917132300, "line_mean": 36.6808510638, "line_max": 98, "alpha_frac": 0.607001694, "autogenerated": false, "ratio": 4....
"""OpenSSL/M2Crypto AES implementation.""" from .cryptomath import * from .aes import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_AES(key, mode, IV) class OpenSSL_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "openssl") ...
{ "repo_name": "Omegaphora/external_chromium_org", "path": "third_party/tlslite/tlslite/utils/openssl_aes.py", "copies": "202", "size": "1944", "license": "bsd-3-clause", "hash": 759332897023801000, "line_mean": 36.3846153846, "line_max": 98, "alpha_frac": 0.5833333333, "autogenerated": false, "ra...
"""OpenSSL/M2Crypto RSA implementation.""" from .cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey #copied from M2Crypto.util.py, so when we load the local copy of m2 #we can still use it def password_callback(v, prompt1='Enter private key passphrase:', pr...
{ "repo_name": "TeamExodus/external_chromium_org", "path": "third_party/tlslite/tlslite/utils/openssl_rsakey.py", "copies": "200", "size": "4670", "license": "bsd-3-clause", "hash": 4369961042199362000, "line_mean": 33.3382352941, "line_max": 73, "alpha_frac": 0.4668094218, "autogenerated": false, ...
"""Pure-Python AES implementation.""" from .cryptomath import * from .aes import * from .rijndael import rijndael def new(key, mode, IV): return Python_AES(key, mode, IV) class Python_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "python") self.rijndael = ri...
{ "repo_name": "freshplanet/AppEngine-SocketPool", "path": "tlslite/utils/python_aes.py", "copies": "3", "size": "2224", "license": "apache-2.0", "hash": -2380459822479407000, "line_mean": 30.323943662, "line_max": 78, "alpha_frac": 0.6124100719, "autogenerated": false, "ratio": 4.007207207207207,...
"""Pure-Python RC4 implementation.""" from .rc4 import RC4 from .cryptomath import * def new(key): return Python_RC4(key) class Python_RC4(RC4): def __init__(self, keyBytes): RC4.__init__(self, keyBytes, "python") S = [i for i in range(256)] j = 0 for i in range(256): ...
{ "repo_name": "TeslaProject/external_chromium_org", "path": "third_party/tlslite/tlslite/utils/python_rc4.py", "copies": "207", "size": "1073", "license": "bsd-3-clause", "hash": 6566348447439992000, "line_mean": 25.1707317073, "line_max": 72, "alpha_frac": 0.5097856477, "autogenerated": false, "...
"""Pure-Python RC4 implementation.""" from .rc4 import RC4 from .cryptomath import * def new(key): return Python_RC4(key) class Python_RC4(RC4): def __init__(self, key): RC4.__init__(self, key, "python") keyBytes = stringToBytes(key) S = [i for i in range(256)] j = 0 ...
{ "repo_name": "freshplanet/AppEngine-SocketPool", "path": "tlslite/utils/python_rc4.py", "copies": "4", "size": "1114", "license": "apache-2.0", "hash": 5214126775422976000, "line_mean": 25.5238095238, "line_max": 72, "alpha_frac": 0.5143626571, "autogenerated": false, "ratio": 3.257309941520468,...
"""Pure-Python RSA implementation.""" import threading from .cryptomath import * from .asn1parser import ASN1Parser from .rsakey import * from .pem import * class Python_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if (n and not e) or (e and not n): raise As...
{ "repo_name": "endlessm/chromium-browser", "path": "third_party/tlslite/tlslite/utils/python_rsakey.py", "copies": "11", "size": "4598", "license": "bsd-3-clause", "hash": -630108480553885700, "line_mean": 31.8428571429, "line_max": 77, "alpha_frac": 0.5863418878, "autogenerated": false, "ratio":...
"""PyCrypto RSA implementation.""" from .cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey if pycryptoLoaded: from Crypto.PublicKey import RSA class PyCrypto_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): if not d: ...
{ "repo_name": "TheTypoMaster/chromium-crosswalk", "path": "third_party/tlslite/tlslite/utils/pycrypto_rsakey.py", "copies": "144", "size": "1204", "license": "bsd-3-clause", "hash": 3959952913165689000, "line_mean": 27.6666666667, "line_max": 89, "alpha_frac": 0.5581395349, "autogenerated": false, ...
"""TLS Lite + asyncore.""" import asyncore from tlslite.tlsconnection import TLSConnection from asyncstatemachine import AsyncStateMachine class TLSAsyncDispatcherMixIn(AsyncStateMachine): """This class can be "mixed in" with an L{asyncore.dispatcher} to add TLS support. This class essentially sits be...
{ "repo_name": "splunk/splunk-webframework", "path": "contrib/tlslite/tlslite/integration/tlsasyncdispatchermixin.py", "copies": "2", "size": "4826", "license": "apache-2.0", "hash": -1784733336010391800, "line_mean": 32.9929577465, "line_max": 75, "alpha_frac": 0.6496062992, "autogenerated": false,...
"""TLS Lite + asyncore.""" #import asyncore from tlslite.tlsconnection import TLSConnection from asyncstatemachine import AsyncStateMachine class TLSAsyncDispatcherMixIn(AsyncStateMachine): """This class can be "mixed in" with an L{asyncore.dispatcher} to add TLS support. This class essentially sits b...
{ "repo_name": "freshplanet/AppEngine-SocketPool", "path": "tlslite/integration/tlsasyncdispatchermixin.py", "copies": "1", "size": "4859", "license": "apache-2.0", "hash": -4571986519133973500, "line_mean": 32.75, "line_max": 75, "alpha_frac": 0.6468409138, "autogenerated": false, "ratio": 4.4293...
"""TLS Lite + imaplib.""" import socket from imaplib import IMAP4 from tlslite.tlsconnection import TLSConnection from tlslite.integration.clienthelper import ClientHelper # IMAP TLS PORT IMAP4_TLS_PORT = 993 class IMAP4_TLS(IMAP4, ClientHelper): """This class extends L{imaplib.IMAP4} with TLS support.""" ...
{ "repo_name": "Bysmyyr/chromium-crosswalk", "path": "third_party/tlslite/tlslite/integration/imap4_tls.py", "copies": "115", "size": "3405", "license": "bsd-3-clause", "hash": 3965500922131716000, "line_mean": 34.4791666667, "line_max": 72, "alpha_frac": 0.648164464, "autogenerated": false, "rati...
"""TLS Lite + poplib.""" import socket from poplib import POP3, POP3_SSL_PORT from tlslite.tlsconnection import TLSConnection from tlslite.integration.clienthelper import ClientHelper class POP3_TLS(POP3, ClientHelper): """This class extends L{poplib.POP3} with TLS support.""" def __init__(self, host, port ...
{ "repo_name": "XiaosongWei/chromium-crosswalk", "path": "third_party/tlslite/tlslite/integration/pop3_tls.py", "copies": "115", "size": "3162", "license": "bsd-3-clause", "hash": 7815070804589015000, "line_mean": 36.6547619048, "line_max": 72, "alpha_frac": 0.6511701455, "autogenerated": false, "...
"""TLS Lite + smtplib.""" from smtplib import SMTP from tlslite.tlsconnection import TLSConnection from tlslite.integration.clienthelper import ClientHelper class SMTP_TLS(SMTP): """This class extends L{smtplib.SMTP} with TLS support.""" def starttls(self, username=None, password=None, ...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/integration/smtp_tls.py", "copies": "1", "size": "3244", "license": "apache-2.0", "hash": -6431662386444879000, "line_mean": 36.2873563218, "line_max": 82, "alpha_frac": 0.639025894, "autogenerated": false, "ratio": 4.79...
"""TLS Lite + SocketServer.""" from tlslite.tlsconnection import TLSConnection class TLSSocketServerMixIn: """ This class can be mixed in with any L{SocketServer.TCPServer} to add TLS support. To use this class, define a new class that inherits from it and some L{SocketServer.TCPServer} (with th...
{ "repo_name": "ptphp/PyLib", "path": "src/devs/trevp-tlslite-cac0c81/tlslite/integration/tlssocketservermixin.py", "copies": "1", "size": "2291", "license": "apache-2.0", "hash": 4293866092500153000, "line_mean": 35.9516129032, "line_max": 74, "alpha_frac": 0.6294194675, "autogenerated": false, "...
"""PyCrypto RSA implementation.""" from .cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey if pycryptoLoaded: from Crypto.PublicKey import RSA class PyCrypto_RSAKey(RSAKey): def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0): ...
{ "repo_name": "dbiesecke/dbiesecke.github.io", "path": "repo/script.video.F4mProxy/lib/f4mUtils/pycrypto_rsakey.py", "copies": "8", "size": "1246", "license": "mit", "hash": 8968588737050658000, "line_mean": 27.6666666667, "line_max": 89, "alpha_frac": 0.5393258427, "autogenerated": false, "ratio...
__author__= 'Trevor "Where is the ANY key?" Grant' __date__= 'Aug. 18, 2014' __license__= 'Apache' __version__= '0.3' from TwitterAPI import TwitterAPI from multiprocessing import Process, Pipe from time import clock,time from monitors import HealthMonitor class TwitterStreamer(Process): def __init__(self, query, c...
{ "repo_name": "rawkintrevo/sharky", "path": "mysharky/streamers.py", "copies": "1", "size": "2159", "license": "apache-2.0", "hash": -4300105125553412000, "line_mean": 32.2153846154, "line_max": 101, "alpha_frac": 0.6822603057, "autogenerated": false, "ratio": 2.933423913043478, "config_test": ...
__author__= 'Trevor "Where is the ANY key?" Grant' __date__= 'Aug. 18, 2014' __license__= 'Apache' __version__= '0.3' from TwitterAPI import TwitterAPI from threading import Thread from time import sleep,clock from numpy import mean class twitter_streamer(Thread): def __init__(self, query, creds, connection, tweet_...
{ "repo_name": "rawkintrevo/sharky", "path": "mysharky/common.py", "copies": "1", "size": "4038", "license": "apache-2.0", "hash": -1441639226265577200, "line_mean": 30.0615384615, "line_max": 115, "alpha_frac": 0.6386825161, "autogenerated": false, "ratio": 3.0871559633027523, "config_test": fa...
__author__ = 'treww' import os, sys, atexit def daemonize(stdin='/dev/null', stdout='/dev/null', pidfile=None): """ do the UNIX double-fork magic, see Stevens' "Advanced Programming in the UNIX Environment" for details (ISBN 0201563177) http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16 """ ...
{ "repo_name": "treww/counters", "path": "server/daemonize.py", "copies": "1", "size": "1585", "license": "mit", "hash": -1015843427592511500, "line_mean": 26.8070175439, "line_max": 77, "alpha_frac": 0.5520504732, "autogenerated": false, "ratio": 3.372340425531915, "config_test": false, "has_...
__author__ = 'tri' from utils.customer_waiter_pattern.customer import Customer from utils.factory_pattern.factory import Factory from utils.constant.drawable_index import DRAWABLE_INDEX from utils.constant.customer_waiter_pattern.customer_key import CUSTOMER_KEY from utils.timer.timer import Timer from game_model.drawa...
{ "repo_name": "ductri/game_programming-ass1", "path": "game_model/head.py", "copies": "1", "size": "9418", "license": "apache-2.0", "hash": -8313142512551685000, "line_mean": 36.373015873, "line_max": 109, "alpha_frac": 0.59566787, "autogenerated": false, "ratio": 3.67890625, "config_test": fal...
__author__ = 'tri' import pygame from utils.observer_pattern.subject import Subject from utils.observer_pattern.subject_unit import SubjectUnit import datetime class EventController(Subject): def __init__(self): # Constructor of base class: Subject Subject.__init__(self) mouse_down_subj...
{ "repo_name": "ductri/game_programming-ass1", "path": "controller/event_controller.py", "copies": "1", "size": "1529", "license": "apache-2.0", "hash": 7136687650377618000, "line_mean": 26.3035714286, "line_max": 68, "alpha_frac": 0.5709614127, "autogenerated": false, "ratio": 4.166212534059945, ...
__author__ = 'tri' import pygame class Factory: """ Factory something external: - Background image - Sprite images - Sound """ def __init__(self): return def get_background(): return pygame.image.load('resources/background.PNG') # Make static function get_bac...
{ "repo_name": "ductri/game_programming-ass1", "path": "utils/factory_pattern/factory.py", "copies": "1", "size": "3424", "license": "apache-2.0", "hash": -2227255954375963000, "line_mean": 35.8172043011, "line_max": 97, "alpha_frac": 0.547021028, "autogenerated": false, "ratio": 3.501022494887525...
__author__ = 'tri' from game_model.drawable import Drawable from utils.constant.drawable_index import DRAWABLE_INDEX from utils.customer_waiter_pattern.customer import Customer from utils.constant.customer_waiter_pattern.customer_key import CUSTOMER_KEY from utils.observer_pattern.subject import Subject from utils.obs...
{ "repo_name": "ductri/game_programming-ass1", "path": "game_model/timer_counter.py", "copies": "1", "size": "1671", "license": "apache-2.0", "hash": -2379693982480382500, "line_mean": 31.7647058824, "line_max": 153, "alpha_frac": 0.6463195691, "autogenerated": false, "ratio": 3.632608695652174, ...
__author__ = 'tri' from utils.factory_pattern.factory import Factory from utils.customer_waiter_pattern.customer import Customer from utils.constant.customer_waiter_pattern.customer_key import CUSTOMER_KEY from utils.constant.drawable_index import DRAWABLE_INDEX from utils.timer.timer import Timer from utils.observer_...
{ "repo_name": "ductri/game_programming-ass1", "path": "game_model/hammer.py", "copies": "1", "size": "3498", "license": "apache-2.0", "hash": 4926911826784613000, "line_mean": 28.8974358974, "line_max": 79, "alpha_frac": 0.5966266438, "autogenerated": false, "ratio": 3.87375415282392, "config_t...
__author__ = 'tri' from utils.observer_pattern.observer import Observer from utils.customer_waiter_pattern.customer import Customer from utils.constant.customer_waiter_pattern.customer_key import CUSTOMER_KEY from utils.constant.drawable_index import DRAWABLE_INDEX from utils.observer_pattern.subject import Subject fr...
{ "repo_name": "ductri/game_programming-ass1", "path": "game_model/player.py", "copies": "1", "size": "3209", "license": "apache-2.0", "hash": -3958372357650819000, "line_mean": 35.0561797753, "line_max": 133, "alpha_frac": 0.625740106, "autogenerated": false, "ratio": 3.8293556085918854, "confi...
__author__ = 'tri' from utils.observer_pattern.observer import Observer from utils.factory_pattern.factory import Factory from utils.customer_waiter_pattern.waiter import Waiter from utils.constant.customer_waiter_pattern.customer_key import CUSTOMER_KEY from utils.constant.drawable_index import DRAWABLE_INDEX from ut...
{ "repo_name": "ductri/game_programming-ass1", "path": "controller/main_controller.py", "copies": "1", "size": "10364", "license": "apache-2.0", "hash": -1586888455472100400, "line_mean": 34.7379310345, "line_max": 118, "alpha_frac": 0.5736202239, "autogenerated": false, "ratio": 3.855654761904762...
__author__ = 'tri' import threading import time class Timer(threading.Thread): """ Like timer in java """ def __init__(self, interval, work_function=None): """ Constructor :param interval: :param work_function: :return: """ self.time_stick = int...
{ "repo_name": "ductri/game_programming-ass1", "path": "utils/timer/timer.py", "copies": "1", "size": "1154", "license": "apache-2.0", "hash": 2465380735328934000, "line_mean": 23.0416666667, "line_max": 55, "alpha_frac": 0.5441941075, "autogenerated": false, "ratio": 4.455598455598456, "config_...
__author__ = 'Tristan Watson' # Keystroke Dynamic software that covers the following key functionality: # 1. User File management # 2. Input gathering and management (including storage) # 3. Plotting of keystrokes taking into consideration both up events and down events. import pyHook import pythoncom import os impor...
{ "repo_name": "Skarzee/python-keystroke-dynamics", "path": "2.7/main.py", "copies": "1", "size": "7298", "license": "mit", "hash": -2031563336793715500, "line_mean": 28.192, "line_max": 90, "alpha_frac": 0.6341463415, "autogenerated": false, "ratio": 3.7637957710159875, "config_test": false, ...
__author__ = 'Tristan Watson' # Keystroke Dynamic software that covers the following key functionality: # 1. User File management # 2. Input gathering and management (including storage) # 3. Plotting of keystrokes taking into consideration both up events and down events. import pyHook import pythoncom import...
{ "repo_name": "Skarzee/python-keystroke-dynamics", "path": "main.py", "copies": "1", "size": "7536", "license": "mit", "hash": -8310776686619650000, "line_mean": 28.144, "line_max": 90, "alpha_frac": 0.6125265393, "autogenerated": false, "ratio": 3.866598255515649, "config_test": false, "has_...
__author__ = 'trs' import logging from cryptoknocker_db import get_port_serviceName class PortLog(): def __init__(self): self.LOG_FILE_PATH = "../logs/port.log" def log_port_status(self, port, status, username, client_ip): logging.basicConfig(format='%(asctime)s %(message)s' ,filename=self.LO...
{ "repo_name": "bb111189/CryptoKnocker", "path": "libs/logger.py", "copies": "3", "size": "1133", "license": "mit", "hash": 4495509672907655700, "line_mean": 36.8, "line_max": 113, "alpha_frac": 0.6593115622, "autogenerated": false, "ratio": 3.4542682926829267, "config_test": false, "has_no_ke...
__author__ = 'trs' import sqlite3 SQLITE_DB_PATH = "../CryptoKnocker/db.sqlite3" def get_public_key_path(username): ''' Get public key path of username :param username: client username :return: public key path ''' QUERY = "SELECT publicKey FROM management_portprofile WHERE userID=?" PARAM...
{ "repo_name": "bb111189/CryptoKnocker", "path": "CryptoKnocker/libs/cryptoknocker_db.py", "copies": "2", "size": "2426", "license": "mit", "hash": -4133895320436954000, "line_mean": 24.5368421053, "line_max": 88, "alpha_frac": 0.6574608409, "autogenerated": false, "ratio": 3.8630573248407645, "...
from collections import OrderedDict, defaultdict from io import StringIO from itertools import combinations import os import struct from .camera import Camera from .image import Image import numpy as np from .rotation import Quaternion #------------------------------------------------------------------------------- ...
{ "repo_name": "google/nerfies", "path": "third_party/pycolmap/pycolmap/scene_manager.py", "copies": "1", "size": "23624", "license": "apache-2.0", "hash": -4695308046886857000, "line_mean": 35.122324159, "line_max": 82, "alpha_frac": 0.5759820522, "autogenerated": false, "ratio": 3.27565169162506...
import numpy as np import os import struct from collections import OrderedDict from itertools import combinations from cStringIO import StringIO from camera import Camera from image import Image from rotation import Quaternion #------------------------------------------------------------------------------- # # Scen...
{ "repo_name": "trueprice/pycolmap", "path": "pycolmap/scene_manager.py", "copies": "1", "size": "26533", "license": "mit", "hash": -75621463765468900, "line_mean": 39.2015151515, "line_max": 83, "alpha_frac": 0.5146044548, "autogenerated": false, "ratio": 3.679517403966163, "config_test": false...
import numpy as np from scipy.optimize import root #------------------------------------------------------------------------------- # # camera distortion functions for arrays of size (..., 2) # #------------------------------------------------------------------------------- def simple_radial_distortion(camera, x):...
{ "repo_name": "google/nerfies", "path": "third_party/pycolmap/pycolmap/camera.py", "copies": "1", "size": "8137", "license": "apache-2.0", "hash": -737144813634680000, "line_mean": 30.6614785992, "line_max": 80, "alpha_frac": 0.5079267543, "autogenerated": false, "ratio": 3.3416837782340862, "c...
import numpy as np #------------------------------------------------------------------------------- # # Axis-Angle Functions # #------------------------------------------------------------------------------- # returns the cross product matrix representation of a 3-vector v def cross_prod_matrix(v): return np.arr...
{ "repo_name": "trueprice/pycolmap", "path": "pycolmap/rotation.py", "copies": "1", "size": "11595", "license": "mit", "hash": -5827709617431393000, "line_mean": 34.787037037, "line_max": 82, "alpha_frac": 0.487796464, "autogenerated": false, "ratio": 3.0642177589852007, "config_test": false, ...
__author__ = "Trung Dong Huynh" __email__ = "trungdong@donggiang.com" class Identifier(object): """Base class for all identifiers and also represents xsd:anyURI.""" # TODO: make Identifier an "abstract" base class and move xsd:anyURI # into a subclass def __init__(self, uri): """ Con...
{ "repo_name": "trungdong/prov", "path": "src/prov/identifier.py", "copies": "1", "size": "4599", "license": "mit", "hash": 8959977294112587000, "line_mean": 27.0426829268, "line_max": 86, "alpha_frac": 0.5636007828, "autogenerated": false, "ratio": 4.422115384615385, "config_test": false, "ha...
__author__ = "Trung Dong Huynh" __email__ = "trungdong@donggiang.com" __version__ = "2.0.0" __all__ = ["Error", "model", "read"] class Error(Exception): """Base class for all errors in this package.""" pass def read(source, format=None): """ Convenience function returning a ProvDocument instance. ...
{ "repo_name": "trungdong/prov", "path": "src/prov/__init__.py", "copies": "1", "size": "1447", "license": "mit", "hash": -3734405593445375500, "line_mean": 29.1458333333, "line_max": 77, "alpha_frac": 0.6675881133, "autogenerated": false, "ratio": 4.281065088757397, "config_test": false, "has...
__author__ = 'Truong_noob' import requests from datetime import datetime class Blind_magic: def __init__(self): self.url = "" self.base_query = "" self.query = "" self.condition_query = "" self.char = 90 self.duration = 1 self.start = 48 se...
{ "repo_name": "truongtn/blind_magic", "path": "Blind_magic.py", "copies": "1", "size": "3856", "license": "mit", "hash": -4681816840305781000, "line_mean": 35.0961538462, "line_max": 113, "alpha_frac": 0.5420124481, "autogenerated": false, "ratio": 3.0554675118858956, "config_test": false, "h...
__author__ = 'tschlein' #Checks for existence of dependencies (executable files, Python modules). #Returns True if all dependencies are present; otherwise, returns False and prints missing files. #TODO add Python modules import sys from os import path import platform #https://docs.python.org/2/library/platform.ht...
{ "repo_name": "cfrs7xx/OLD", "path": "check.py", "copies": "1", "size": "3089", "license": "bsd-3-clause", "hash": -415552071004011800, "line_mean": 31.5263157895, "line_max": 135, "alpha_frac": 0.574619618, "autogenerated": false, "ratio": 4.248968363136176, "config_test": true, "has_no_keyw...
__author__ = 'tsengdavid' def compress_start(): """ 压缩脚本和样式表 :return: """ import os import os.path # 指明被遍历的文件夹 rootdir = os.getcwd() + "/../../static" # 压缩器路径 jarpath = os.getcwd() + "/yuicompressor-2.4.8.jar" # 三个参数:分别返回1.父目录 2.所有文件夹名字(不含路径) 3.所有文件名字 for parent, dirnam...
{ "repo_name": "cherrishes/weilai", "path": "xingxing/util/compressor/compress.py", "copies": "2", "size": "1178", "license": "apache-2.0", "hash": 2534227613466449400, "line_mean": 27.1388888889, "line_max": 88, "alpha_frac": 0.4782608696, "autogenerated": false, "ratio": 2.642297650130548, "co...
__author__ = 'tspycher' from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import A4, A6 from reportlab.platypus import Image, PageBreak, Spacer from reportlab.platypus.paragraph import Paragraph #from reportlab.lib.styles import ParagraphStyle as PS from pyPdf import PdfFileReader, PdfFileWriter from ....
{ "repo_name": "tspycher/pyaeromanager", "path": "app/flightplanbuilder.py", "copies": "1", "size": "5409", "license": "mit", "hash": -3674268263343427000, "line_mean": 40.2977099237, "line_max": 126, "alpha_frac": 0.6339434276, "autogenerated": false, "ratio": 3.434285714285714, "config_test": ...
__author__ = 'tspycher' import mongoengine from app import Isa from app.documents.aerodrome import Aerodrome from datetime import datetime class Takeoff(mongoengine.EmbeddedDocument): RWY_TYPE_GRASS = 'grass' RWY_TYPE_ASPH = 'asph' WIND_HEAD = 'head' WIND_TAIL = 'tail' qnh = mongoengine.IntField(...
{ "repo_name": "tspycher/pyaeromanager", "path": "app/documents/flightplan/performance/takeoff.py", "copies": "1", "size": "2042", "license": "mit", "hash": -6760324548491818000, "line_mean": 36.1454545455, "line_max": 121, "alpha_frac": 0.6890303624, "autogenerated": false, "ratio": 3.01624815361...
__author__ = 'tspycher' import npyscreen from app.documents.airplane import Airplane, PerformanceChart from cli import MultilineManage class AirplaneChartForm(npyscreen.ActionPopup): parent_document = None document = None update = False def create(self): self.name = self.add(npyscreen.TitleTex...
{ "repo_name": "tspycher/pyaeromanager", "path": "cli/others/airplaneform.py", "copies": "1", "size": "3435", "license": "mit", "hash": -5936693135865206000, "line_mean": 37.595505618, "line_max": 110, "alpha_frac": 0.673944687, "autogenerated": false, "ratio": 3.5930962343096233, "config_test":...
__author__ = 'tspycher' import npyscreen from app.documents.flightplan import Flightplan from app.documents.aerodrome import Aerodrome from app.documents.airplane import Airplane class FlightplanList(npyscreen.MultiLineAction): def actionHighlighted(self, act_on_this, key_press): self.parent.parentApp.getF...
{ "repo_name": "tspycher/pyaeromanager", "path": "cli/performance/flightplanlistform.py", "copies": "1", "size": "1700", "license": "mit", "hash": 6888526687963550000, "line_mean": 35.1914893617, "line_max": 97, "alpha_frac": 0.6752941176, "autogenerated": false, "ratio": 3.3464566929133857, "co...
__author__ = 'tspycher' import npyscreen from app.documents.flightplan.performance import Takeoff from pprint import pformat class TakeoffForm(npyscreen.FormMultiPageActionWithMenus): document = None def create(self): main = self.new_menu("Takeoff Menu") main.addItemsFromList([ ("E...
{ "repo_name": "tspycher/pyaeromanager", "path": "cli/performance/takeoffform.py", "copies": "1", "size": "5086", "license": "mit", "hash": -4663549333318232000, "line_mean": 49.3564356436, "line_max": 176, "alpha_frac": 0.664372788, "autogenerated": false, "ratio": 3.0917933130699087, "config_t...
__author__ = 'tspycher' class SnakeMoveDirection(object): left = 0 right = 1 up = 2 down = 3 class Snake(object): _gameboard = None _snake = [] _previousDirection = SnakeMoveDirection.right def __init__(self, gameboard, snakeInitSize=10): self._gameboard = gameboard s...
{ "repo_name": "tspycher/python-snake", "path": "snake/snake.py", "copies": "1", "size": "1950", "license": "mit", "hash": 6075007809346761000, "line_mean": 32.0508474576, "line_max": 150, "alpha_frac": 0.5846153846, "autogenerated": false, "ratio": 3.672316384180791, "config_test": false, "ha...
__author__ = 'tspycher' from gameboard import Gameboard from snake import Snake, SnakeMoveDirection import curses from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN class Game(object): _gamespeed = 0.6 _snake = None _gameboard = None _screen = None def __init__(self): # Create the...
{ "repo_name": "tspycher/python-snake", "path": "snake/game.py", "copies": "1", "size": "1486", "license": "mit", "hash": 2024426502734429700, "line_mean": 24.6379310345, "line_max": 68, "alpha_frac": 0.5067294751, "autogenerated": false, "ratio": 3.8900523560209423, "config_test": false, "has...
__author__ = 'tspycher' import npyscreen from app.documents.flightplan import Flightplan from app import FlightplanBuilder class FlightplanForm(npyscreen.ActionFormWithMenus): document = None def create(self): if self.document is None: self.document = Flightplan() main = self.new...
{ "repo_name": "tspycher/pyaeromanager", "path": "cli/performance/flightplanform.py", "copies": "1", "size": "2298", "license": "mit", "hash": 1069345455906191900, "line_mean": 38.6206896552, "line_max": 173, "alpha_frac": 0.681462141, "autogenerated": false, "ratio": 3.6360759493670884, "config...
__author__ = 'tspycher' import npyscreen from cli.performance import TakeoffForm, FlightplanForm, FlightplanListDisplay, WeightbalanceForm from cli.others import AerodromeForm, AirplaneForm, AirplaneChartForm from .repository import Repository class Application(npyscreen.NPSAppManaged): repository = None def...
{ "repo_name": "tspycher/pyaeromanager", "path": "cli/application.py", "copies": "1", "size": "1069", "license": "mit", "hash": -2384108291691097000, "line_mean": 45.5217391304, "line_max": 97, "alpha_frac": 0.7380729654, "autogenerated": false, "ratio": 3.5514950166112955, "config_test": false,...
__author__ = 'tspycher' import requests from bs4 import BeautifulSoup from slugify import slugify from . import Receiver class HbAircraftReceiver(Receiver): _url = 'http://www.bazl.admin.ch/experten/luftfahrzeuge/luftfahrzeugregister/index.html' def __init__(self, identifiers = None): pass def ...
{ "repo_name": "tspycher/python-aviationdata", "path": "aviationdata/receiver/hbaircraftreceiver.py", "copies": "1", "size": "1665", "license": "mit", "hash": -3915125321944082000, "line_mean": 29.8333333333, "line_max": 122, "alpha_frac": 0.566966967, "autogenerated": false, "ratio": 3.75, "con...
__author__ = 'tspycher' import sys import random class Gameboard(object): board = [] boardSize = None food = None _screen = None def __init__(self, size, screen): self._screen = screen self.boardSize = size self.placeFood() def clearBoard(self): for x in xran...
{ "repo_name": "tspycher/python-snake", "path": "snake/gameboard.py", "copies": "1", "size": "1130", "license": "mit", "hash": 3242608948669576000, "line_mean": 26.5609756098, "line_max": 96, "alpha_frac": 0.5159292035, "autogenerated": false, "ratio": 3.498452012383901, "config_test": false, ...
__author__ = 'tsungyi' from __future__ import print_function import numpy as np import datetime import time from collections import defaultdict import mask import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoG...
{ "repo_name": "rishita/mxnet", "path": "example/rcnn/rcnn/pycocotools/cocoeval.py", "copies": "1", "size": "19780", "license": "apache-2.0", "hash": 2532985050351055000, "line_mean": 43.4516853933, "line_max": 131, "alpha_frac": 0.5069261881, "autogenerated": false, "ratio": 3.5794426348172275, ...
__author__ = 'tsungyi' from . import _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece simply stores the length of # ...
{ "repo_name": "TheRevanchist/rcnn_for_relab", "path": "faster_rcnn/pycocotools/mask.py", "copies": "8", "size": "4044", "license": "mit", "hash": 2043198860651064800, "line_mean": 48.3292682927, "line_max": 100, "alpha_frac": 0.6988130564, "autogenerated": false, "ratio": 3.3393889347646573, "c...
__author__ = 'tsungyi' import libs.datasets.pycocotools._mask as _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece si...
{ "repo_name": "CharlesShang/FastMaskRCNN", "path": "libs/datasets/pycocotools/mask.py", "copies": "2", "size": "4605", "license": "apache-2.0", "hash": -1899960176200212500, "line_mean": 43.7184466019, "line_max": 100, "alpha_frac": 0.6866449511, "autogenerated": false, "ratio": 3.229312762973352...
__author__ = 'tsungyi' import _mask as _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece simply stores the length of ...
{ "repo_name": "likelyzhao/mxnet", "path": "example/rcnn/rcnn/pycocotools/mask.py", "copies": "2", "size": "4047", "license": "apache-2.0", "hash": 2860456264385788400, "line_mean": 48.3536585366, "line_max": 100, "alpha_frac": 0.6987892266, "autogenerated": false, "ratio": 3.336356141797197, "c...
__author__ = 'tsungyi' import _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece simply stores the length of # that pi...
{ "repo_name": "oswaldoludwig/visually-informed-embedding-of-word-VIEW-", "path": "mask.py", "copies": "2", "size": "4038", "license": "bsd-2-clause", "hash": -6861375801810259000, "line_mean": 48.243902439, "line_max": 100, "alpha_frac": 0.6988608222, "autogenerated": false, "ratio": 3.3371900826...
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict # from . import mask as maskUtils from libs.datasets.pycocotools import mask as maskUtils import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage...
{ "repo_name": "CharlesShang/FastMaskRCNN", "path": "libs/datasets/pycocotools/cocoeval.py", "copies": "2", "size": "23915", "license": "apache-2.0", "hash": -4867428734257320000, "line_mean": 44.2098298677, "line_max": 118, "alpha_frac": 0.5107673009, "autogenerated": false, "ratio": 3.4008816837...
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict from . import mask as maskUtils import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoGt=..., cocoDt=... ...
{ "repo_name": "ildoonet/tf-openpose", "path": "tf_pose/pycocotools/cocoeval.py", "copies": "1", "size": "24161", "license": "apache-2.0", "hash": -6827102424392604000, "line_mean": 44.2471910112, "line_max": 118, "alpha_frac": 0.5078846074, "autogenerated": false, "ratio": 3.40631608628225, "co...
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict from . import mask import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoGt=..., cocoDt=... # load ...
{ "repo_name": "adityaarun1/faster_rcnn_pytorch", "path": "faster_rcnn/pycocotools/cocoeval.py", "copies": "2", "size": "19751", "license": "mit", "hash": -510695367172097700, "line_mean": 43.4864864865, "line_max": 131, "alpha_frac": 0.5062022176, "autogenerated": false, "ratio": 3.57419471588852...
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict import mask as maskUtils import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoGt=..., cocoDt=... #...
{ "repo_name": "apaleyes/mxnet", "path": "example/rcnn/rcnn/pycocotools/cocoeval.py", "copies": "14", "size": "23849", "license": "apache-2.0", "hash": -8885679465326612000, "line_mean": 44.1704545455, "line_max": 118, "alpha_frac": 0.5100004193, "autogenerated": false, "ratio": 3.400684443176957,...
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict import mask import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoGt=..., cocoDt=... # load dataset...
{ "repo_name": "wenhuchen/ETHZ-Bootstrapped-Captioning", "path": "visual-concepts/coco/PythonAPI/pycocotools/cocoeval.py", "copies": "1", "size": "24575", "license": "bsd-3-clause", "hash": -7483941317704125000, "line_mean": 44.1764705882, "line_max": 118, "alpha_frac": 0.5041302136, "autogenerated"...
__author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict import pycocotools.mask as maskUtils import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoGt=..., cocoDt...
{ "repo_name": "gakarak/FCN_MSCOCO_Food_Segmentation", "path": "MSCOCO_Processing/PythonAPI/pycocotools/cocoeval.py", "copies": "2", "size": "23861", "license": "apache-2.0", "hash": -7422473359111585000, "line_mean": 44.1931818182, "line_max": 118, "alpha_frac": 0.5102049369, "autogenerated": false...
__author__ = 'tsungyi' import pycocotools._mask as _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece simply stores th...
{ "repo_name": "yxliang/coco", "path": "PythonAPI/pycocotools/mask.py", "copies": "20", "size": "4058", "license": "bsd-2-clause", "hash": -3274564448522995000, "line_mean": 48.5, "line_max": 100, "alpha_frac": 0.6996057171, "autogenerated": false, "ratio": 3.3371710526315788, "config_test": fal...
__author__ = 'tsungyi' import src.data.pycocotools._mask as _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece simply ...
{ "repo_name": "PavlosMelissinos/enet-keras", "path": "src/data/pycocotools/mask.py", "copies": "1", "size": "4601", "license": "mit", "hash": 1820711374668170500, "line_mean": 43.6699029126, "line_max": 100, "alpha_frac": 0.6861551837, "autogenerated": false, "ratio": 3.2242466713384723, "confi...
__author__ = 'tsungyi' try: import pycocotools._mask as _mask except Exception as e: print('mask.py err=', e) class Dummy: def __init__(self): self.iou = None self.merge = None self.frPyObjects = None _mask = Dummy() # Interface for manipulating masks store...
{ "repo_name": "ildoonet/tf-openpose", "path": "tf_pose/pycocotools/mask.py", "copies": "1", "size": "4812", "license": "apache-2.0", "hash": -6211209771041666000, "line_mean": 41.592920354, "line_max": 100, "alpha_frac": 0.6772651704, "autogenerated": false, "ratio": 3.253549695740365, "config_...