Added mistakenly ignored files
This commit is contained in:
48
bin/pack/PC/ymir work/pc/analyze_speed.py~
Normal file
48
bin/pack/PC/ymir work/pc/analyze_speed.py~
Normal file
@ -0,0 +1,48 @@
|
||||
import glob
|
||||
import os
|
||||
import stat
|
||||
|
||||
def GetSpeed(name):
|
||||
lines = open(name).readlines()
|
||||
|
||||
inp = 0
|
||||
beg = 0
|
||||
end = 0
|
||||
for line in lines:
|
||||
if "DirectInput" in line:
|
||||
inp = float(line.strip().split()[1])
|
||||
if "AttackingStartTime" in line:
|
||||
beg = float(line.strip().split()[1])
|
||||
if "AttackingEndTime" in line:
|
||||
end = float(line.strip().split()[1])
|
||||
|
||||
return inp, beg, end
|
||||
|
||||
def GetComboList(job):
|
||||
print job
|
||||
os.chdir(job)
|
||||
dirList = os.listdir(".")
|
||||
|
||||
#horseFolders = [name for name in dirList if "horse" in name]
|
||||
|
||||
folders = [name for name in dirList if stat.S_ISDIR(os.stat(name).st_mode)]
|
||||
|
||||
for folder in folders:
|
||||
os.chdir(folder)
|
||||
|
||||
comboList = []
|
||||
for name in glob.glob("*.msa"):
|
||||
if "combo" in name:
|
||||
comboList.append("\t" + " ".join((name, "%.2f (%.2f-%.2f)" % (GetSpeed(name)))))
|
||||
|
||||
if comboList:
|
||||
print folder
|
||||
print "\n".join(comboList)
|
||||
os.chdir("..")
|
||||
|
||||
os.chdir("..")
|
||||
|
||||
GetComboList("warrior");
|
||||
GetComboList("assassin");
|
||||
GetComboList("sura");
|
||||
GetComboList("shaman");
|
14
bin/pack/PC/ymir work/pc/shaman/action/test.py~
Normal file
14
bin/pack/PC/ymir work/pc/shaman/action/test.py~
Normal file
@ -0,0 +1,14 @@
|
||||
import glob
|
||||
for name in glob.glob("*.msa"):
|
||||
old_lines = open(name).readlines()
|
||||
new_lines = []
|
||||
|
||||
for line in old_lines:
|
||||
if "wedding" in line:
|
||||
new_lines.append(line.replace("wedding", "action"))
|
||||
else:
|
||||
new_lines.append(line)
|
||||
|
||||
if old_lines != new_lines:
|
||||
print name
|
||||
open(name, "w").writelines(new_lines)
|
14
bin/pack/PC/ymir work/pc/warrior/action/test.py~
Normal file
14
bin/pack/PC/ymir work/pc/warrior/action/test.py~
Normal file
@ -0,0 +1,14 @@
|
||||
import glob
|
||||
for name in glob.glob("*.msa"):
|
||||
old_lines = open(name).readlines()
|
||||
new_lines = []
|
||||
|
||||
for line in old_lines:
|
||||
if "wedding" in line:
|
||||
new_lines.append(line.replace("wedding", "action"))
|
||||
else:
|
||||
new_lines.append(line)
|
||||
|
||||
if old_lines != new_lines:
|
||||
print name
|
||||
open(name, "w").writelines(new_lines)
|
Reference in New Issue
Block a user