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,300 | session.py | CouchPotato_CouchPotatoServer/libs/xmpp/session.py | ##
## XMPP server
##
## Copyright (C) 2004 Alexey "Snake" Nezhdanov
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
... | 16,899 | Python | .py | 320 | 43.253125 | 158 | 0.646828 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,301 | commands.py | CouchPotato_CouchPotatoServer/libs/xmpp/commands.py | ## $Id: commands.py,v 1.17 2007/08/28 09:54:15 normanr Exp $
## Ad-Hoc Command manager
## Mike Albon (c) 5th January 2005
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either versio... | 16,116 | Python | .py | 294 | 45.054422 | 394 | 0.648743 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,302 | filetransfer.py | CouchPotato_CouchPotatoServer/libs/xmpp/filetransfer.py | ## filetransfer.py
##
## Copyright (C) 2004 Alexey "Snake" Nezhdanov
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2, or (at your option)
## any later version... | 10,157 | Python | .py | 185 | 45.318919 | 202 | 0.639888 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,303 | __init__.py | CouchPotato_CouchPotatoServer/libs/tus/__init__.py | import os
import base64
import logging
import argparse
import requests
LOG_LEVEL = logging.INFO
DEFAULT_CHUNK_SIZE = 4 * 1024 * 1024
TUS_VERSION = '1.0.0'
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.NullHandler())
class TusError(Exception):
pass
def _init():
... | 4,988 | Python | .py | 145 | 27.606897 | 77 | 0.640058 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,304 | element.py | CouchPotato_CouchPotatoServer/libs/bs4/element.py | import collections
import re
import sys
import warnings
from bs4.dammit import EntitySubstitution
DEFAULT_OUTPUT_ENCODING = "utf-8"
PY3K = (sys.version_info[0] > 2)
whitespace_re = re.compile("\s+")
def _alias(attr):
"""Alias one attribute name to another for backward compatibility"""
@property
def alias... | 61,538 | Python | .py | 1,383 | 32.560376 | 113 | 0.573965 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,305 | diagnose.py | CouchPotato_CouchPotatoServer/libs/bs4/diagnose.py | """Diagnostic functions, mainly for use when doing tech support."""
import cProfile
from StringIO import StringIO
from HTMLParser import HTMLParser
import bs4
from bs4 import BeautifulSoup, __version__
from bs4.builder import builder_registry
import os
import pstats
import random
import tempfile
import time
import tra... | 6,315 | Python | .py | 168 | 30.565476 | 128 | 0.624201 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,306 | __init__.py | CouchPotato_CouchPotatoServer/libs/bs4/__init__.py | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup uses a pluggable XML or HTML parser to parse a
(possibly invalid) document into a tree representation. Beautiful Soup
provides provides methods and Pythonic idioms that make it easy to
navigate... | 15,401 | Python | .py | 340 | 34.826471 | 232 | 0.613805 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,307 | testing.py | CouchPotato_CouchPotatoServer/libs/bs4/testing.py | """Helper classes for tests."""
import copy
import functools
import unittest
from unittest import TestCase
from bs4 import BeautifulSoup
from bs4.element import (
CharsetMetaAttributeValue,
Comment,
ContentMetaAttributeValue,
Doctype,
SoupStrainer,
)
from bs4.builder import HTMLParserTreeBuilder
d... | 24,510 | Python | .py | 477 | 42.677149 | 237 | 0.631073 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,308 | dammit.py | CouchPotato_CouchPotatoServer/libs/bs4/dammit.py | # -*- coding: utf-8 -*-
"""Beautiful Soup bonus library: Unicode, Dammit
This library converts a bytestream to Unicode through any means
necessary. It is heavily based on code from Mark Pilgrim's Universal
Feed Parser. It works best on XML and XML, but it does not rewrite the
XML or HTML to reflect a new encoding; tha... | 29,302 | Python | .py | 746 | 28.896783 | 91 | 0.50821 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,309 | _htmlparser.py | CouchPotato_CouchPotatoServer/libs/bs4/builder/_htmlparser.py | """Use the HTMLParser library to parse HTML files that aren't too bad."""
__all__ = [
'HTMLParserTreeBuilder',
]
from HTMLParser import (
HTMLParser,
HTMLParseError,
)
import sys
import warnings
# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
# argument, which we'd like to s... | 8,839 | Python | .py | 224 | 30.459821 | 318 | 0.57942 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,310 | _lxml.py | CouchPotato_CouchPotatoServer/libs/bs4/builder/_lxml.py | __all__ = [
'LXMLTreeBuilderForXML',
'LXMLTreeBuilder',
]
from io import BytesIO
from StringIO import StringIO
import collections
from lxml import etree
from bs4.element import Comment, Doctype, NamespacedAttribute
from bs4.builder import (
FAST,
HTML,
HTMLTreeBuilder,
PERMISSIVE,
Parse... | 8,661 | Python | .py | 197 | 34.248731 | 82 | 0.628382 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,311 | __init__.py | CouchPotato_CouchPotatoServer/libs/bs4/builder/__init__.py | from collections import defaultdict
import itertools
import sys
from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
whitespace_re
)
__all__ = [
'HTMLTreeBuilder',
'SAXTreeBuilder',
'TreeBuilder',
'TreeBuilderRegistry',
]
# Some useful features for a Tree... | 11,151 | Python | .py | 264 | 33.109848 | 80 | 0.620222 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,312 | _html5lib.py | CouchPotato_CouchPotatoServer/libs/bs4/builder/_html5lib.py | __all__ = [
'HTML5TreeBuilder',
]
import warnings
from bs4.builder import (
PERMISSIVE,
HTML,
HTML_5,
HTMLTreeBuilder,
)
from bs4.element import NamespacedAttribute
import html5lib
from html5lib.constants import namespaces
from bs4.element import (
Comment,
Doctype,
NavigableStr... | 10,647 | Python | .py | 237 | 35.299578 | 159 | 0.639452 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,313 | client.py | CouchPotato_CouchPotatoServer/libs/suds/client.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 25,971 | Python | .py | 725 | 26.853793 | 84 | 0.589591 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,314 | wsse.py | CouchPotato_CouchPotatoServer/libs/suds/wsse.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 5,981 | Python | .py | 186 | 24.860215 | 90 | 0.611189 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,315 | sudsobject.py | CouchPotato_CouchPotatoServer/libs/suds/sudsobject.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 11,165 | Python | .py | 335 | 23.883582 | 84 | 0.536643 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,316 | plugin.py | CouchPotato_CouchPotatoServer/libs/suds/plugin.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 7,228 | Python | .py | 217 | 25.801843 | 76 | 0.63047 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,317 | properties.py | CouchPotato_CouchPotatoServer/libs/suds/properties.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 16,223 | Python | .py | 487 | 24.262834 | 80 | 0.57116 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,318 | options.py | CouchPotato_CouchPotatoServer/libs/suds/options.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 5,074 | Python | .py | 116 | 33.387931 | 86 | 0.585203 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,319 | cache.py | CouchPotato_CouchPotatoServer/libs/suds/cache.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 9,133 | Python | .py | 292 | 22.181507 | 76 | 0.564829 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,320 | metrics.py | CouchPotato_CouchPotatoServer/libs/suds/metrics.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 2,004 | Python | .py | 53 | 32.037736 | 76 | 0.65242 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,321 | builder.py | CouchPotato_CouchPotatoServer/libs/suds/builder.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,220 | Python | .py | 109 | 28.688073 | 85 | 0.590504 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,322 | __init__.py | CouchPotato_CouchPotatoServer/libs/suds/__init__.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,394 | Python | .py | 134 | 25.88806 | 85 | 0.608913 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,323 | wsdl.py | CouchPotato_CouchPotatoServer/libs/suds/wsdl.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 31,503 | Python | .py | 839 | 27.147795 | 88 | 0.569207 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,324 | reader.py | CouchPotato_CouchPotatoServer/libs/suds/reader.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 5,243 | Python | .py | 150 | 27.413333 | 76 | 0.618793 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,325 | store.py | CouchPotato_CouchPotatoServer/libs/suds/store.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 18,425 | Python | .py | 515 | 30.201942 | 169 | 0.675075 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,326 | resolver.py | CouchPotato_CouchPotatoServer/libs/suds/resolver.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 15,814 | Python | .py | 450 | 25.897778 | 86 | 0.57564 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,327 | soaparray.py | CouchPotato_CouchPotatoServer/libs/suds/soaparray.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 2,262 | Python | .py | 63 | 31.460317 | 76 | 0.693437 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,328 | serviceproxy.py | CouchPotato_CouchPotatoServer/libs/suds/serviceproxy.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 2,978 | Python | .py | 73 | 34.041096 | 88 | 0.65272 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,329 | servicedefinition.py | CouchPotato_CouchPotatoServer/libs/suds/servicedefinition.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 8,478 | Python | .py | 231 | 26.480519 | 84 | 0.545689 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,330 | encoded.py | CouchPotato_CouchPotatoServer/libs/suds/umx/encoded.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,197 | Python | .py | 116 | 28.474138 | 76 | 0.625555 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,331 | typed.py | CouchPotato_CouchPotatoServer/libs/suds/umx/typed.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,646 | Python | .py | 124 | 29.943548 | 76 | 0.64764 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,332 | attrlist.py | CouchPotato_CouchPotatoServer/libs/suds/umx/attrlist.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 2,811 | Python | .py | 80 | 27.8625 | 81 | 0.623188 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,333 | basic.py | CouchPotato_CouchPotatoServer/libs/suds/umx/basic.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 1,394 | Python | .py | 36 | 34.916667 | 76 | 0.719911 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,334 | __init__.py | CouchPotato_CouchPotatoServer/libs/suds/umx/__init__.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 1,811 | Python | .py | 48 | 31.8125 | 76 | 0.656963 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,335 | core.py | CouchPotato_CouchPotatoServer/libs/suds/umx/core.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 7,575 | Python | .py | 197 | 29.228426 | 90 | 0.614286 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,336 | sxbuiltin.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/sxbuiltin.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 7,297 | Python | .py | 237 | 21.607595 | 76 | 0.56338 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,337 | deplist.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/deplist.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,052 | Python | .py | 127 | 23.433071 | 76 | 0.548005 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,338 | __init__.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/__init__.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 3,007 | Python | .py | 77 | 33.766234 | 87 | 0.683328 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,339 | query.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/query.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 6,451 | Python | .py | 179 | 27.77095 | 82 | 0.625568 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,340 | sxbase.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/sxbase.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 19,777 | Python | .py | 600 | 23.303333 | 81 | 0.550898 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,341 | sxbasic.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/sxbasic.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 22,829 | Python | .py | 692 | 23.656069 | 93 | 0.565794 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,342 | schema.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/schema.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 14,328 | Python | .py | 387 | 27.73385 | 86 | 0.592436 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,343 | doctor.py | CouchPotato_CouchPotatoServer/libs/suds/xsd/doctor.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 6,308 | Python | .py | 196 | 24.311224 | 76 | 0.594162 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,344 | attribute.py | CouchPotato_CouchPotatoServer/libs/suds/sax/attribute.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 5,788 | Python | .py | 165 | 26.793939 | 76 | 0.601265 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,345 | element.py | CouchPotato_CouchPotatoServer/libs/suds/sax/element.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 36,480 | Python | .py | 1,061 | 24.3082 | 83 | 0.55539 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,346 | date.py | CouchPotato_CouchPotatoServer/libs/suds/sax/date.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 10,456 | Python | .py | 339 | 21.843658 | 76 | 0.535262 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,347 | text.py | CouchPotato_CouchPotatoServer/libs/suds/sax/text.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 3,567 | Python | .py | 99 | 28.464646 | 76 | 0.613416 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,348 | __init__.py | CouchPotato_CouchPotatoServer/libs/suds/sax/__init__.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 3,253 | Python | .py | 92 | 29.771739 | 76 | 0.663458 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,349 | document.py | CouchPotato_CouchPotatoServer/libs/suds/sax/document.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 1,810 | Python | .py | 50 | 30.66 | 76 | 0.663182 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,350 | parser.py | CouchPotato_CouchPotatoServer/libs/suds/sax/parser.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,461 | Python | .py | 120 | 29.816667 | 76 | 0.644703 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,351 | enc.py | CouchPotato_CouchPotatoServer/libs/suds/sax/enc.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 2,720 | Python | .py | 72 | 30.833333 | 119 | 0.593524 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,352 | binding.py | CouchPotato_CouchPotatoServer/libs/suds/bindings/binding.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 19,047 | Python | .py | 498 | 28.307229 | 87 | 0.590805 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,353 | __init__.py | CouchPotato_CouchPotatoServer/libs/suds/bindings/__init__.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 917 | Python | .py | 19 | 47.210526 | 76 | 0.773942 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,354 | rpc.py | CouchPotato_CouchPotatoServer/libs/suds/bindings/rpc.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 3,141 | Python | .py | 83 | 30.759036 | 78 | 0.647822 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,355 | document.py | CouchPotato_CouchPotatoServer/libs/suds/bindings/document.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 5,792 | Python | .py | 148 | 29.587838 | 90 | 0.60193 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,356 | multiref.py | CouchPotato_CouchPotatoServer/libs/suds/bindings/multiref.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,181 | Python | .py | 114 | 28.736842 | 81 | 0.62338 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,357 | encoded.py | CouchPotato_CouchPotatoServer/libs/suds/mx/encoded.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,651 | Python | .py | 123 | 29.243902 | 78 | 0.609257 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,358 | typer.py | CouchPotato_CouchPotatoServer/libs/suds/mx/typer.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,116 | Python | .py | 112 | 28.982143 | 83 | 0.60393 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,359 | basic.py | CouchPotato_CouchPotatoServer/libs/suds/mx/basic.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 1,657 | Python | .py | 42 | 35.071429 | 76 | 0.698007 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,360 | literal.py | CouchPotato_CouchPotatoServer/libs/suds/mx/literal.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 9,517 | Python | .py | 265 | 26.996226 | 83 | 0.606256 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,361 | __init__.py | CouchPotato_CouchPotatoServer/libs/suds/mx/__init__.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 1,878 | Python | .py | 52 | 29.596154 | 76 | 0.641111 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,362 | appender.py | CouchPotato_CouchPotatoServer/libs/suds/mx/appender.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 9,252 | Python | .py | 268 | 25.906716 | 77 | 0.610017 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,363 | core.py | CouchPotato_CouchPotatoServer/libs/suds/mx/core.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 4,839 | Python | .py | 139 | 27.395683 | 77 | 0.631737 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,364 | https.py | CouchPotato_CouchPotatoServer/libs/suds/transport/https.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 3,634 | Python | .py | 84 | 35.047619 | 79 | 0.668099 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,365 | options.py | CouchPotato_CouchPotatoServer/libs/suds/transport/options.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 2,211 | Python | .py | 52 | 34.346154 | 76 | 0.611989 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,366 | __init__.py | CouchPotato_CouchPotatoServer/libs/suds/transport/__init__.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 3,895 | Python | .py | 115 | 26.852174 | 76 | 0.622692 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,367 | http.py | CouchPotato_CouchPotatoServer/libs/suds/transport/http.py | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | 6,132 | Python | .py | 166 | 27.993976 | 76 | 0.617029 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,368 | __init__.py | CouchPotato_CouchPotatoServer/libs/logr/__init__.py | # logr - Simple python logging wrapper
# Packed by Dean Gardiner <gardiner91@gmail.com>
#
# File part of:
# rdio-sock - Rdio WebSocket Library
# Copyright (C) 2013 fzza- <fzzzzzzzza@gmail.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License... | 6,565 | Python | .py | 172 | 28.843023 | 104 | 0.589117 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,369 | __init__.py | CouchPotato_CouchPotatoServer/libs/pytwitter/__init__.py | #!/usr/bin/env python
#
# vim: sw=2 ts=2 sts=2
#
# Copyright 2007 The Python-Twitter Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICE... | 175,429 | Python | .py | 3,901 | 31.144322 | 163 | 0.55575 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,370 | __init__.py | CouchPotato_CouchPotatoServer/libs/importhelper/__init__.py | """Backport of importlib.import_module from 3.x."""
# While not critical (and in no way guaranteed!), it would be nice to keep this
# code compatible with Python 2.3.
import sys
def _resolve_name(name, package, level):
"""Return the absolute name of the module to be imported."""
if not hasattr(package, 'rindex... | 1,327 | Python | .py | 33 | 32.575758 | 79 | 0.626843 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,371 | iputil.py | CouchPotato_CouchPotatoServer/libs/pyutil/iputil.py | # from the Python Standard Library
import os, re, socket, sys, subprocess
# from Twisted
from twisted.internet import defer, threads, reactor
from twisted.internet.protocol import DatagramProtocol
from twisted.python.procutils import which
from twisted.python import log
try:
import resource
def increase_rlimi... | 9,752 | Python | .py | 226 | 35.747788 | 129 | 0.629255 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,372 | hashexpand.py | CouchPotato_CouchPotatoServer/libs/pyutil/hashexpand.py | # Copyright (c) 2002-2012 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
import warnings
"""
Cryptographically strong pseudo-random number generator based on SHA256.
"""
class SHA256Expander:
"""
Provide a cryptographically strong pseudo-random number generator base... | 2,890 | Python | .py | 64 | 36.390625 | 100 | 0.652703 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,373 | dictutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/dictutil.py | """
Tools to mess with dicts.
"""
import warnings
import copy, operator
from bisect import bisect_left, insort_left
from pyutil.assertutil import _assert, precondition
def move(k, d1, d2, strict=False):
"""
Move item with key k from d1 to d2.
"""
warnings.warn("deprecated", DeprecationWarning)
if... | 20,151 | Python | .py | 491 | 31.749491 | 330 | 0.562468 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,374 | twistedutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/twistedutil.py | # Copyright (c) 2005-2009 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
import warnings
# from the Twisted library
from twisted.internet import reactor
# from the pyutil library
from weakutil import WeakMethod
def callLater_weakly(delay, func, *args, **kwargs):
"""
... | 956 | Python | .py | 19 | 46.052632 | 200 | 0.755102 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,375 | assertutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/assertutil.py | # Copyright (c) 2003-2009 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
Tests useful in assertion checking, prints out nicely formated messages too.
"""
from humanreadable import hr
def _assert(___cond=False, *___args, **___kwargs):
if ___cond:
return True
... | 2,753 | Python | .py | 52 | 46.25 | 147 | 0.518381 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,376 | jsonutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/jsonutil.py | # -*- coding: utf-8 -*-
# Copyright (c) 2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
# We require simplejson>= 2.1.0 and set its default behavior to
# use_decimal=True. This retains backwards compatibility with previous
# versions of jsonutil (although it means jsonutil... | 18,420 | Python | .py | 377 | 43.35809 | 79 | 0.678969 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,377 | odict.py | CouchPotato_CouchPotatoServer/libs/pyutil/odict.py | # Copyright (c) 2002-2009 Zooko "Zooko" Wilcox-O'Hearn
"""
This module offers a Ordered Dict, which is a dict that preserves
insertion order. See PEP 372 for description of the problem. This
implementation uses a linked-list to get good O(1) asymptotic
performance. (Actually it is O(hashtable-update-cost), but wha... | 20,991 | Python | .py | 477 | 33.997904 | 274 | 0.583027 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,378 | mathutil.py~ | CouchPotato_CouchPotatoServer/libs/pyutil/mathutil.py~ | # Copyright (c) 2005-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
A few commonly needed functions.
"""
import math
def div_ceil(n, d):
"""
The smallest integer k such that k*d >= n.
"""
return (n/d) + (n%d != 0)
def next_multiple(n, k):
"""
... | 2,251 | Python | .py | 87 | 20.643678 | 78 | 0.559441 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,379 | _version.py | CouchPotato_CouchPotatoServer/libs/pyutil/_version.py |
# This is the version of this tree, as created by setup.py darcsver from the darcs patch
# information: the main version number is taken from the most recent release
# tag. If some patches have been added since the last release, this will have a
# -NN "build number" suffix, or else a -rNN "revision number" suffix. Ple... | 855 | Python | .py | 15 | 54.266667 | 88 | 0.763723 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,380 | strutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/strutil.py | # Copyright (c) 2002-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
def commonprefix(l):
cp = []
for i in range(min(map(len, l))):
c = l[0][i]
for s in l[1:]:
if s[i] != c:
return ''.join(cp)
cp.append(c)
ret... | 1,121 | Python | .py | 43 | 19.023256 | 74 | 0.475303 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,381 | randutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/randutil.py | # Copyright (c) 2002-2012 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
import warnings
import os, random
try:
import hashexpand
class SHA256Random(hashexpand.SHA256Expander, random.Random):
def __init__(self, seed=None, deterministic=True):
warni... | 2,725 | Python | .py | 67 | 33.38806 | 127 | 0.665657 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,382 | humanreadable.py | CouchPotato_CouchPotatoServer/libs/pyutil/humanreadable.py | # Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002-2009 Zooko "Zooko" Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
import exceptions, os
from repr import Repr
class BetterRepr(Repr):
def __init__(self):
Repr.__init__(self)
# Note: These le... | 4,483 | Python | .py | 101 | 34.693069 | 218 | 0.545101 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,383 | fileutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/fileutil.py | # Copyright (c) 2002-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
Futz with files like a pro.
"""
import errno, exceptions, os, stat, tempfile
try:
import bsddb
except ImportError:
DBNoSuchFileError = None
else:
DBNoSuchFileError = bsddb.db.DBNoSuchFi... | 8,863 | Python | .py | 229 | 31.318777 | 235 | 0.633613 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,384 | logutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/logutil.py | # Copyright (c) 2005-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
# This little file makes it so that we can use "log.msg()" and the contents
# get logged to the Twisted logger if present, else to the Python Standard
# Library logger.
import warnings
warnings.warn("dep... | 582 | Python | .py | 16 | 32.6875 | 75 | 0.73357 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,385 | repeatable_random.py | CouchPotato_CouchPotatoServer/libs/pyutil/repeatable_random.py | """
If you execute force_repeatability() then the following things are changed in the runtime:
1. random.random() and its sibling functions, and random.Random.seed() in the random module are seeded with a known seed so that they will return the same sequence on each run.
2. os.urandom() is replaced by a fake urandom... | 3,622 | Python | .py | 74 | 42.756757 | 304 | 0.691393 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,386 | nummedobj.py | CouchPotato_CouchPotatoServer/libs/pyutil/nummedobj.py | # Copyright (c) 2002-2009 Zooko Wilcox-O'Hearn
# mailto:zooko@zooko.com
# This file is part of pyutil; see README.rst for licensing terms.
import dictutil
class NummedObj(object):
"""
This is useful for nicer debug printouts. Instead of objects of the same class being
distinguished from one another by t... | 2,141 | Python | .py | 40 | 46.725 | 116 | 0.659124 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,387 | find_exe.py | CouchPotato_CouchPotatoServer/libs/pyutil/find_exe.py | import warnings
import os, sys
from twisted.python.procutils import which
def find_exe(exename):
"""
Look for something named exename or exename + ".py".
This is a kludge.
@return: a list containing one element which is the path to the exename
(if it is thought to be executable), or else the ... | 918 | Python | .py | 26 | 28.769231 | 76 | 0.631757 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,388 | version_class.py | CouchPotato_CouchPotatoServer/libs/pyutil/version_class.py | # -*- coding: utf-8 -*-
# Copyright (c) 2004-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
extended version number class
"""
# verlib a.k.a. distutils.version by Tarek Ziadé.
from pyutil.verlib import NormalizedVersion
def cmp_version(v1, v2):
return cmp(Normali... | 5,299 | Python | .py | 122 | 38.057377 | 249 | 0.625996 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,389 | cache.py | CouchPotato_CouchPotatoServer/libs/pyutil/cache.py | # Copyright (c) 2002-2010 Zooko "Zooko" Wilcox-O'Hearn
"""
This module offers three implementations of an LRUCache, which is a dict that
drops items according to a Least-Recently-Used policy if the dict exceeds a
fixed maximum size.
Warning: if -O optimizations are not turned on then LRUCache performs
extensive self... | 27,000 | Python | .py | 653 | 31.174579 | 268 | 0.569237 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,390 | __init__.py | CouchPotato_CouchPotatoServer/libs/pyutil/__init__.py | """
Library of useful Python functions and classes.
Projects that have contributed substantial portions to pyutil:
U{Mojo Nation<http://mojonation.net/>}
U{Mnet<http://sf.net/projects/mnet>}
U{Allmydata<http://allmydata.com/>}
U{Tahoe-LAFS<http://tahoe-lafs.org/>}
mailto:zooko@zooko.com
pyutil web site: U{http://tah... | 663 | Python | .py | 19 | 32.631579 | 80 | 0.729688 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,391 | iputil.py~ | CouchPotato_CouchPotatoServer/libs/pyutil/iputil.py~ | # portions extracted from ipaddresslib by Autonomous Zone Industries, LGPL (author: Greg Smith)
# portions adapted from nattraverso.ipdiscover
# portions authored by Brian Warner, working for Allmydata
# most recent version authored by Zooko O'Whielacronx, working for Allmydata
# from the Python Standard Library
impor... | 10,720 | Python | .py | 244 | 36.52459 | 129 | 0.639858 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,392 | memutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/memutil.py | # Copyright (c) 2002-2010 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
# from the Python Standard Library
import exceptions, gc, math, operator, os, sys, types
# from the pyutil library
from assertutil import precondition
import mathutil
class Canary:
"""
Want to ... | 20,767 | Python | .py | 521 | 31.641075 | 134 | 0.605272 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,393 | PickleSaver.py | CouchPotato_CouchPotatoServer/libs/pyutil/PickleSaver.py | # Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002-2009 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
An object that makes some of the attributes of your class persistent, pickling
them and lazily writing them to a file.
"""
# from the Python Standard... | 8,932 | Python | .py | 169 | 42.822485 | 329 | 0.637842 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,394 | increasing_timer.py | CouchPotato_CouchPotatoServer/libs/pyutil/increasing_timer.py | # Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002-2009 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
This module was invented when it was discovered that time.time() can return
decreasing answers, which was causing scheduled tasks to get executed out ... | 6,607 | Python | .py | 114 | 50.315789 | 110 | 0.698192 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,395 | benchutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/benchutil.py | # Copyright (c) 2002-2013 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
Benchmark a function for its behavior with respect to N.
How to use this module:
1. Define a function which runs the code that you want to benchmark. The
function takes a single argument which is t... | 9,510 | Python | .py | 212 | 40.089623 | 330 | 0.65277 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,396 | observer.py | CouchPotato_CouchPotatoServer/libs/pyutil/observer.py | # -*- test-case-name: allmydata.test.test_observer -*-
from twisted.internet import defer
try:
from foolscap.eventual import eventually
eventually # http://divmod.org/trac/ticket/1499
except ImportError:
from twisted.internet import reactor
def eventually(f, *args, **kwargs):
return reactor.cal... | 3,143 | Python | .py | 81 | 31.802469 | 78 | 0.652431 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,397 | lineutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/lineutil.py | #!/usr/bin/env python
import os, re
def lineify_fileobjs(ifo, ofo, strip=False):
from pyutil.strutil import pop_trailing_newlines, split_on_newlines
for l in ifo:
for sl in split_on_newlines(pop_trailing_newlines(l)):
if strip:
sl = sl.strip()
ofo.write(pop_trailing_newlines(sl) + '\n')
def lineify_fil... | 1,661 | Python | .py | 51 | 29.941176 | 108 | 0.738452 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,398 | verlib.py | CouchPotato_CouchPotatoServer/libs/pyutil/verlib.py | # -*- coding: utf-8 -*-
"""
"Rational" version definition and parsing for DistutilsVersionFight
discussion at PyCon 2009.
This was written by Tarek Ziadé.
Zooko copied it from http://bitbucket.org/tarek/distutilsversion/ on 2010-07-29.
"""
import re
class IrrationalVersionError(Exception):
"""This is an irratio... | 12,275 | Python | .py | 280 | 35.417857 | 105 | 0.537959 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,399 | platformutil.py | CouchPotato_CouchPotatoServer/libs/pyutil/platformutil.py | # Thanks to Daenyth for help porting this to Arch Linux.
import os, platform, re, subprocess
_distributor_id_cmdline_re = re.compile("(?:Distributor ID:)\s*(.*)", re.I)
_release_cmdline_re = re.compile("(?:Release:)\s*(.*)", re.I)
_distributor_id_file_re = re.compile("(?:DISTRIB_ID\s*=)\s*(.*)", re.I)
_release_file_r... | 3,607 | Python | .py | 79 | 36.848101 | 144 | 0.61363 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |