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
20,800
base.py
evilhero_mylar/lib/apscheduler/schedulers/base.py
from __future__ import print_function from abc import ABCMeta, abstractmethod from collections import MutableMapping from threading import RLock from datetime import datetime, timedelta from logging import getLogger import warnings import sys from pkg_resources import iter_entry_points from tzlocal import get_localzo...
42,201
Python
.py
822
38.609489
99
0.600704
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,801
win32.py
evilhero_mylar/lib/tzlocal/win32.py
try: import _winreg as winreg except ImportError: import winreg from tzlocal.windows_tz import win_tz import pytz _cache_tz = None def valuestodict(key): """Convert a registry key's values to a dictionary.""" dict = {} size = winreg.QueryInfoKey(key)[1] for i in range(size): data = wi...
3,135
Python
.py
77
33.064935
96
0.653517
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,802
windows_tz.py
evilhero_mylar/lib/tzlocal/windows_tz.py
# This file is autogenerated by the get_windows_info.py script # Do not edit. win_tz = {'AUS Central Standard Time': 'Australia/Darwin', 'AUS Eastern Standard Time': 'Australia/Sydney', 'Afghanistan Standard Time': 'Asia/Kabul', 'Alaskan Standard Time': 'America/Anchorage', 'Arab Standard Time': 'Asia/Riyadh', 'Ar...
24,987
Python
.py
540
44.27963
62
0.738515
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,803
unix.py
evilhero_mylar/lib/tzlocal/unix.py
from __future__ import with_statement import os import re import pytz _cache_tz = None def _tz_from_env(tzenv): if tzenv[0] == ':': tzenv = tzenv[1:] # TZ specifies a file if os.path.exists(tzenv): with open(tzenv, 'rb') as tzfile: return pytz.tzfile.build_tzinfo('local', tzfi...
4,032
Python
.py
95
33.610526
89
0.61348
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,804
__init__.py
evilhero_mylar/lib/tzlocal/__init__.py
import sys if sys.platform == 'win32': from tzlocal.win32 import get_localzone, reload_localzone elif 'darwin' in sys.platform: from tzlocal.darwin import get_localzone, reload_localzone else: from tzlocal.unix import get_localzone, reload_localzone
262
Python
.py
7
34.714286
62
0.788235
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,805
tests.py
evilhero_mylar/lib/tzlocal/tests.py
import sys import os from datetime import datetime import unittest import pytz import tzlocal.unix class TzLocalTests(unittest.TestCase): def test_env(self): tz_harare = tzlocal.unix._tz_from_env(':Africa/Harare') self.assertEqual(tz_harare.zone, 'Africa/Harare') # Some Unices allow this ...
2,567
Python
.py
51
43.039216
105
0.657611
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,806
darwin.py
evilhero_mylar/lib/tzlocal/darwin.py
from __future__ import with_statement import os import pytz _cache_tz = None def _get_localzone(): tzname = os.popen("systemsetup -gettimezone").read().replace("Time Zone: ", "").strip() if not tzname or tzname not in pytz.all_timezones_set: # link will be something like /usr/share/zoneinfo/America/Lo...
842
Python
.py
22
33.590909
91
0.679755
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,807
element.py
evilhero_mylar/lib/bs4/element.py
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __license__ = "MIT" import collections import re import shlex import sys import warnings from bs4.dammit import EntitySubstitution DEFAULT_OUTPUT_ENCODING = "utf-8" PY3K = (sys.version_info[0] > 2) whitespace_re = r...
68,821
Python
.py
1,547
32.621849
175
0.574397
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,808
diagnose.py
evilhero_mylar/lib/bs4/diagnose.py
"""Diagnostic functions, mainly for use when doing tech support.""" # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __license__ = "MIT" import cProfile from StringIO import StringIO from HTMLParser import HTMLParser import bs4 from bs4 import BeautifulSoup, __vers...
6,747
Python
.py
180
30.2
128
0.619091
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,809
__init__.py
evilhero_mylar/lib/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 methods and Pythonic idioms that make it easy to navigate, search,...
20,420
Python
.py
448
34.267857
572
0.599517
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,810
testing.py
evilhero_mylar/lib/bs4/testing.py
"""Helper classes for tests.""" # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __license__ = "MIT" import pickle import copy import functools import unittest from unittest import TestCase from bs4 import BeautifulSoup from bs4.element import ( CharsetMetaAttr...
30,829
Python
.py
631
40.431062
237
0.628867
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,811
dammit.py
evilhero_mylar/lib/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 HTML, but it does not rewrite the XML or HTML to reflect a new encoding; th...
29,930
Python
.py
760
29.014474
91
0.51026
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,812
test_docs.py
evilhero_mylar/lib/bs4/tests/test_docs.py
"Test harness for doctests." # pylint: disable-msg=E0611,W0142 __metaclass__ = type __all__ = [ 'additional_tests', ] import atexit import doctest import os #from pkg_resources import ( # resource_filename, resource_exists, resource_listdir, cleanup_resources) import unittest DOCTEST_FLAGS = ( doctes...
1,067
Python
.py
30
33.7
77
0.643065
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,813
test_lxml.py
evilhero_mylar/lib/bs4/tests/test_lxml.py
"""Tests to ensure that the lxml tree builder generates good trees.""" import re import warnings try: import lxml.etree LXML_PRESENT = True LXML_VERSION = lxml.etree.LXML_VERSION except ImportError, e: LXML_PRESENT = False LXML_VERSION = (0,) if LXML_PRESENT: from bs4.builder import LXMLTreeB...
2,382
Python
.py
64
31.59375
86
0.692108
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,814
test_builder_registry.py
evilhero_mylar/lib/bs4/tests/test_builder_registry.py
"""Tests of the builder registry.""" import unittest import warnings from bs4 import BeautifulSoup from bs4.builder import ( builder_registry as registry, HTMLParserTreeBuilder, TreeBuilderRegistry, ) try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError: HT...
5,582
Python
.py
117
37.418803
82
0.637534
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,815
test_html5lib.py
evilhero_mylar/lib/bs4/tests/test_html5lib.py
"""Tests to ensure that the html5lib tree builder generates good trees.""" import warnings try: from bs4.builder import HTML5TreeBuilder HTML5LIB_PRESENT = True except ImportError, e: HTML5LIB_PRESENT = False from bs4.element import SoupStrainer from bs4.testing import ( HTML5TreeBuilderSmokeTest, ...
4,908
Python
.py
110
36.409091
120
0.609853
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,816
test_htmlparser.py
evilhero_mylar/lib/bs4/tests/test_htmlparser.py
"""Tests to ensure that the html.parser tree builder generates good trees.""" from pdb import set_trace import pickle from bs4.testing import SoupTest, HTMLTreeBuilderSmokeTest from bs4.builder import HTMLParserTreeBuilder class HTMLParserTreeBuilderSmokeTest(SoupTest, HTMLTreeBuilderSmokeTest): @property de...
1,191
Python
.py
27
37.814815
79
0.698358
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,817
test_soup.py
evilhero_mylar/lib/bs4/tests/test_soup.py
# -*- coding: utf-8 -*- """Tests of Beautiful Soup as a whole.""" from pdb import set_trace import logging import unittest import sys import tempfile from bs4 import ( BeautifulSoup, BeautifulStoneSoup, ) from bs4.element import ( CharsetMetaAttributeValue, ContentMetaAttributeValue, SoupStrainer,...
20,345
Python
.py
411
40.423358
149
0.644027
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,818
test_tree.py
evilhero_mylar/lib/bs4/tests/test_tree.py
# -*- coding: utf-8 -*- """Tests for Beautiful Soup's tree traversal methods. The tree traversal methods are the main advantage of using Beautiful Soup over just using a parser. Different parsers will build different Beautiful Soup trees given the same markup, but all Beautiful Soup trees can be traversed with the m...
78,279
Python
.py
1,660
37.827108
118
0.585619
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,819
_htmlparser.py
evilhero_mylar/lib/bs4/builder/_htmlparser.py
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __all__ = [ 'HTMLParserTreeBuilder', ] from HTMLParser import HTMLParser try: from HTMLParser import HTMLParseError except Impor...
11,609
Python
.py
270
33.8
318
0.602165
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,820
_lxml.py
evilhero_mylar/lib/bs4/builder/_lxml.py
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __all__ = [ 'LXMLTreeBuilderForXML', 'LXMLTreeBuilder', ] from io import BytesIO from StringIO import StringIO import collections from lxml import etree from bs4.element import ( Comment, Doctype, ...
9,468
Python
.py
219
33.762557
82
0.63279
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,821
__init__.py
evilhero_mylar/lib/bs4/builder/__init__.py
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from collections import defaultdict import itertools import sys from bs4.element import ( CharsetMetaAttributeValue, ContentMetaAttributeValue, HTMLAwareEntitySubstitution, whitespace_re ) __all__...
11,553
Python
.py
274
33.244526
140
0.623797
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,822
_html5lib.py
evilhero_mylar/lib/bs4/builder/_html5lib.py
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __all__ = [ 'HTML5TreeBuilder', ] import warnings import re from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import ( NamespacedAttribute, wh...
16,711
Python
.py
365
34.580822
159
0.603746
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,823
evaljs.py
evilhero_mylar/lib/js2py/evaljs.py
# coding=utf-8 """ This module is still experimental! """ from .translators import translate_js, DEFAULT_HEADER import sys import time import json import six import os import hashlib import codecs import pyjs __all__ = ['EvalJs', 'translate_js', 'import_js', 'eval_js', 'translate_file', 'run_file'] DEBUG = False de...
8,198
Python
.py
201
32.626866
126
0.612481
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,824
pyjs.py
evilhero_mylar/lib/js2py/pyjs.py
from .base import * from .constructors.jsmath import Math from .constructors.jsdate import Date from .constructors.jsobject import Object from .constructors.jsfunction import Function from .constructors.jsstring import String from .constructors.jsnumber import Number from .constructors.jsboolean import Boolean from .co...
1,836
Python
.py
43
38.511628
100
0.708123
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,825
__init__.py
evilhero_mylar/lib/js2py/__init__.py
# The MIT License # # Copyright 2014, 2015 Piotr Dabkowski # # 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, modif...
2,684
Python
.py
52
47.980769
110
0.731166
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,826
base.py
evilhero_mylar/lib/js2py/base.py
'''Most important file in Js2Py implementation: PyJs class - father of all PyJs objects''' from copy import copy import re #from translators import translator from .translators.friendly_nodes import REGEXP_CONVERTER from .utils.injector import fix_js_args from types import FunctionType, ModuleType, GeneratorType, Buil...
67,892
Python
.py
1,648
30.938107
140
0.566935
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,827
jsparser.py
evilhero_mylar/lib/js2py/legecy_translators/jsparser.py
""" The process of translating JS will go like that: # TOP = 'imports and scope set' 1. Remove all the comments 2. Replace number, string and regexp literals with markers 4. Remove global Functions and move their translation to the TOP. Also add register code there. 5. Replace inline functions with lvals 6. Rem...
9,809
Python
.py
267
28.614232
117
0.587393
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,828
flow.py
evilhero_mylar/lib/js2py/legecy_translators/flow.py
"""This module translates JS flow into PY flow. Translates: IF ELSE DO WHILE WHILE FOR 123 FOR iter CONTINUE, BREAK, RETURN, LABEL, THROW, TRY, SWITCH """ from utils import * from jsparser import * from nodevisitor import exp_translator import random TO_REGISTER = [] CONTINUE_LABEL = 'JS_CONTINUE_LABEL_%s' BREAK_LA...
16,471
Python
.py
397
33.836272
122
0.609491
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,829
nodevisitor.py
evilhero_mylar/lib/js2py/legecy_translators/nodevisitor.py
from jsparser import * from utils import * import re from utils import * #Note all white space sent to this module must be ' ' so no '\n' REPL = {} #PROBLEMS # <<=, >>=, >>>= # they are unusual so I will not fix that now. a++ +b works fine and a+++++b (a++ + ++b) does not work even in V8 ASSIGNMENT_MATCH = '(?<!=|!...
15,965
Python
.py
430
27.693023
126
0.495183
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,830
constants.py
evilhero_mylar/lib/js2py/legecy_translators/constants.py
from string import ascii_lowercase, digits ################################## StringName = u'PyJsConstantString%d_' NumberName = u'PyJsConstantNumber%d_' RegExpName = u'PyJsConstantRegExp%d_' ################################## ALPHAS = set(ascii_lowercase+ ascii_lowercase.upper()) NUMS = set(digits) IDENTIFIER_START = ...
10,888
Python
.py
270
28.940741
111
0.530345
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,831
exps.py
evilhero_mylar/lib/js2py/legecy_translators/exps.py
""" exp_translate routine: It takes a single line of JS code and returns a SINGLE line of Python code. Note var is not present here because it was removed in previous stages. Also remove this useless void keyword If case of parsing errors it must return a pos of error. 1. Convert all assignment operations to put operat...
3,097
Python
.py
71
35.464789
119
0.562438
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,832
utils.py
evilhero_mylar/lib/js2py/legecy_translators/utils.py
import sys import unicodedata from collections import defaultdict def is_lval(t): """Does not chceck whether t is not resticted or internal""" if not t: return False i = iter(t) if i.next() not in IDENTIFIER_START: return False return all(e in IDENTIFIER_PART for e in i) def is_val...
2,705
Python
.py
64
38.546875
141
0.677075
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,833
nparser.py
evilhero_mylar/lib/js2py/legecy_translators/nparser.py
# JUST FOR NOW, later I will write my own - much faster and better. # Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com> # Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com> # Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com> # Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be> # Copyright (...
99,391
Python
.py
2,732
29.533675
5,076
0.62646
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,834
objects.py
evilhero_mylar/lib/js2py/legecy_translators/objects.py
""" This module removes all objects/arrays from JS source code and replace them with LVALS. Also it has s function translating removed object/array to python code. Use this module just after removing constants. Later move on to removing functions""" OBJECT_LVAL = 'PyJsLvalObject%d_' ARRAY_LVAL = 'PyJsLvalArray%d_' fro...
11,176
Python
.py
258
34.922481
128
0.601433
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,835
functions.py
evilhero_mylar/lib/js2py/legecy_translators/functions.py
"""This module removes JS functions from source code""" from jsparser import * from utils import * INLINE_NAME = 'PyJsLvalInline%d_' INLINE_COUNT = 0 PRE_EXP_STARTS = {'return', 'new', 'void', 'throw', 'typeof', 'in', 'instanceof'} PRE_ALLOWED = IDENTIFIER_PART.union({';', '{', '}', ']', ')', ':'}) INCREMENTS = {'++...
3,698
Python
.py
78
35.833333
138
0.559059
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,836
translator.py
evilhero_mylar/lib/js2py/legecy_translators/translator.py
from flow import translate_flow from constants import remove_constants, recover_constants from objects import remove_objects, remove_arrays, translate_object, translate_array, set_func_translator from functions import remove_functions, reset_inline_count from jsparser import inject_before_lval, indent, dbg TOP_GLOBAL ...
5,676
Python
.py
124
40.467742
105
0.674738
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,837
tokenize.py
evilhero_mylar/lib/js2py/legecy_translators/tokenize.py
from jsparser import * from utils import * # maybe I will try rewriting my parser in the future... Tokenizer makes things much easier and faster, unfortunately I # did not know anything about parsers when I was starting this project so I invented my own.
255
Python
.py
4
62.75
118
0.796813
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,838
injector.py
evilhero_mylar/lib/js2py/utils/injector.py
__all__ = ['fix_js_args'] import types import opcode import six if six.PY3: xrange = range chr = lambda x: x # Opcode constants used for comparison and replacecment LOAD_FAST = opcode.opmap['LOAD_FAST'] LOAD_GLOBAL = opcode.opmap['LOAD_GLOBAL'] STORE_FAST = opcode.opmap['STORE_FAST'] def fix_js_args(func): ...
6,745
Python
.py
159
31.798742
180
0.572975
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,839
definitions.py
evilhero_mylar/lib/js2py/utils/definitions.py
from pyparsing import * IdentifierStart = oneOf(['$', '_']+list(alphas)) Identifier = Combine(IdentifierStart + Optional(Word(alphas+nums+'$_'))) _keywords = ['break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', 'd...
3,141
Python
.py
56
52.107143
137
0.688013
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,840
friendly_nodes.py
evilhero_mylar/lib/js2py/translators/friendly_nodes.py
import binascii from .pyjsparser import PyJsParser import six if six.PY3: basestring = str long = int xrange = range unicode = str REGEXP_CONVERTER = PyJsParser() def to_hex(s): return binascii.hexlify(s.encode('utf8')).decode('utf8') # fucking python 3, I hate it so much ...
8,485
Python
.py
260
26.376923
110
0.540507
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,841
translating_nodes.py
evilhero_mylar/lib/js2py/translators/translating_nodes.py
from __future__ import unicode_literals from .pyjsparserdata import * from .friendly_nodes import * import random import six if six.PY3: from functools import reduce xrange = range unicode = str # number of characters above which expression will be split to multiple lines in order to avoid python parser st...
22,167
Python
.py
514
36.418288
138
0.635882
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,842
pyjsparserdata.py
evilhero_mylar/lib/js2py/translators/pyjsparserdata.py
# The MIT License # # Copyright 2014, 2015 Piotr Dabkowski # # 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, modif...
11,264
Python
.py
263
35.13308
141
0.621592
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,843
jsregexps.py
evilhero_mylar/lib/js2py/translators/jsregexps.py
from pyjsparserdata import * REGEXP_SPECIAL_SINGLE = {'\\', '^', '$', '*', '+', '?', '.'} NOT_PATTERN_CHARS = {'^', '$', '\\', '.', '*', '+', '?', '(', ')', '[', ']', '|'} # what about '{', '}', ??? CHAR_CLASS_ESCAPE = {'d', 'D', 's', 'S', 'w', 'W'} CONTROL_ESCAPE_CHARS = {'f', 'n', 'r', 't', 'v'} CONTROL_LETTERS...
6,875
Python
.py
189
25.179894
118
0.494667
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,844
__init__.py
evilhero_mylar/lib/js2py/translators/__init__.py
# The MIT License # # Copyright 2014, 2015 Piotr Dabkowski # # 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, modif...
1,757
Python
.py
31
54.354839
127
0.76498
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,845
pyjsparser.py
evilhero_mylar/lib/js2py/translators/pyjsparser.py
# The MIT License # # Copyright 2014, 2015 Piotr Dabkowski # # 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, modif...
105,141
Python
.py
2,421
30.799257
200
0.552191
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,846
std_nodes.py
evilhero_mylar/lib/js2py/translators/std_nodes.py
from .pyjsparserdata import * import six class BaseNode: def finish(self): pass def finishArrayExpression(self, elements): self.type = Syntax.ArrayExpression self.elements = elements self.finish() return self def finishArray...
15,451
Python
.py
400
25.08
119
0.569945
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,847
translator.py
evilhero_mylar/lib/js2py/translators/translator.py
from . import pyjsparser #from pyesprima import esprima from . import translating_nodes import hashlib import re # the re below is how we'll recognise numeric constants. # it finds any 'simple numeric that is not preceded with an alphanumeric character # the numeric can be a float (so a dot is found) but # it does no...
6,294
Python
.py
138
40.101449
188
0.665414
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,848
jseval.py
evilhero_mylar/lib/js2py/host/jseval.py
from js2py.base import * import inspect try: from js2py.translators.translator import translate_js except: pass @Js def Eval(code): local_scope = inspect.stack()[3][0].f_locals['var'] global_scope = this.GlobalObject # todo fix scope - we have to behave differently if called through variable other ...
1,521
Python
.py
45
24.777778
95
0.562203
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,849
console.py
evilhero_mylar/lib/js2py/host/console.py
from js2py.base import * @Js def console(): pass @Js def log(): print(arguments[0]) console.put('log', log)
119
Python
.py
8
12.5
24
0.685185
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,850
jsfunctions.py
evilhero_mylar/lib/js2py/host/jsfunctions.py
from js2py.base import * RADIX_CHARS = {'1': 1, '0': 0, '3': 3, '2': 2, '5': 5, '4': 4, '7': 7, '6': 6, '9': 9, '8': 8, 'a': 10, 'c': 12, 'b': 11, 'e': 14, 'd': 13, 'g': 16, 'f': 15, 'i': 18, 'h': 17, 'k': 20, 'j': 19, 'm': 22, 'l': 21, 'o': 24, 'n': 23, 'q': 26, 'p': 25, 's': 28, 'r': 27...
2,314
Python
.py
76
22.763158
113
0.453567
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,851
interface.py
evilhero_mylar/lib/js2py/host/dom/interface.py
from StringIO import StringIO from constants import * from bs4 import BeautifulSoup from js2py.base import * try: import lxml def parse(source): return BeautifulSoup(source, 'lxml') except: def parse(source): return BeautifulSoup(source) x = '''<table> <tbody> <tr> <td>Sha...
1,302
Python
.py
44
24.386364
118
0.667209
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,852
constants.py
evilhero_mylar/lib/js2py/host/dom/constants.py
from js2py.base import * def _get_conts(idl): def is_valid(c): try: exec(c) return 1 except: pass return '\n'.join(filter(is_valid, (' '.join(e.strip(' ;').split()[-3:]) for e in idl.splitlines()))) default_attrs = {'writable':True, 'enumerable':True, 'conf...
1,139
Python
.py
38
25.157895
104
0.648352
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,853
jsnumber.py
evilhero_mylar/lib/js2py/constructors/jsnumber.py
from ..base import * CONSTS = {'prototype': NumberPrototype, 'MAX_VALUE':1.7976931348623157e308, 'MIN_VALUE': 5.0e-324, 'NaN': NaN, 'NEGATIVE_INFINITY': float('-inf'), 'POSITIVE_INFINITY': float('inf')} fill_in_props(Number, CONSTS, {'enumerable': False, ...
703
Python
.py
14
29.714286
74
0.446064
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,854
jsboolean.py
evilhero_mylar/lib/js2py/constructors/jsboolean.py
from ..base import * BooleanPrototype.define_own_property('constructor', {'value': Boolean, 'enumerable': False, 'writable': True, 'configurable': True}) Boole...
570
Python
.py
9
30.888889
75
0.378571
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,855
jsfunction.py
evilhero_mylar/lib/js2py/constructors/jsfunction.py
from ..base import * try: from ..translators.translator import translate_js except: pass @Js def Function(): # convert arguments to python list of strings a = [e.to_string().value for e in arguments.to_list()] body = ';' args = () if len(a): body = '%s;' % a[-1] args = a[:-...
1,476
Python
.py
40
30.1
73
0.625088
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,856
time_helpers.py
evilhero_mylar/lib/js2py/constructors/time_helpers.py
# NOTE: t must be INT!!! import time import datetime import warnings try: from tzlocal import get_localzone LOCAL_ZONE = get_localzone() except: # except all problems... warnings.warn('Please install or fix tzlocal library (pip install tzlocal) in order to make Date object work better. Otherwise I will assu...
4,133
Python
.py
148
22.581081
185
0.631139
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,857
jsregexp.py
evilhero_mylar/lib/js2py/constructors/jsregexp.py
from ..base import * RegExpPrototype.define_own_property('constructor', {'value': RegExp, 'enumerable': False, 'writable': True, 'configurable': True}) RegExp....
566
Python
.py
9
30.444444
75
0.374101
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,858
jsstring.py
evilhero_mylar/lib/js2py/constructors/jsstring.py
from ..base import * # python 3 support import six if six.PY3: unichr = chr @Js def fromCharCode(): args = arguments.to_list() res = u'' for e in args: res +=unichr(e.to_uint16()) return this.Js(res) fromCharCode.own['length']['value'] = Js(1) String.define_own_property('fromCharCode', {'...
1,069
Python
.py
25
24.4
74
0.4375
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,859
jsarray.py
evilhero_mylar/lib/js2py/constructors/jsarray.py
from ..base import * @Js def Array(): if len(arguments)==0 or len(arguments)>1: return arguments.to_list() a = arguments[0] if isinstance(a, PyJsNumber): length = a.to_uint32() if length!=a.value: raise MakeError('RangeError', 'Invalid array length') temp = Js([]...
1,280
Python
.py
31
24.548387
74
0.452936
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,860
jsobject.py
evilhero_mylar/lib/js2py/constructors/jsobject.py
from ..base import * import six #todo Double check everything is OK @Js def Object(): val = arguments.get('0') if val.is_null() or val.is_undefined(): return PyJsObject(prototype=ObjectPrototype) return val.to_object() @Js def object_constructor(): if len(arguments): val = arguments....
6,464
Python
.py
144
35.534722
129
0.627146
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,861
jsmath.py
evilhero_mylar/lib/js2py/constructors/jsmath.py
from ..base import * import math import random Math = PyJsObject(prototype=ObjectPrototype) Math.Class = 'Math' CONSTANTS = {'E': 2.7182818284590452354, 'LN10': 2.302585092994046, 'LN2': 0.6931471805599453, 'LOG2E': 1.4426950408889634, 'LOG10E': 0.4342944819032518, ...
3,747
Python
.py
128
19.328125
69
0.495135
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,862
jsdate.py
evilhero_mylar/lib/js2py/constructors/jsdate.py
from ..base import * from .time_helpers import * TZ_OFFSET = (time.altzone//3600) ABS_OFFSET = abs(TZ_OFFSET) TZ_NAME = time.tzname[1] ISO_FORMAT = '%s-%s-%sT%s:%s:%s.%sZ' @Js def Date(year, month, date, hours, minutes, seconds, ms): return now().to_string() Date.Class = 'Date' def now(): return PyJsDate(int...
10,194
Python
.py
282
27.14539
179
0.587105
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,863
jsnumber.py
evilhero_mylar/lib/js2py/prototypes/jsnumber.py
import six if six.PY3: basestring = str long = int xrange = range unicode = str RADIX_SYMBOLS = {0: '0', 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6', 7: '7', 8: '8', 9: '9', 10: 'a', 11: 'b', 12: 'c', 13: 'd', 14: 'e', 15: 'f', 16: 'g', 17: 'h', 18: 'i', 19: 'j', 20: 'k', ...
3,577
Python
.py
85
32.529412
117
0.555651
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,864
jsboolean.py
evilhero_mylar/lib/js2py/prototypes/jsboolean.py
class BooleanPrototype: def toString(): if this.Class!='Boolean': raise this.Js(TypeError)('this must be a boolean') return 'true' if this.value else 'false' def valueOf(): if this.Class!='Boolean': raise this.Js(TypeError)('this must be a boolean') ret...
339
Python
.py
9
28.777778
62
0.616099
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,865
jserror.py
evilhero_mylar/lib/js2py/prototypes/jserror.py
class ErrorPrototype: def toString(): if this.TYPE!='Object': raise this.MakeError('TypeError', 'Error.prototype.toString called on non-object') name = this.get('name') name = 'Error' if name.is_undefined() else name.to_string().value msg = this.get('message') ms...
427
Python
.py
9
39.333333
94
0.61244
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,866
jsfunction.py
evilhero_mylar/lib/js2py/prototypes/jsfunction.py
# python 3 support import six if six.PY3: basestring = str long = int xrange = range unicode = str # todo fix apply and bind class FunctionPrototype: def toString(): if not this.is_callable(): raise TypeError('toString is not generic!') args = ', '.join(thi...
1,490
Python
.py
45
23.888889
96
0.552834
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,867
jsregexp.py
evilhero_mylar/lib/js2py/prototypes/jsregexp.py
class RegExpPrototype: def toString(): flags = u'' if this.glob: flags += u'g' if this.ignore_case: flags += u'i' if this.multiline: flags += u'm' v = this.value if this.value else '(?:)' return u'/%s/'%v + flags def test(stri...
1,252
Python
.py
35
28.142857
84
0.582299
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,868
jsstring.py
evilhero_mylar/lib/js2py/prototypes/jsstring.py
# -*- coding: utf-8 -*- from .jsregexp import Exec import re DIGS = set('0123456789') WHITE = u"\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF" def replacement_template(rep, source, span, npar): """Takes t...
9,689
Python
.py
276
24.199275
167
0.503517
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,869
jsarray.py
evilhero_mylar/lib/js2py/prototypes/jsarray.py
import six if six.PY3: xrange = range import functools def to_arr(this): """Returns Python array from Js array""" return [this.get(str(e)) for e in xrange(len(this))] ARR_STACK = set({}) class ArrayPrototype: def toString(): # this function is wrong but I will leave it here fore debuggi...
14,886
Python
.py
419
24.190931
116
0.507901
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,870
jsjson.py
evilhero_mylar/lib/js2py/prototypes/jsjson.py
import json from lib.js2py.base import Js indent = '' # python 3 support import six if six.PY3: basestring = str long = int xrange = range unicode = str def parse(text): reviver = arguments[1] s = text.to_string().value try: unfiltered = json.loads(s) except: raise this...
6,388
Python
.py
179
26.256983
123
0.556653
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,871
jsobject.py
evilhero_mylar/lib/js2py/prototypes/jsobject.py
class ObjectPrototype: def toString(): return '[object %s]'%this.Class def valueOf(): return this.to_object() def toLocaleString(): return this.callprop('toString') def hasOwnProperty(prop): return this.get_own_property(prop.to_string().value) is not None def is...
861
Python
.py
23
27.869565
87
0.608485
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,872
_cpmodpy.py
evilhero_mylar/lib/cherrypy/_cpmodpy.py
"""Native adapter for serving CherryPy via mod_python Basic usage: ########################################## # Application in a module called myapp.py ########################################## import cherrypy class Root: @cherrypy.expose def index(self): return 'Hi there, Ho there, Hey there' # ...
11,151
Python
.py
290
27.47931
80
0.549639
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,873
_cpchecker.py
evilhero_mylar/lib/cherrypy/_cpchecker.py
import os import warnings import cherrypy from cherrypy._cpcompat import iteritems, copykeys, builtins class Checker(object): """A checker for CherryPy sites and their mounted applications. When this object is called at engine startup, it executes each of its own methods whose names start with ``check_...
15,034
Python
.py
295
32.515254
79
0.472249
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,874
_cpcompat.py
evilhero_mylar/lib/cherrypy/_cpcompat.py
"""Compatibility code for using CherryPy with various versions of Python. CherryPy 3.2 is compatible with Python versions 2.3+. This module provides a useful abstraction over the differences between Python versions, sometimes by preferring a newer idiom, sometimes an older one, and sometimes a custom one. In particul...
10,874
Python
.py
330
27.251515
79
0.674388
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,875
_cpthreadinglocal.py
evilhero_mylar/lib/cherrypy/_cpthreadinglocal.py
# This is a backport of Python-2.4's threading.local() implementation """Thread-local objects (Note that this module provides a Python version of thread threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the local class from threa...
6,619
Python
.py
184
29.592391
73
0.600815
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,876
_cprequest.py
evilhero_mylar/lib/cherrypy/_cprequest.py
import os import sys import time import warnings import cherrypy from cherrypy._cpcompat import basestring, copykeys, ntob, unicodestr from cherrypy._cpcompat import SimpleCookie, CookieError, py3k from cherrypy import _cpreqbody, _cpconfig from cherrypy._cperror import format_exc, bare_error from cherrypy.lib import...
37,180
Python
.py
798
37.073935
79
0.621013
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,877
_cplogging.py
evilhero_mylar/lib/cherrypy/_cplogging.py
""" Simple config ============= Although CherryPy uses the :mod:`Python logging module <logging>`, it does so behind the scenes so that simple logging is simple, but complicated logging is still possible. "Simple" logging means that you can log to the screen (i.e. console/stdout) or to a file, and that you can easily ...
17,181
Python
.py
377
36.331565
89
0.607822
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,878
_cpwsgi_server.py
evilhero_mylar/lib/cherrypy/_cpwsgi_server.py
"""WSGI server interface (see PEP 333). This adds some CP-specific bits to the framework-agnostic wsgiserver package. """ import sys import cherrypy from cherrypy import wsgiserver class CPWSGIServer(wsgiserver.CherryPyWSGIServer): """Wrapper for wsgiserver.CherryPyWSGIServer. wsgiserver has been designed ...
3,023
Python
.py
59
39.864407
85
0.648154
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,879
_cpnative_server.py
evilhero_mylar/lib/cherrypy/_cpnative_server.py
"""Native adapter for serving CherryPy via its builtin server.""" import logging import sys import cherrypy from cherrypy._cpcompat import BytesIO from cherrypy._cperror import format_exc, bare_error from cherrypy.lib import httputil from cherrypy import wsgiserver class NativeGateway(wsgiserver.Gateway): recu...
6,000
Python
.py
129
30.077519
78
0.525145
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,880
_cpwsgi.py
evilhero_mylar/lib/cherrypy/_cpwsgi.py
"""WSGI interface (see PEP 333 and 3333). Note that WSGI environ keys and values are 'native strings'; that is, whatever the type of "" is. For Python 2, that's a byte string; for Python 3, it's a unicode string. But PEP 3333 says: "even if Python's str type is actually Unicode "under the hood", the content of native ...
16,870
Python
.py
361
34.947368
79
0.580331
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,881
_cperror.py
evilhero_mylar/lib/cherrypy/_cperror.py
"""Exception classes for CherryPy. CherryPy provides (and uses) exceptions for declaring that the HTTP response should be a status other than the default "200 OK". You can ``raise`` them like normal Python exceptions. You can also call them and they will raise themselves; this means you can set an :class:`HTTPError<ch...
22,680
Python
.py
481
39.164241
106
0.639663
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,882
__init__.py
evilhero_mylar/lib/cherrypy/__init__.py
"""CherryPy is a pythonic, object-oriented HTTP framework. CherryPy consists of not one, but four separate API layers. The APPLICATION LAYER is the simplest. CherryPy applications are written as a tree of classes and methods, where each branch in the tree corresponds to a branch in the URL path. Each method is a 'pa...
21,722
Python
.py
510
35.639216
119
0.661936
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,883
_cpserver.py
evilhero_mylar/lib/cherrypy/_cpserver.py
"""Manage HTTP servers with CherryPy.""" import warnings import cherrypy from cherrypy.lib import attributes from cherrypy._cpcompat import basestring, py3k # We import * because we want to export check_port # et al as attributes of this module. from cherrypy.process.servers import * class Server(ServerAdapter): ...
8,275
Python
.py
182
36.972527
79
0.637607
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,884
_cptree.py
evilhero_mylar/lib/cherrypy/_cptree.py
"""CherryPy Application and Tree objects.""" import os import cherrypy from cherrypy._cpcompat import ntou, py3k from cherrypy import _cpconfig, _cplogging, _cprequest, _cpwsgi, tools from cherrypy.lib import httputil class Application(object): """A CherryPy Application. Servers and gateways should not in...
11,085
Python
.py
233
36.95279
79
0.598183
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,885
_cpreqbody.py
evilhero_mylar/lib/cherrypy/_cpreqbody.py
"""Request body processing for CherryPy. .. versionadded:: 3.2 Application authors have complete control over the parsing of HTTP request entities. In short, :attr:`cherrypy.request.body<cherrypy._cprequest.Request.body>` is now always set to an instance of :class:`RequestBody<cherrypy._cpreqbody.RequestBody>`, and *...
37,362
Python
.py
852
33.862676
84
0.601034
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,886
_cpcompat_subprocess.py
evilhero_mylar/lib/cherrypy/_cpcompat_subprocess.py
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://ww...
55,872
Python
.py
1,277
31.21065
128
0.560448
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,887
_cptools.py
evilhero_mylar/lib/cherrypy/_cptools.py
"""CherryPy tools. A "tool" is any helper, adapted to CP. Tools are usually designed to be used in a variety of ways (although some may only offer one if they choose): Library calls All tools are callables that can be used wherever needed. The arguments are straightforward and should be detailed w...
19,093
Python
.py
408
38.161765
79
0.641457
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,888
_cpconfig.py
evilhero_mylar/lib/cherrypy/_cpconfig.py
""" Configuration system for CherryPy. Configuration in CherryPy is implemented via dictionaries. Keys are strings which name the mapped value, which may be of any type. Architecture ------------ CherryPy Requests are part of an Application, which runs in a global context, and configuration data may apply to any of...
10,692
Python
.py
259
34.127413
79
0.660048
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,889
_cpdispatch.py
evilhero_mylar/lib/cherrypy/_cpdispatch.py
"""CherryPy dispatchers. A 'dispatcher' is the object which looks up the 'page handler' callable and collects config for the current request based on the path_info, other request attributes, and the application architecture. The core calls the dispatcher as early as possible, passing it a 'path_info' argument. The de...
25,342
Python
.py
567
34.153439
82
0.608371
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,890
test_auth_basic.py
evilhero_mylar/lib/cherrypy/test/test_auth_basic.py
# This file is part of CherryPy <http://www.cherrypy.org/> # -*- coding: utf-8 -*- # vim:ts=4:sw=4:expandtab:fileencoding=utf-8 import cherrypy from cherrypy._cpcompat import md5, ntob from cherrypy.lib import auth_basic from cherrypy.test import helper class BasicAuthTest(helper.CPWebCase): def setup_server():...
2,853
Python
.py
61
36.409836
106
0.613915
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,891
test_request_obj.py
evilhero_mylar/lib/cherrypy/test/test_request_obj.py
"""Basic tests for the cherrypy.Request object.""" import os localDir = os.path.dirname(__file__) import sys import types from cherrypy._cpcompat import IncompleteRead, ntob, unicodestr import cherrypy from cherrypy import _cptools, tools from cherrypy.lib import httputil defined_http_methods = ("OPTIONS", "GET", "H...
31,327
Python
.py
589
38.320883
114
0.571765
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,892
_test_decorators.py
evilhero_mylar/lib/cherrypy/test/_test_decorators.py
"""Test module for the @-decorator syntax, which is version-specific""" from cherrypy import expose, tools from cherrypy._cpcompat import ntob class ExposeExamples(object): @expose def no_call(self): return "Mr E. R. Bradshaw" @expose() def call_empty(self): return "Mrs. B.J...
1,022
Python
.py
28
30.035714
75
0.656217
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,893
test_config_server.py
evilhero_mylar/lib/cherrypy/test/test_config_server.py
"""Tests for the CherryPy configuration system.""" import os, sys localDir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import socket import time import cherrypy # Client-side code # from cherrypy.test import helper class ServerConfigTests(helper.C...
4,177
Python
.py
95
31.273684
80
0.541879
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,894
test_routes.py
evilhero_mylar/lib/cherrypy/test/test_routes.py
import os curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import cherrypy from cherrypy.test import helper import nose class RoutesDispatchTest(helper.CPWebCase): def setup_server(): try: import routes except ImportError: raise nose.SkipTest('Install routes...
2,411
Python
.py
52
33.865385
98
0.590506
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,895
test_wsgi_ns.py
evilhero_mylar/lib/cherrypy/test/test_wsgi_ns.py
import cherrypy from cherrypy.test import helper class WSGI_Namespace_Test(helper.CPWebCase): def setup_server(): class WSGIResponse(object): def __init__(self, appresults): self.appresults = appresults self.iter = iter(appresults) ...
2,570
Python
.py
56
28.142857
77
0.512142
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,896
test_tools.py
evilhero_mylar/lib/cherrypy/test/test_tools.py
"""Test the various means of instantiating and invoking tools.""" import gzip import sys from cherrypy._cpcompat import BytesIO, copyitems, itervalues, IncompleteRead, ntob, ntou, xrange import time timeout = 0.2 import types import cherrypy from cherrypy import tools europoundUnicode = ntou('\x80\xa3') # ...
15,529
Python
.py
327
33.165138
97
0.56571
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,897
test_wsgi_vhost.py
evilhero_mylar/lib/cherrypy/test/test_wsgi_vhost.py
import cherrypy from cherrypy.test import helper class WSGI_VirtualHost_Test(helper.CPWebCase): def setup_server(): class ClassOfRoot(object): def __init__(self, name): self.name = name def index(self): return "Wel...
1,127
Python
.py
23
35.608696
81
0.612808
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,898
test_virtualhost.py
evilhero_mylar/lib/cherrypy/test/test_virtualhost.py
import os curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import cherrypy from cherrypy.test import helper class VirtualHostTest(helper.CPWebCase): def setup_server(): class Root: def index(self): return "Hello, world" index.exposed = True ...
4,219
Python
.py
87
35.195402
84
0.561117
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)
20,899
test_states.py
evilhero_mylar/lib/cherrypy/test/test_states.py
from cherrypy._cpcompat import BadStatusLine, ntob import os import sys import threading import time import cherrypy engine = cherrypy.engine thisdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) class Dependency: def __init__(self, bus): self.bus = bus self.running = False self...
15,081
Python
.py
360
31.611111
79
0.606897
evilhero/mylar
977
173
0
GPL-3.0
9/5/2024, 5:12:46 PM (Europe/Amsterdam)