Spaces:
Paused
Paused
t5
commited on
Commit
·
1eb4c1c
1
Parent(s):
0e6f104
apple
Browse files- abenatsumi.txt +14 -0
- mw.py +48 -20
abenatsumi.txt
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
左を見る
|
| 2 |
+
abenatsumi p
|
| 3 |
+
# coment
|
| 4 |
+
cvf p-web
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
tensors checkpoints
|
mw.py
CHANGED
|
@@ -33,6 +33,24 @@ else:
|
|
| 33 |
|
| 34 |
class p310:# require version
|
| 35 |
def __getstate__(zl):return #pickle
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
def rint(w):
|
| 37 |
if not typeint(w):
|
| 38 |
assert 0,"not rint"
|
|
@@ -936,7 +954,7 @@ def edipt_edit(te,find,edit=0,fntbl=()):
|
|
| 936 |
if type(fn)==str:return e2
|
| 937 |
(fn,pos,mod,te)=fn
|
| 938 |
if fn in fntbl: fn=fntbl[fn]
|
| 939 |
-
print(fn,fntbl)
|
| 940 |
#npp(fn,f"-n{pos}")
|
| 941 |
orPOA([HeartNote, fn, "-pos",pos,"0"])
|
| 942 |
return e2
|
|
@@ -1092,23 +1110,40 @@ class pini(puni):
|
|
| 1092 |
ti= repr(f) +"\t" +repr(v)+"\n";
|
| 1093 |
te+=ti;
|
| 1094 |
wfd8(zl.fn,te);#Exceptions during cleanup are always ignored; see the object.__del__() documentation:
|
| 1095 |
-
|
| 1096 |
-
##class lazy:1
|
| 1097 |
-
##diMdirs=None
|
| 1098 |
def ordiMdirs():# Dictionary of Directory
|
| 1099 |
global diMdirs
|
| 1100 |
diMdirs=globals().get("diMdirs") or dict([j.split("\t")[:2] for j in wfd(os.environ["cpa"]+r"\data\dirs-{}.txt".format(T45)).r(lines=True) if j[:2]])
|
| 1101 |
return diMdirs
|
| 1102 |
def mdir(f): return ordiMdirs()[f]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1103 |
#
|
|
|
|
| 1104 |
def fFlat(li,lirn):
|
| 1105 |
if(type(li)==list):
|
| 1106 |
for j in li:
|
| 1107 |
-
|
| 1108 |
-
## lirn.extend(r1)
|
| 1109 |
else:
|
| 1110 |
-
|
| 1111 |
-
lirn.append(
|
| 1112 |
return lirn
|
| 1113 |
class List(list):
|
| 1114 |
def rx(zl,te):
|
|
@@ -1721,17 +1756,6 @@ def wfupdate(fn,pat,count,te=""):
|
|
| 1721 |
imw.w(te,copy=0)
|
| 1722 |
return te
|
| 1723 |
|
| 1724 |
-
membile={}
|
| 1725 |
-
def membile(fp,membile=membile):
|
| 1726 |
-
membilefp=membile.setdefault(fp,{})
|
| 1727 |
-
@functools.wraps(fp)
|
| 1728 |
-
def f(*w,**W):
|
| 1729 |
-
if(p:=membilefp.get((w,str(W)))):return p
|
| 1730 |
-
p=fp(*w,**W)
|
| 1731 |
-
membilefp[(w,str(W))]=p
|
| 1732 |
-
return p
|
| 1733 |
-
f.membile=membilefp
|
| 1734 |
-
return f
|
| 1735 |
if 1:
|
| 1736 |
@membile
|
| 1737 |
def pmobile(*w,**W):
|
|
@@ -1875,4 +1899,8 @@ if 1:
|
|
| 1875 |
tea=b""
|
| 1876 |
for et in better_send(feeding,host):
|
| 1877 |
tea+=et
|
| 1878 |
-
return tea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
class p310:# require version
|
| 35 |
def __getstate__(zl):return #pickle
|
| 36 |
+
|
| 37 |
+
membile={}
|
| 38 |
+
def membile(fp,membile=membile):
|
| 39 |
+
membilefp=membile.setdefault(fp,{})
|
| 40 |
+
@functools.wraps(fp)
|
| 41 |
+
def f(*w,**W):
|
| 42 |
+
if(p:=membilefp.get((w,str(W)))):return p
|
| 43 |
+
p=fp(*w,**W)
|
| 44 |
+
membilefp[(w,str(W))]=p
|
| 45 |
+
return p
|
| 46 |
+
f.membile=membilefp
|
| 47 |
+
return f
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
def rint(w):
|
| 55 |
if not typeint(w):
|
| 56 |
assert 0,"not rint"
|
|
|
|
| 954 |
if type(fn)==str:return e2
|
| 955 |
(fn,pos,mod,te)=fn
|
| 956 |
if fn in fntbl: fn=fntbl[fn]
|
| 957 |
+
## print(fn,fntbl)
|
| 958 |
#npp(fn,f"-n{pos}")
|
| 959 |
orPOA([HeartNote, fn, "-pos",pos,"0"])
|
| 960 |
return e2
|
|
|
|
| 1110 |
ti= repr(f) +"\t" +repr(v)+"\n";
|
| 1111 |
te+=ti;
|
| 1112 |
wfd8(zl.fn,te);#Exceptions during cleanup are always ignored; see the object.__del__() documentation:
|
| 1113 |
+
#
|
|
|
|
|
|
|
| 1114 |
def ordiMdirs():# Dictionary of Directory
|
| 1115 |
global diMdirs
|
| 1116 |
diMdirs=globals().get("diMdirs") or dict([j.split("\t")[:2] for j in wfd(os.environ["cpa"]+r"\data\dirs-{}.txt".format(T45)).r(lines=True) if j[:2]])
|
| 1117 |
return diMdirs
|
| 1118 |
def mdir(f): return ordiMdirs()[f]
|
| 1119 |
+
class _:
|
| 1120 |
+
def __init__(zl,fn,unquote=1):
|
| 1121 |
+
zl.fn=fn
|
| 1122 |
+
zl.unquote=unquote
|
| 1123 |
+
w=""
|
| 1124 |
+
def split(zl):
|
| 1125 |
+
zl.w={f:(v[0]) for f,*v in orsplit(wfd(zl.fn).r(),"\t") if v}
|
| 1126 |
+
def __call__(zl,at):
|
| 1127 |
+
if not zl.w: zl.split()
|
| 1128 |
+
return zl.w[at]
|
| 1129 |
+
def __getattr__(zl,at):
|
| 1130 |
+
return zl(at)
|
| 1131 |
+
if cpa: mdir=_(os.environ["cpa"]+r"\data\dirs-{}.txt".format(T45))
|
| 1132 |
+
class _(_):
|
| 1133 |
+
def split(zl):
|
| 1134 |
+
from urllib.parse import unquote
|
| 1135 |
+
if not zl.unquote: unquote=fpreturn
|
| 1136 |
+
zl.w={f:unquote(v[-1]) for f,*v in orsplit2(wfd(zl.fn).r(),"\t")}
|
| 1137 |
+
abenatsumi=_(lfn.abspath(__file__+"/../"+"abenatsumi.txt"))
|
| 1138 |
#
|
| 1139 |
+
|
| 1140 |
def fFlat(li,lirn):
|
| 1141 |
if(type(li)==list):
|
| 1142 |
for j in li:
|
| 1143 |
+
L1=fFlat(j,lirn)
|
|
|
|
| 1144 |
else:
|
| 1145 |
+
L1=li
|
| 1146 |
+
lirn.append(L1)
|
| 1147 |
return lirn
|
| 1148 |
class List(list):
|
| 1149 |
def rx(zl,te):
|
|
|
|
| 1756 |
imw.w(te,copy=0)
|
| 1757 |
return te
|
| 1758 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1759 |
if 1:
|
| 1760 |
@membile
|
| 1761 |
def pmobile(*w,**W):
|
|
|
|
| 1899 |
tea=b""
|
| 1900 |
for et in better_send(feeding,host):
|
| 1901 |
tea+=et
|
| 1902 |
+
return tea
|
| 1903 |
+
if 1:
|
| 1904 |
+
finalcb=cbTry
|
| 1905 |
+
cbstop=finalcb
|
| 1906 |
+
|