id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,700 | torrent.py | CouchPotato_CouchPotatoServer/libs/rtorrent/torrent.py | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | 18,788 | Python | .py | 418 | 36.626794 | 98 | 0.616058 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,701 | compat.py | CouchPotato_CouchPotatoServer/libs/rtorrent/compat.py | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | 1,258 | Python | .py | 26 | 46.769231 | 72 | 0.784202 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,702 | connection.py | CouchPotato_CouchPotatoServer/libs/rtorrent/connection.py | import logging
import urllib
from rtorrent.common import convert_version_tuple_to_str, join_uri, update_uri
from rtorrent.lib.xmlrpc.clients.http import HTTPServerProxy
from rtorrent.lib.xmlrpc.clients.scgi import SCGIServerProxy
from rtorrent.lib.xmlrpc.transports.basic_auth import BasicAuthTransport
# Try import re... | 5,073 | Python | .py | 115 | 35.330435 | 106 | 0.645575 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,703 | common.py | CouchPotato_CouchPotatoServer/libs/rtorrent/common.py | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | 4,050 | Python | .py | 104 | 33.951923 | 84 | 0.696845 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,704 | group.py | CouchPotato_CouchPotatoServer/libs/rtorrent/group.py | # Copyright (c) 2013 Dean Gardiner, <gardiner91@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify,... | 3,116 | Python | .py | 65 | 40.661538 | 101 | 0.64347 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,705 | torrentparser.py | CouchPotato_CouchPotatoServer/libs/rtorrent/lib/torrentparser.py | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | 5,641 | Python | .py | 130 | 34.769231 | 105 | 0.632914 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,706 | bencode.py | CouchPotato_CouchPotatoServer/libs/rtorrent/lib/bencode.py | # Copyright (C) 2011 by clueless <clueless.nospam ! mail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mo... | 9,140 | Python | .py | 239 | 33.786611 | 97 | 0.65583 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,707 | scgi.py | CouchPotato_CouchPotatoServer/libs/rtorrent/lib/xmlrpc/clients/scgi.py | #!/usr/bin/python
# rtorrent_xmlrpc
# (c) 2011 Roger Que <alerante@bellsouth.net>
#
# Modified portions:
# (c) 2013 Dean Gardiner <gardiner91@gmail.com>
#
# Python module for interacting with rtorrent's XML-RPC interface
# directly over SCGI, instead of through an HTTP server intermediary.
# Inspired by Glenn Washburn... | 5,670 | Python | .py | 134 | 37.865672 | 79 | 0.707503 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,708 | http.py | CouchPotato_CouchPotatoServer/libs/rtorrent/lib/xmlrpc/clients/http.py | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | 1,195 | Python | .py | 21 | 55.809524 | 72 | 0.799488 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,709 | scgi.py | CouchPotato_CouchPotatoServer/libs/rtorrent/lib/xmlrpc/transports/scgi.py | #!/usr/bin/python
# rtorrent_xmlrpc
# (c) 2011 Roger Que <alerante@bellsouth.net>
#
# Modified portions:
# (c) 2013 Dean Gardiner <gardiner91@gmail.com>
#
# Python module for interacting with rtorrent's XML-RPC interface
# directly over SCGI, instead of through an HTTP server intermediary.
# Inspired by Glenn Washburn... | 5,943 | Python | .py | 139 | 37.064748 | 91 | 0.686247 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,710 | basic_auth.py | CouchPotato_CouchPotatoServer/libs/rtorrent/lib/xmlrpc/transports/basic_auth.py | #
# Copyright (c) 2013 Dean Gardiner, <gardiner91@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, mod... | 3,291 | Python | .py | 77 | 34.597403 | 93 | 0.660826 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,711 | requests_.py | CouchPotato_CouchPotatoServer/libs/rtorrent/lib/xmlrpc/transports/requests_.py | import requests
import requests.auth
import xmlrpclib
class RequestsTransport(xmlrpclib.Transport):
def __init__(self, secure, auth=None, proxies=None, verify_ssl=True):
xmlrpclib.Transport.__init__(self)
self.secure = secure
# Construct session
self.session = requests.Session()
... | 2,530 | Python | .py | 70 | 25.985714 | 83 | 0.588356 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,712 | __init__.py | CouchPotato_CouchPotatoServer/libs/rtorrent/rpc/__init__.py | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | 10,880 | Python | .py | 256 | 34 | 107 | 0.606098 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,713 | relativedelta.py | CouchPotato_CouchPotatoServer/libs/dateutil/relativedelta.py | """
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
__license__ = "Simplified BSD"
import datetime
import calendar
from six import integer_types
__all__ = ["relativedelta", "MO", "TU", "WE", "TH", "FR", "SA", "SU"]
class wee... | 17,224 | Python | .py | 388 | 29.546392 | 92 | 0.517096 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,714 | easter.py | CouchPotato_CouchPotatoServer/libs/dateutil/easter.py | """
Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
__license__ = "Simplified BSD"
import datetime
__all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTERN"]
EASTER_JULIAN = 1
EASTER_ORTHODOX = 2
EASTER_WEST... | 2,578 | Python | .py | 71 | 30.352113 | 76 | 0.622832 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,715 | __init__.py | CouchPotato_CouchPotatoServer/libs/dateutil/__init__.py | # -*- coding: utf-8 -*-
"""
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
__author__ = "Tomi Pievil√§inen <tomi.pievilainen@iki.fi>"
__license__ = "Simplified BSD"
__version__ = "2.1"
| 278 | Python | .py | 9 | 29.777778 | 64 | 0.705224 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,716 | rrule.py | CouchPotato_CouchPotatoServer/libs/dateutil/rrule.py | """
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
__license__ = "Simplified BSD"
import itertools
import datetime
import calendar
try:
import _thread
except ImportError:
import thread as _thread
import sys
from six i... | 41,036 | Python | .py | 1,032 | 23.849806 | 78 | 0.456784 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,717 | tzwin.py | CouchPotato_CouchPotatoServer/libs/dateutil/tzwin.py | # This code was originally contributed by Jeffrey Harris.
import datetime
import struct
import winreg
__all__ = ["tzwin", "tzwinlocal"]
ONEWEEK = datetime.timedelta(7)
TZKEYNAMENT = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones"
TZKEYNAME9X = r"SOFTWARE\Microsoft\Windows\CurrentVersion\Time Zones"
TZLOC... | 5,737 | Python | .py | 138 | 32.391304 | 78 | 0.613991 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,718 | parser.py | CouchPotato_CouchPotatoServer/libs/dateutil/parser.py | # -*- coding:iso-8859-1 -*-
"""
Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
from __future__ import unicode_literals
__license__ = "Simplified BSD"
import datetime
import string
import time
import collections
try:
from... | 33,736 | Python | .py | 814 | 22.362408 | 94 | 0.368211 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,719 | tz.py | CouchPotato_CouchPotatoServer/libs/dateutil/tz.py | """
Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
__license__ = "Simplified BSD"
from six import string_types, PY3
import datetime
import struct
import time
import sys
import os
relativedelta = None
parser = None
rrule = No... | 32,988 | Python | .py | 833 | 26.872749 | 89 | 0.516259 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,720 | __init__.py | CouchPotato_CouchPotatoServer/libs/dateutil/zoneinfo/__init__.py | # -*- coding: utf-8 -*-
"""
Copyright (c) 2003-2005 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard Python
datetime module.
"""
from dateutil.tz import tzfile
from tarfile import TarFile
import os
__author__ = "Tomi Pievil√§inen <tomi.pievilainen@iki.fi>"
__license__ = "Simplifi... | 2,773 | Python | .py | 79 | 27.037975 | 77 | 0.596347 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,721 | shim.py | CouchPotato_CouchPotatoServer/libs/gntp/shim.py | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
"""
Python2.5 and Python3.3 compatibility shim
Heavily inspirted by the "six" library.
https://pypi.python.org/pypi/six
"""
import sys
PY3 = sys.version_info[0] == 3
if PY3:
def b(s):
if isinstance(s, byt... | 931 | Python | .py | 35 | 24.142857 | 76 | 0.724605 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,722 | errors.py | CouchPotato_CouchPotatoServer/libs/gntp/errors.py | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
class BaseError(Exception):
pass
class ParseError(BaseError):
errorcode = 500
errordesc = 'Error parsing the message'
class AuthError(BaseError):
errorcode = 400
errordesc = 'Error with authorization'
... | 519 | Python | .py | 16 | 30.3125 | 76 | 0.807692 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,723 | config.py | CouchPotato_CouchPotatoServer/libs/gntp/config.py | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
"""
The gntp.config module is provided as an extended GrowlNotifier object that takes
advantage of the ConfigParser module to allow us to setup some default values
(such as hostname, password, and port) in a mor... | 2,173 | Python | .py | 59 | 34.389831 | 81 | 0.741889 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,724 | cli.py | CouchPotato_CouchPotatoServer/libs/gntp/cli.py | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
import logging
import os
import sys
from optparse import OptionParser, OptionGroup
from gntp.notifier import GrowlNotifier
from gntp.shim import RawConfigParser
from gntp.version import __version__
DEFAULT_CON... | 4,143 | Python | .py | 120 | 31.5 | 80 | 0.713393 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,725 | notifier.py | CouchPotato_CouchPotatoServer/libs/gntp/notifier.py | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
"""
The gntp.notifier module is provided as a simple way to send notifications
using GNTP
.. note::
This class is intended to mostly mirror the older Python bindings such
that you should be able to replace in... | 8,299 | Python | .py | 220 | 34.563636 | 100 | 0.759895 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,726 | core.py | CouchPotato_CouchPotatoServer/libs/gntp/core.py | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
import hashlib
import re
import time
import gntp.shim
import gntp.errors as errors
__all__ = [
'GNTPRegister',
'GNTPNotice',
'GNTPSubscribe',
'GNTPOK',
'GNTPError',
'parse_gntp',
]
#GNTP/<version> <mess... | 13,975 | Python | .py | 412 | 30.694175 | 105 | 0.714869 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,727 | version.py | CouchPotato_CouchPotatoServer/libs/gntp/version.py | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
__version__ = '1.0.2'
| 131 | Python | .py | 3 | 42.333333 | 76 | 0.748031 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,728 | windows.py | CouchPotato_CouchPotatoServer/libs/unrar2/windows.py | # Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy... | 11,832 | Python | .py | 276 | 34.300725 | 172 | 0.632994 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,729 | rar_exceptions.py | CouchPotato_CouchPotatoServer/libs/unrar2/rar_exceptions.py | # Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy... | 1,391 | Python | .py | 27 | 50.407407 | 71 | 0.80676 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,730 | unix.py | CouchPotato_CouchPotatoServer/libs/unrar2/unix.py | # Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy... | 10,224 | Python | .py | 238 | 32.004202 | 127 | 0.57018 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,731 | __init__.py | CouchPotato_CouchPotatoServer/libs/unrar2/__init__.py | # Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy... | 7,329 | Python | .py | 147 | 43.251701 | 106 | 0.696194 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,732 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyasn1/__init__.py | import sys
# http://www.python.org/dev/peps/pep-0396/
__version__ = '0.1.8'
if sys.version_info[:2] < (2, 4):
raise RuntimeError('PyASN1 requires Python 2.4 or later')
| 175 | Python | .py | 5 | 32.6 | 61 | 0.682635 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,733 | debug.py | CouchPotato_CouchPotatoServer/libs/pyasn1/debug.py | import time
import logging
from pyasn1.compat.octets import octs2ints
from pyasn1 import error
from pyasn1 import __version__
flagNone = 0x0000
flagEncoder = 0x0001
flagDecoder = 0x0002
flagAll = 0xffff
flagMap = {
'encoder': flagEncoder,
'decoder': flagDecoder,
'all': flagAll
}
class Prin... | 3,044 | Python | .py | 91 | 25.274725 | 87 | 0.572063 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,734 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/__init__.py | # This file is necessary to make this directory a package.
| 59 | Python | .py | 1 | 58 | 58 | 0.793103 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,735 | decoder.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/der/decoder.py | # DER decoder
from pyasn1.codec.cer import decoder
tagMap = decoder.tagMap
typeMap = decoder.typeMap
class Decoder(decoder.Decoder):
supportIndefLength = False
decode = Decoder(tagMap, typeMap)
| 200 | Python | .py | 7 | 26.714286 | 36 | 0.816754 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,736 | encoder.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/der/encoder.py | # DER encoder
from pyasn1.type import univ
from pyasn1.codec.cer import encoder
from pyasn1 import error
class SetOfEncoder(encoder.SetOfEncoder):
def _cmpSetComponents(self, c1, c2):
tagSet1 = isinstance(c1, univ.Choice) and \
c1.getEffectiveTagSet() or c1.getTagSet()
tagSet2 = i... | 1,139 | Python | .py | 27 | 36.259259 | 76 | 0.709124 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,737 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/der/__init__.py | # This file is necessary to make this directory a package.
| 59 | Python | .py | 1 | 58 | 58 | 0.793103 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,738 | decoder.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/ber/decoder.py | # BER decoder
from pyasn1.type import tag, univ, char, useful, tagmap
from pyasn1.codec.ber import eoo
from pyasn1.compat.octets import oct2int, isOctetsType
from pyasn1 import debug, error
class AbstractDecoder:
protoComponent = None
def valueDecoder(self, fullSubstrate, substrate, asn1Spec, tagSet,
... | 38,266 | Python | .py | 796 | 34.015075 | 290 | 0.570943 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,739 | eoo.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/ber/eoo.py | from pyasn1.type import base, tag
class EndOfOctets(base.AbstractSimpleAsn1Item):
defaultValue = 0
tagSet = tag.initTagSet(
tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x00)
)
endOfOctets = EndOfOctets()
| 237 | Python | .py | 7 | 29.285714 | 65 | 0.746725 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,740 | encoder.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/ber/encoder.py | # BER encoder
from pyasn1.type import base, tag, univ, char, useful
from pyasn1.codec.ber import eoo
from pyasn1.compat.octets import int2oct, oct2int, ints2octs, null, str2octs
from pyasn1 import debug, error
class Error(Exception): pass
class AbstractItemEncoder:
supportIndefLenMode = 1
def encodeTag(self, ... | 16,317 | Python | .py | 401 | 29.299252 | 219 | 0.556878 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,741 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/ber/__init__.py | # This file is necessary to make this directory a package.
| 59 | Python | .py | 1 | 58 | 58 | 0.793103 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,742 | decoder.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/cer/decoder.py | # CER decoder
from pyasn1.type import univ
from pyasn1.codec.ber import decoder
from pyasn1.compat.octets import oct2int
from pyasn1 import error
class BooleanDecoder(decoder.AbstractSimpleDecoder):
protoComponent = univ.Boolean(0)
def valueDecoder(self, fullSubstrate, substrate, asn1Spec, tagSet, length,
... | 1,230 | Python | .py | 30 | 34.3 | 80 | 0.683682 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,743 | encoder.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/cer/encoder.py | # CER encoder
from pyasn1.type import univ
from pyasn1.type import useful
from pyasn1.codec.ber import encoder
from pyasn1.compat.octets import int2oct, str2octs, null
from pyasn1 import error
class BooleanEncoder(encoder.IntegerEncoder):
def encodeValue(self, encodeFun, client, defMode, maxChunkSize):
if ... | 4,998 | Python | .py | 117 | 34.179487 | 91 | 0.648932 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,744 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyasn1/codec/cer/__init__.py | # This file is necessary to make this directory a package.
| 59 | Python | .py | 1 | 58 | 58 | 0.793103 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,745 | octets.py | CouchPotato_CouchPotatoServer/libs/pyasn1/compat/octets.py | from sys import version_info
if version_info[0] <= 2:
int2oct = chr
ints2octs = lambda s: ''.join([ int2oct(x) for x in s ])
null = ''
oct2int = ord
octs2ints = lambda s: [ oct2int(x) for x in s ]
str2octs = lambda x: x
octs2str = lambda x: x
isOctetsType = lambda s: isinstance(s, str)
... | 602 | Python | .py | 19 | 27.263158 | 60 | 0.630584 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,746 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyasn1/compat/__init__.py | # This file is necessary to make this directory a package.
| 59 | Python | .py | 1 | 58 | 58 | 0.793103 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,747 | iterfunc.py | CouchPotato_CouchPotatoServer/libs/pyasn1/compat/iterfunc.py | from sys import version_info
if version_info[0] <= 2 and version_info[1] <= 4:
def all(iterable):
for element in iterable:
if not element:
return False
return True
else:
all = all
| 233 | Python | .py | 9 | 19 | 49 | 0.591928 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,748 | binary.py | CouchPotato_CouchPotatoServer/libs/pyasn1/compat/binary.py | from sys import version_info
if version_info[0:2] < (2, 6):
def bin(x):
if x <= 1:
return '0b'+str(x)
else:
return bin(x>>1) + str(x&1)
else:
bin = bin
| 201 | Python | .py | 9 | 15.888889 | 39 | 0.492147 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,749 | char.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/char.py | # ASN.1 "character string" types
from pyasn1.type import univ, tag
class NumericString(univ.OctetString):
tagSet = univ.OctetString.tagSet.tagImplicitly(
tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 18)
)
class PrintableString(univ.OctetString):
tagSet = univ.OctetString.tagSet.tagImpli... | 2,043 | Python | .py | 51 | 34.254902 | 63 | 0.738252 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,750 | namedtype.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/namedtype.py | # NamedType specification for constructed types
import sys
from pyasn1.type import tagmap
from pyasn1 import error
class NamedType:
isOptional = 0
isDefaulted = 0
def __init__(self, name, t):
self.__name = name; self.__type = t
def __repr__(self): return '%s(%r, %r)' % (
self.__class__.... | 5,725 | Python | .py | 133 | 33.022556 | 75 | 0.578215 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,751 | namedval.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/namedval.py | # ASN.1 named integers
from pyasn1 import error
__all__ = [ 'NamedValues' ]
class NamedValues:
def __init__(self, *namedValues):
self.nameToValIdx = {}; self.valToNameIdx = {}
self.namedValues = ()
automaticVal = 1
for namedValue in namedValues:
if isinstance(na... | 2,163 | Python | .py | 47 | 36.87234 | 99 | 0.600287 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,752 | univ.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/univ.py | # ASN.1 "universal" data types
import operator, sys, math
from pyasn1.type import base, tag, constraint, namedtype, namedval, tagmap
from pyasn1.codec.ber import eoo
from pyasn1.compat import octets
from pyasn1 import error
# "Simple" ASN.1 types (yet incomplete)
class Integer(base.AbstractSimpleAsn1Item):
tagSet... | 44,619 | Python | .py | 1,044 | 31.054598 | 105 | 0.565776 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,753 | constraint.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/constraint.py | #
# ASN.1 subtype constraints classes.
#
# Constraints are relatively rare, but every ASN1 object
# is doing checks all the time for whether they have any
# constraints and whether they are applicable to the object.
#
# What we're going to do is define objects/functions that
# can be called unconditionally ... | 7,279 | Python | .py | 175 | 33.274286 | 79 | 0.632234 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,754 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/__init__.py | # This file is necessary to make this directory a package.
| 59 | Python | .py | 1 | 58 | 58 | 0.793103 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,755 | base.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/base.py | # Base classes for ASN.1 types
import sys
from pyasn1.type import constraint, tagmap, tag
from pyasn1 import error
class Asn1Item: pass
class Asn1ItemBase(Asn1Item):
# Set of tags for this ASN.1 type
tagSet = tag.TagSet()
# A list of constraint.Constraint instances for checking values
subtypeSpec... | 10,647 | Python | .py | 237 | 36.459916 | 91 | 0.64265 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,756 | tag.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/tag.py | # ASN.1 types tags
from operator import getitem
from pyasn1 import error
tagClassUniversal = 0x00
tagClassApplication = 0x40
tagClassContext = 0x80
tagClassPrivate = 0xC0
tagFormatSimple = 0x00
tagFormatConstructed = 0x20
tagCategoryImplicit = 0x01
tagCategoryExplicit = 0x02
tagCategoryUntagged = 0x04
class Tag:
... | 4,499 | Python | .py | 114 | 31.219298 | 96 | 0.582531 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,757 | useful.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/useful.py | # ASN.1 "useful" types
from pyasn1.type import char, tag
class ObjectDescriptor(char.GraphicString):
tagSet = char.GraphicString.tagSet.tagImplicitly(
tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 7)
)
class GeneralizedTime(char.VisibleString):
tagSet = char.VisibleString.tagSet.tagImpli... | 565 | Python | .py | 14 | 34.857143 | 63 | 0.74635 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,758 | tagmap.py | CouchPotato_CouchPotatoServer/libs/pyasn1/type/tagmap.py | from pyasn1 import error
class TagMap:
def __init__(self, posMap={}, negMap={}, defType=None):
self.__posMap = posMap.copy()
self.__negMap = negMap.copy()
self.__defType = defType
def __contains__(self, tagSet):
return tagSet in self.__posMap or \
self.__... | 2,392 | Python | .py | 56 | 32.482143 | 105 | 0.543951 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,759 | _version.py | CouchPotato_CouchPotatoServer/libs/oauth2/_version.py | # This is the version of this source code.
manual_verstr = "1.5"
auto_build_num = "211"
verstr = manual_verstr + "." + auto_build_num
try:
from pyutil.version_class import Version as pyutil_Version
__version__ = pyutil_Version(verstr)
except (ImportError, ValueError):
# Maybe there is no pyutil insta... | 438 | Python | .py | 11 | 36.363636 | 67 | 0.740476 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,760 | __init__.py | CouchPotato_CouchPotatoServer/libs/oauth2/__init__.py | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | 29,044 | Python | .py | 667 | 34.547226 | 265 | 0.629476 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,761 | imap.py | CouchPotato_CouchPotatoServer/libs/oauth2/clients/imap.py | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | 1,685 | Python | .py | 30 | 52.566667 | 78 | 0.776292 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,762 | smtp.py | CouchPotato_CouchPotatoServer/libs/oauth2/clients/smtp.py | """
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the ... | 1,680 | Python | .py | 31 | 50.677419 | 79 | 0.773642 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,763 | remotes.py | CouchPotato_CouchPotatoServer/libs/git/remotes.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 2,614 | Python | .py | 49 | 48.632653 | 99 | 0.702302 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,764 | repository.py | CouchPotato_CouchPotatoServer/libs/git/repository.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 20,401 | Python | .py | 435 | 37.882759 | 118 | 0.604592 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,765 | config.py | CouchPotato_CouchPotatoServer/libs/git/config.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 2,432 | Python | .py | 42 | 53.642857 | 121 | 0.724571 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,766 | ref_container.py | CouchPotato_CouchPotatoServer/libs/git/ref_container.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 2,242 | Python | .py | 44 | 46.659091 | 84 | 0.721893 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,767 | branch.py | CouchPotato_CouchPotatoServer/libs/git/branch.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 3,758 | Python | .py | 73 | 46.219178 | 104 | 0.70315 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,768 | utils.py | CouchPotato_CouchPotatoServer/libs/git/utils.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 2,472 | Python | .py | 57 | 39.105263 | 79 | 0.67385 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,769 | __init__.py | CouchPotato_CouchPotatoServer/libs/git/__init__.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 1,673 | Python | .py | 28 | 58.75 | 79 | 0.790881 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,770 | tag.py | CouchPotato_CouchPotatoServer/libs/git/tag.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 1,689 | Python | .py | 32 | 51.125 | 79 | 0.7657 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,771 | commit.py | CouchPotato_CouchPotatoServer/libs/git/commit.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 3,498 | Python | .py | 73 | 41.958904 | 126 | 0.673094 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,772 | ref.py | CouchPotato_CouchPotatoServer/libs/git/ref.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 2,981 | Python | .py | 58 | 44.965517 | 84 | 0.664613 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,773 | exceptions.py | CouchPotato_CouchPotatoServer/libs/git/exceptions.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 2,527 | Python | .py | 49 | 47.510204 | 104 | 0.723525 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,774 | files.py | CouchPotato_CouchPotatoServer/libs/git/files.py | # Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this li... | 1,831 | Python | .py | 32 | 54.84375 | 82 | 0.757087 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,775 | environment.py | CouchPotato_CouchPotatoServer/couchpotato/environment.py | import os
from couchpotato.core.database import Database
from couchpotato.core.event import fireEvent, addEvent
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.loader import Loader
from couchpotato.core.settings import Settings
from couchpotato.core.softchroot import SoftChroot
class En... | 2,917 | Python | .py | 93 | 24.053763 | 95 | 0.585505 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,776 | api.py | CouchPotato_CouchPotatoServer/couchpotato/api.py | from functools import wraps
from threading import Thread
import json
import threading
import traceback
import urllib
from couchpotato.core.helpers.request import getParams
from couchpotato.core.logger import CPLog
from tornado.ioloop import IOLoop
from tornado.web import RequestHandler, asynchronous
log = CPLog(__na... | 4,908 | Python | .py | 126 | 29.730159 | 113 | 0.598776 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,777 | runner.py | CouchPotato_CouchPotatoServer/couchpotato/runner.py | from logging import handlers
from uuid import uuid4
import locale
import logging
import os.path
import sys
import time
import traceback
import warnings
import re
import tarfile
import shutil
from CodernityDB.database_super_thread_safe import SuperThreadSafeDatabase
from argparse import ArgumentParser
from cache import... | 13,233 | Python | .py | 314 | 34.006369 | 155 | 0.619611 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,778 | __init__.py | CouchPotato_CouchPotatoServer/couchpotato/__init__.py | import os
import time
import traceback
from couchpotato.api import api_docs, api_docs_missing, api
from couchpotato.core.event import fireEvent
from couchpotato.core.helpers.encoding import sp
from couchpotato.core.helpers.variable import md5, tryInt
from couchpotato.core.logger import CPLog
from couchpotato.environme... | 5,682 | Python | .py | 143 | 32.405594 | 177 | 0.624795 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,779 | environment_test.py | CouchPotato_CouchPotatoServer/couchpotato/environment_test.py | import unittest
from unittest import TestCase
import mock
from couchpotato.environment import Env
class EnvironmentBaseTest(TestCase):
def test_appname(self):
self.assertEqual('CouchPotato', Env.get('appname'))
def test_set_get_appname(self):
x = 'NEWVALUE'
Env.set('appname', x)
... | 539 | Python | .py | 15 | 30.133333 | 59 | 0.709615 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,780 | settings.py | CouchPotato_CouchPotatoServer/couchpotato/core/settings.py | from __future__ import with_statement
import ConfigParser
import traceback
from hashlib import md5
from CodernityDB.hash_index import HashIndex
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.hel... | 16,637 | Python | .py | 364 | 33.252747 | 149 | 0.562191 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,781 | event.py | CouchPotato_CouchPotatoServer/couchpotato/core/event.py | import threading
import traceback
from axl.axel import Event
from couchpotato.core.helpers.variable import mergeDicts, natsortKey
from couchpotato.core.logger import CPLog
log = CPLog(__name__)
events = {}
def runHandler(name, handler, *args, **kwargs):
try:
return handler(*args, **kwargs)
except:
... | 5,458 | Python | .py | 138 | 27.405797 | 140 | 0.527304 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,782 | loader.py | CouchPotato_CouchPotatoServer/couchpotato/core/loader.py | import os
import sys
import traceback
from couchpotato.core.event import fireEvent
from couchpotato.core.logger import CPLog
from importhelper import import_module
import six
log = CPLog(__name__)
class Loader(object):
def __init__(self):
self.plugins = {}
self.providers = {}
self.modu... | 6,625 | Python | .py | 138 | 35.115942 | 112 | 0.552472 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,783 | settings_test.py | CouchPotato_CouchPotatoServer/couchpotato/core/settings_test.py | import mock
from mock import patch, Mock, MagicMock
import unittest
from unittest import TestCase
from couchpotato.core.settings import Settings
class DoNotUseMe:
""" Do not use this class, it is just for storing Mock ' s of Settings-class
Usage:
Select appropriate Mocks and copy-paste them to your ... | 4,990 | Python | .py | 126 | 31.02381 | 95 | 0.580444 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,784 | softchroot.py | CouchPotato_CouchPotatoServer/couchpotato/core/softchroot.py | import os
import sys
class SoftChrootInitError(IOError):
"""Error during soft-chroot initialization"""
pass
class SoftChroot:
"""Soft Chroot module
Provides chroot feature for interation with Web-UI. Since it is not real chroot, so the name is SOFT CHROOT.
The module prevents access to entire fi... | 3,963 | Python | .py | 98 | 30.214286 | 115 | 0.602043 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,785 | logger.py | CouchPotato_CouchPotatoServer/couchpotato/core/logger.py | import logging
import re
class CPLog(object):
context = ''
replace_private = ['api', 'apikey', 'api_key', 'password', 'username', 'h', 'uid', 'key', 'passkey']
Env = None
is_develop = False
def __init__(self, context = ''):
if context.endswith('.main'):
context = context[:-5... | 2,776 | Python | .py | 60 | 36.033333 | 124 | 0.575093 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,786 | database.py | CouchPotato_CouchPotatoServer/couchpotato/core/database.py | import json
import os
import time
import traceback
from sqlite3 import OperationalError
from CodernityDB.database import RecordNotFound
from CodernityDB.index import IndexException, IndexNotFoundException, IndexConflict
from couchpotato import CPLog
from couchpotato.api import addApiView
from couchpotato.core.event im... | 24,784 | Python | .py | 497 | 31.181087 | 179 | 0.463011 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,787 | softchroot_test.py | CouchPotato_CouchPotatoServer/couchpotato/core/softchroot_test.py | import sys
import os
import logging
import unittest
from unittest import TestCase
from couchpotato.core.softchroot import SoftChroot
CHROOT_DIR = '/tmp/'
class SoftChrootNonInitialized(TestCase):
def setUp(self):
self.b = SoftChroot()
def test_is_root_abs(self):
with self.assertRaises(Runtim... | 3,849 | Python | .py | 90 | 34.944444 | 82 | 0.649772 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,788 | __init__.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/__init__.py | import os
import traceback
from couchpotato import CPLog, md5
from couchpotato.core.event import addEvent, fireEvent, fireEventAsync
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.variable import getExt
from couchpotato.core.plugins.base import Plugin
import six
log = CPLog(__n... | 3,818 | Python | .py | 87 | 32.632184 | 208 | 0.57764 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,789 | index.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/media/index.py | from string import ascii_letters
from hashlib import md5
from CodernityDB.tree_index import MultiTreeBasedIndex, TreeBasedIndex
from couchpotato.core.helpers.encoding import toUnicode, simplifyString
class MediaIndex(MultiTreeBasedIndex):
_version = 3
custom_header = """from CodernityDB.tree_index import Mu... | 6,107 | Python | .py | 134 | 36.746269 | 103 | 0.59868 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,790 | main.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/media/main.py | from datetime import timedelta
import time
import traceback
from string import ascii_lowercase
from CodernityDB.database import RecordNotFound, RecordDeleted
from couchpotato import tryInt, get_db
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent, fireEventAsync, addEvent
from couchpo... | 21,493 | Python | .py | 450 | 34.508889 | 221 | 0.535983 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,791 | __init__.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/searcher/__init__.py | from .main import Searcher
def autoload():
return Searcher()
config = [{
'name': 'searcher',
'order': 20,
'groups': [
{
'tab': 'searcher',
'name': 'searcher',
'label': 'Basics',
'description': 'General search options',
'options': [
... | 3,170 | Python | .py | 93 | 19.806452 | 166 | 0.398178 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,792 | base.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/searcher/base.py | from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
log = CPLog(__name__)
class SearcherBase(Plugin):
in_progress = False
def __init__(self):
super(SearcherBase, self).__init__()
addEvent('searche... | 1,316 | Python | .py | 29 | 36.931034 | 116 | 0.641005 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,793 | main.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/searcher/main.py | import datetime
import re
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import simplifyString
from couchpotato.core.helpers.variable import splitString, removeEmpty, removeDuplicate
from couchpotato.core.logger import CPLog
from cou... | 8,876 | Python | .py | 166 | 43.186747 | 137 | 0.613713 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,794 | __init__.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/matcher/__init__.py | from .main import Matcher
def autoload():
return Matcher()
config = []
| 78 | Python | .py | 4 | 16.75 | 25 | 0.71831 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,795 | base.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/matcher/base.py | from couchpotato.core.event import addEvent
from couchpotato.core.helpers.encoding import simplifyString
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
log = CPLog(__name__)
class MatcherBase(Plugin):
type = None
def __init__(self):
if self.type:
... | 2,320 | Python | .py | 59 | 28.40678 | 88 | 0.570215 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,796 | main.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/matcher/main.py | from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.variable import possibleTitles
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.matcher.base import MatcherBase
from caper import Caper
log = CPLog(__name__)
class Matcher(MatcherBase):
def __init__(s... | 2,988 | Python | .py | 62 | 38.564516 | 110 | 0.625733 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,797 | base.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/providers/base.py | from urlparse import urlparse
import json
import re
from requests import HTTPError
import time
import traceback
import xml.etree.ElementTree as XMLTree
try:
from xml.etree.ElementTree import ParseError as XmlParseError
except ImportError:
from xml.parsers.expat import ExpatError as XmlParseError
from couchpot... | 11,332 | Python | .py | 274 | 30.510949 | 115 | 0.574427 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,798 | base.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/providers/userscript/base.py | from urlparse import urlparse
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import simplifyString
from couchpotato.core.helpers.variable import getImdb, md5
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.base import Provider
log =... | 1,971 | Python | .py | 50 | 31.68 | 111 | 0.648947 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,799 | base.py | CouchPotato_CouchPotatoServer/couchpotato/core/media/_base/providers/metadata/base.py | from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
log = CPLog(__name__)
class MetaDataBase(Plugin):
pass
| 153 | Python | .py | 5 | 28.2 | 48 | 0.806897 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |