本文整理汇总了Python中BuildTex.addMacros方法的典型用法代码示例。如果您正苦于以下问题:Python BuildTex.addMacros方法的具体用法?Python BuildTex.addMacros怎么用?Python BuildTex.addMacros使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BuildTex
的用法示例。
在下文中一共展示了BuildTex.addMacros方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: BuildAllGraphs
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def BuildAllGraphs(inputId, subFolder, G0):
# Save the number of employee into the Tex file
BuildTex.addMacros(subFolder, 'nTotal', str(len(G0.nodes())))
print '\nBuilding ', subFolder + '\\graph4a.png'
G4a = aGraphObject(G0, [4,8], 'orange')
G4a.draw(subFolder + '\\graph4a.png')
G4b = aSymGraphObject(G0, [4,8], 'red')
G4b.draw(subFolder + '\\graph4b.png')
G51a = aGraphObject(G0, [5,7], 'blue')
G51a.draw(subFolder + '\\graph5_1a.png')
G51b = aSymGraphObject(G0, [5,7], '#808080')
G51b.draw(subFolder + '\\graph5_1b.png')
G52a = aGraphObject(G0, [3,6], 'darkgreen')
G52a.draw(subFolder + '\\graph5_2a.png')
G52b = aSymGraphObject(G0, [3,6], 'darkgreen')
G52b.draw(subFolder + '\\graph5_2b.png')
G53 = aGraphObject(G0, [3,5,6,7], '#448888')
G53.draw(subFolder + '\\graph5_3.png')
示例2: MakeTitlePage
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def MakeTitlePage(firstLine, subFolder) :
[orgId, orgName] = firstLine.split('\t')
orgName.replace('quot;','')
orgName = orgName.decode("CP1251").encode("UTF-8")
BuildTex.addMacros(subFolder,'fullName', orgName)
orgId = orgId.split('=')[1]
BuildTex.addMacros(subFolder,'internalId', orgId)
示例3: computeTeachCat
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def computeTeachCat(subFolder, statData) :
values = StatValues.extractAnswers(statData, [19])
keys = [str(i+55) for i in range(5)]
stat = [values.count(key) for key in keys]
print '\nTeacher categories:', values, stat
BuildTex.addMacros(subFolder, 'numTechCatA', str(stat[0]))
BuildTex.addMacros(subFolder, 'numTechCatB', str(stat[1]))
BuildTex.addMacros(subFolder, 'numTechCatC', str(stat[2]))
BuildTex.addMacros(subFolder, 'numTechCatD', str(stat[3]))
BuildTex.addMacros(subFolder, 'numTechCatE', str(stat[4]))
示例4: BuildAllGraphs
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def BuildAllGraphs(inputId, subFolder, G0):
# Save the graph data
saveFullGraphData(subFolder, G0)
buildGraph7a(subFolder, G0)
buildGraph7b(subFolder, G0)
buildGraph81a(subFolder, G0)
buildGraph81b(subFolder, G0)
buildGraph82a(subFolder, G0)
buildGraph82b(subFolder, G0)
BuildTex.addMacros(subFolder, 'linksnodes', str(len(G0.nodes())))
print '\n Building graphs complete'
示例5: computeBossTeacher
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def computeBossTeacher(subFolder) :
fileName = subFolder + '\\nameslist.tex' # Teacher names to be included in report
f = open(fileName, 'r')
boss = 0
teacher = 0
for line in f.readlines() :
pos = line.find(',')
l = len(line) - pos
print 'Boss:', pos, l, line
if l > 80 :
boss += 1
else :
teacher += 1
BuildTex.addMacros(subFolder, 'numBoss', str(boss))
BuildTex.addMacros(subFolder, 'numTeacher', str(teacher))
f.close()
示例6: compute23b
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute23b(subFolder, statData): # aggregate
print '\nComputing values for slide 2.3.2.'
values = StatValues.extractAnswers(statData, [52])
yesNum = values.count('99') + values.count('100')
noNum = values.count('101') + values.count('102')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valBCByesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valBCBnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valBCByesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valBCBnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie232.png', yesNumP, noNumP)
示例7: compute23a
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute23a(subFolder, statData): # aggregate
print '\nComputing values for slide 2.3.1.'
values = StatValues.extractAnswers(statData, [23])
yesNum = values.count('61')
noNum = values.count('62')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valBCAyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valBCAnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valBCAyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valBCAnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie231.png', yesNumP, noNumP)
示例8: computeParticipatedManWomen
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def computeParticipatedManWomen(subFolder, statData) :
values = StatValues.extractAnswers(statData, [9])
men = values.count('14')
women = values.count('15')
BuildTex.addMacros(subFolder, 'nParticipated', str(men+women))
BuildTex.addMacros(subFolder, 'numMen', str(men))
BuildTex.addMacros(subFolder, 'numWomen', str(women))
示例9: compute23d
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute23d(subFolder, statData): # aggregate
print '\nComputing values for slide 2.3.4.'
values = StatValues.extractAnswers(statData, [30])
yesNum = values.count('83') + values.count('84')
noNum = values.count('85') + values.count('86')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valBCDyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valBCDnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valBCDyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valBCDnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie234.png', yesNumP, noNumP)
示例10: compute42c
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute42c(subFolder, statData): # one question
print '\nComputing values for slide 4.2.c.'
values = StatValues.extractAnswers(statData, [54])
yesNum = values.count('87') + values.count('88')
noNum = values.count('89') + values.count('90')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valDBCyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valDBCnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valDBCyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valDBCnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie42_c_.png', yesNumP, noNumP)
示例11: compute31a
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute31a(subFolder, statData): # aggregate
print '\nComputing values for slide 3.1.1.'
values = StatValues.extractAnswers(statData, [43])
yesNum = values.count('103') + values.count('104')
noNum = values.count('105') + values.count('106')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valCAAyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valCAAnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valCAAyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valCAAnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie311.png', yesNum, noNum)
示例12: compute32a
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute32a(subFolder, statData): # aggregate
print '\nComputing values for slide 3.2.1.'
values = StatValues.extractAnswers(statData, [40,41,42])
values = StatValues.joinLists(values)
yesNum = values.count('99') + values.count('100')
noNum = values.count('101') + values.count('102')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valCBAyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valCBAnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valCBAyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valCBAnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie321.png', yesNum, noNum)
示例13: compute21a
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute21a(subFolder, statData): # aggregate
print '\nComputing values for slide 2.1.1.'
values = StatValues.extractAnswers(statData, [38,39])
values = StatValues.joinLists(values)
yesNum = values.count('87') + values.count('88')
noNum = values.count('89') + values.count('90')
[yesNumP, noNumP] = StatValues.percent([yesNum,noNum])
BuildTex.addMacros(subFolder, 'valBAAyesNum', str(yesNum))
BuildTex.addMacros(subFolder, 'valBAAnoNum', str(noNum))
BuildTex.addMacros(subFolder, 'valBAAyesNumP', str(yesNumP))
BuildTex.addMacros(subFolder, 'valBAAnoNumP', str(noNumP))
BuildCharts.YesNoPie(subFolder + '\\pie211.png', yesNum, noNum)
示例14: compute71
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def compute71(subFolder, statData): # aggregate
print "\nComputing values for slide 7.1."
values = StatValues.extractAnswers(statData, [56, 57])
values = StatValues.joinLists(values)
yesNum = values.count("87") + values.count("88")
noNum = values.count("89") + values.count("90")
[yesNumP, noNumP] = StatValues.percent([yesNum, noNum])
BuildTex.addMacros(subFolder, "valGAyesNum", str(yesNum))
BuildTex.addMacros(subFolder, "valGAnoNum", str(noNum))
BuildTex.addMacros(subFolder, "valGAyesNumP", str(yesNumP))
BuildTex.addMacros(subFolder, "valGAnoNumP", str(noNumP))
BuildCharts.YesNoPie(subFolder + "\\pie71.png", yesNumP, noNumP)
示例15: computeAllBossTeacher
# 需要导入模块: import BuildTex [as 别名]
# 或者: from BuildTex import addMacros [as 别名]
def computeAllBossTeacher(subFolder, statData) :
values = StatValues.extractAnswers(statData, [8])
boss = values.count('201') + values.count('202')
teacher = values.count('203')
BuildTex.addMacros(subFolder, 'nTotal', str(len(statData)))
BuildTex.addMacros(subFolder, 'numBoss', str(boss))
BuildTex.addMacros(subFolder, 'numTeacher', str(teacher))