Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib64 /
python2.7 /
site-packages /
numpy /
distutils /
Delete
Unzip
Name
Size
Permission
Date
Action
command
[ DIR ]
drwxr-xr-x
2021-09-16 10:54
fcompiler
[ DIR ]
drwxr-xr-x
2021-09-16 10:54
mingw
[ DIR ]
drwxr-xr-x
2021-09-16 10:54
tests
[ DIR ]
drwxr-xr-x
2021-09-16 10:54
__config__.py
1.55
KB
-rw-r--r--
2018-04-10 19:40
__config__.pyc
1.69
KB
-rw-r--r--
2018-04-10 19:40
__config__.pyo
1.69
KB
-rw-r--r--
2018-04-10 19:40
__init__.py
991
B
-rw-r--r--
2013-04-07 01:04
__init__.pyc
1001
B
-rw-r--r--
2018-04-10 19:40
__init__.pyo
1001
B
-rw-r--r--
2018-04-10 19:40
__version__.py
85
B
-rw-r--r--
2013-04-07 01:04
__version__.pyc
286
B
-rw-r--r--
2018-04-10 19:40
__version__.pyo
286
B
-rw-r--r--
2018-04-10 19:40
ccompiler.py
22.27
KB
-rw-r--r--
2013-04-07 01:04
ccompiler.pyc
19.94
KB
-rw-r--r--
2018-04-10 19:40
ccompiler.pyo
19.94
KB
-rw-r--r--
2018-04-10 19:40
compat.py
151
B
-rw-r--r--
2013-04-07 01:04
compat.pyc
474
B
-rw-r--r--
2018-04-10 19:40
compat.pyo
474
B
-rw-r--r--
2018-04-10 19:40
conv_template.py
9.4
KB
-rw-r--r--
2013-04-07 01:04
conv_template.pyc
9.37
KB
-rw-r--r--
2018-04-10 19:40
conv_template.pyo
9.37
KB
-rw-r--r--
2018-04-10 19:40
core.py
8.34
KB
-rw-r--r--
2013-04-07 01:04
core.pyc
6.34
KB
-rw-r--r--
2018-04-10 19:40
core.pyo
6.34
KB
-rw-r--r--
2018-04-10 19:40
cpuinfo.py
22.2
KB
-rw-r--r--
2013-04-07 01:04
cpuinfo.pyc
42.92
KB
-rw-r--r--
2018-04-10 19:40
cpuinfo.pyo
42.92
KB
-rw-r--r--
2018-04-10 19:40
environment.py
2.23
KB
-rw-r--r--
2013-04-07 01:04
environment.pyc
3.29
KB
-rw-r--r--
2018-04-10 19:40
environment.pyo
3.29
KB
-rw-r--r--
2018-04-10 19:40
exec_command.py
18.79
KB
-rw-r--r--
2013-04-07 01:04
exec_command.pyc
17.42
KB
-rw-r--r--
2018-04-10 19:40
exec_command.pyo
16.02
KB
-rw-r--r--
2018-04-10 19:40
extension.py
2.92
KB
-rw-r--r--
2013-04-07 01:04
extension.pyc
2.41
KB
-rw-r--r--
2018-04-10 19:40
extension.pyo
2.41
KB
-rw-r--r--
2018-04-10 19:40
from_template.py
7.62
KB
-rw-r--r--
2013-04-07 01:04
from_template.pyc
8.19
KB
-rw-r--r--
2018-04-10 19:40
from_template.pyo
8.19
KB
-rw-r--r--
2018-04-10 19:40
info.py
92
B
-rw-r--r--
2013-04-07 01:04
info.pyc
266
B
-rw-r--r--
2018-04-10 19:40
info.pyo
266
B
-rw-r--r--
2018-04-10 19:40
intelccompiler.py
1.67
KB
-rw-r--r--
2013-04-07 01:04
intelccompiler.pyc
2.18
KB
-rw-r--r--
2018-04-10 19:40
intelccompiler.pyo
2.18
KB
-rw-r--r--
2018-04-10 19:40
interactive.py
6
KB
-rw-r--r--
2013-04-07 01:04
interactive.pyc
5.64
KB
-rw-r--r--
2018-04-10 19:40
interactive.pyo
5.64
KB
-rw-r--r--
2018-04-10 19:40
lib2def.py
3.34
KB
-rw-r--r--
2013-04-07 01:04
lib2def.pyc
3.76
KB
-rw-r--r--
2018-04-10 19:40
lib2def.pyo
3.76
KB
-rw-r--r--
2018-04-10 19:40
line_endings.py
1.92
KB
-rw-r--r--
2013-04-07 01:04
line_endings.pyc
2.67
KB
-rw-r--r--
2018-04-10 19:40
line_endings.pyo
2.67
KB
-rw-r--r--
2018-04-10 19:40
log.py
2.53
KB
-rw-r--r--
2013-04-07 01:04
log.pyc
2.88
KB
-rw-r--r--
2018-04-10 19:40
log.pyo
2.88
KB
-rw-r--r--
2018-04-10 19:40
mingw32ccompiler.py
21.95
KB
-rw-r--r--
2013-04-07 01:04
mingw32ccompiler.pyc
16.39
KB
-rw-r--r--
2018-04-10 19:40
mingw32ccompiler.pyo
16.32
KB
-rw-r--r--
2018-04-10 19:40
misc_util.py
83.4
KB
-rw-r--r--
2013-04-07 01:04
misc_util.pyc
79.01
KB
-rw-r--r--
2018-04-10 19:40
misc_util.pyo
78.41
KB
-rw-r--r--
2018-04-10 19:40
npy_pkg_config.py
13.32
KB
-rw-r--r--
2013-04-07 01:04
npy_pkg_config.pyc
15.28
KB
-rw-r--r--
2018-04-10 19:40
npy_pkg_config.pyo
15.28
KB
-rw-r--r--
2018-04-10 19:40
numpy_distribution.py
634
B
-rw-r--r--
2013-04-07 01:04
numpy_distribution.pyc
981
B
-rw-r--r--
2018-04-10 19:40
numpy_distribution.pyo
981
B
-rw-r--r--
2018-04-10 19:40
pathccompiler.py
713
B
-rw-r--r--
2013-04-07 01:04
pathccompiler.pyc
1.08
KB
-rw-r--r--
2018-04-10 19:40
pathccompiler.pyo
1.08
KB
-rw-r--r--
2018-04-10 19:40
setup.py
561
B
-rw-r--r--
2013-04-07 01:04
setup.pyc
862
B
-rw-r--r--
2018-04-10 19:40
setup.pyo
862
B
-rw-r--r--
2018-04-10 19:40
setupscons.py
557
B
-rw-r--r--
2013-04-07 01:04
setupscons.pyc
905
B
-rw-r--r--
2018-04-10 19:40
setupscons.pyo
905
B
-rw-r--r--
2018-04-10 19:40
site.cfg
124
B
-rw-r--r--
2018-04-10 19:39
system_info.py
72.83
KB
-rw-r--r--
2013-04-07 01:04
system_info.pyc
70.07
KB
-rw-r--r--
2018-04-10 19:40
system_info.pyo
69.94
KB
-rw-r--r--
2018-04-10 19:40
unixccompiler.py
3.94
KB
-rw-r--r--
2013-04-07 01:04
unixccompiler.pyc
3.21
KB
-rw-r--r--
2018-04-10 19:40
unixccompiler.pyo
3.21
KB
-rw-r--r--
2018-04-10 19:40
Save
Rename
#!/usr/bin/python """ process_file(filename) takes templated file .xxx.src and produces .xxx file where .xxx is .pyf .f90 or .f using the following template rules: '<..>' denotes a template. All function and subroutine blocks in a source file with names that contain '<..>' will be replicated according to the rules in '<..>'. The number of comma-separeted words in '<..>' will determine the number of replicates. '<..>' may have two different forms, named and short. For example, named: <p=d,s,z,c> where anywhere inside a block '<p>' will be replaced with 'd', 's', 'z', and 'c' for each replicate of the block. <_c> is already defined: <_c=s,d,c,z> <_t> is already defined: <_t=real,double precision,complex,double complex> short: <s,d,c,z>, a short form of the named, useful when no <p> appears inside a block. In general, '<..>' contains a comma separated list of arbitrary expressions. If these expression must contain a comma|leftarrow|rightarrow, then prepend the comma|leftarrow|rightarrow with a backslash. If an expression matches '\\<index>' then it will be replaced by <index>-th expression. Note that all '<..>' forms in a block must have the same number of comma-separated entries. Predefined named template rules: <prefix=s,d,c,z> <ftype=real,double precision,complex,double complex> <ftypereal=real,double precision,\\0,\\1> <ctype=float,double,complex_float,complex_double> <ctypereal=float,double,\\0,\\1> """ __all__ = ['process_str','process_file'] import os import sys import re routine_start_re = re.compile(r'(\n|\A)(( (\$|\*))|)\s*(subroutine|function)\b',re.I) routine_end_re = re.compile(r'\n\s*end\s*(subroutine|function)\b.*(\n|\Z)',re.I) function_start_re = re.compile(r'\n (\$|\*)\s*function\b',re.I) def parse_structure(astr): """ Return a list of tuples for each function or subroutine each tuple is the start and end of a subroutine or function to be expanded. """ spanlist = [] ind = 0 while 1: m = routine_start_re.search(astr,ind) if m is None: break start = m.start() if function_start_re.match(astr,start,m.end()): while 1: i = astr.rfind('\n',ind,start) if i==-1: break start = i if astr[i:i+7]!='\n $': break start += 1 m = routine_end_re.search(astr,m.end()) ind = end = m and m.end()-1 or len(astr) spanlist.append((start,end)) return spanlist template_re = re.compile(r"<\s*(\w[\w\d]*)\s*>") named_re = re.compile(r"<\s*(\w[\w\d]*)\s*=\s*(.*?)\s*>") list_re = re.compile(r"<\s*((.*?))\s*>") def find_repl_patterns(astr): reps = named_re.findall(astr) names = {} for rep in reps: name = rep[0].strip() or unique_key(names) repl = rep[1].replace('\,','@comma@') thelist = conv(repl) names[name] = thelist return names item_re = re.compile(r"\A\\(?P<index>\d+)\Z") def conv(astr): b = astr.split(',') l = [x.strip() for x in b] for i in range(len(l)): m = item_re.match(l[i]) if m: j = int(m.group('index')) l[i] = l[j] return ','.join(l) def unique_key(adict): """ Obtain a unique key given a dictionary.""" allkeys = adict.keys() done = False n = 1 while not done: newkey = '__l%s' % (n) if newkey in allkeys: n += 1 else: done = True return newkey template_name_re = re.compile(r'\A\s*(\w[\w\d]*)\s*\Z') def expand_sub(substr,names): substr = substr.replace('\>','@rightarrow@') substr = substr.replace('\<','@leftarrow@') lnames = find_repl_patterns(substr) substr = named_re.sub(r"<\1>",substr) # get rid of definition templates def listrepl(mobj): thelist = conv(mobj.group(1).replace('\,','@comma@')) if template_name_re.match(thelist): return "<%s>" % (thelist) name = None for key in lnames.keys(): # see if list is already in dictionary if lnames[key] == thelist: name = key if name is None: # this list is not in the dictionary yet name = unique_key(lnames) lnames[name] = thelist return "<%s>" % name substr = list_re.sub(listrepl, substr) # convert all lists to named templates # newnames are constructed as needed numsubs = None base_rule = None rules = {} for r in template_re.findall(substr): if r not in rules: thelist = lnames.get(r,names.get(r,None)) if thelist is None: raise ValueError('No replicates found for <%s>' % (r)) if r not in names and not thelist.startswith('_'): names[r] = thelist rule = [i.replace('@comma@',',') for i in thelist.split(',')] num = len(rule) if numsubs is None: numsubs = num rules[r] = rule base_rule = r elif num == numsubs: rules[r] = rule else: print("Mismatch in number of replacements (base <%s=%s>)"\ " for <%s=%s>. Ignoring." % (base_rule, ','.join(rules[base_rule]), r,thelist)) if not rules: return substr def namerepl(mobj): name = mobj.group(1) return rules.get(name,(k+1)*[name])[k] newstr = '' for k in range(numsubs): newstr += template_re.sub(namerepl, substr) + '\n\n' newstr = newstr.replace('@rightarrow@','>') newstr = newstr.replace('@leftarrow@','<') return newstr def process_str(allstr): newstr = allstr writestr = '' #_head # using _head will break free-format files struct = parse_structure(newstr) oldend = 0 names = {} names.update(_special_names) for sub in struct: writestr += newstr[oldend:sub[0]] names.update(find_repl_patterns(newstr[oldend:sub[0]])) writestr += expand_sub(newstr[sub[0]:sub[1]],names) oldend = sub[1] writestr += newstr[oldend:] return writestr include_src_re = re.compile(r"(\n|\A)\s*include\s*['\"](?P<name>[\w\d./\\]+[.]src)['\"]",re.I) def resolve_includes(source): d = os.path.dirname(source) fid = open(source) lines = [] for line in fid.readlines(): m = include_src_re.match(line) if m: fn = m.group('name') if not os.path.isabs(fn): fn = os.path.join(d,fn) if os.path.isfile(fn): print ('Including file',fn) lines.extend(resolve_includes(fn)) else: lines.append(line) else: lines.append(line) fid.close() return lines def process_file(source): lines = resolve_includes(source) return process_str(''.join(lines)) _special_names = find_repl_patterns(''' <_c=s,d,c,z> <_t=real,double precision,complex,double complex> <prefix=s,d,c,z> <ftype=real,double precision,complex,double complex> <ctype=float,double,complex_float,complex_double> <ftypereal=real,double precision,\\0,\\1> <ctypereal=float,double,\\0,\\1> ''') if __name__ == "__main__": try: file = sys.argv[1] except IndexError: fid = sys.stdin outfile = sys.stdout else: fid = open(file,'r') (base, ext) = os.path.splitext(file) newname = base outfile = open(newname,'w') allstr = fid.read() writestr = process_str(allstr) outfile.write(writestr)