def doTracking(delay=0): for i in xrange(200): cm.go(1) m = cm.video_source.getOutputColorMat() for j in xrange(tm.getFoundSubtreeCount()): tm.displayFoundSubtreeBorders(j, m, False, 2, 0) if write_video: video_writer.write(m) if delay != -1: cm.wk(delay)
import common as common for x in common.razorModules: x = str(x) exec(compile("common." + x + " = " + x, "<retards>", "exec")) common.go(Player.Position.X + 1, Player.Position.Y + 1) # insula bank
for l in ["M", "L"]: wimport(w, r.RooPoisson("pois_%s" % l, "pois_%s" % l, w.var("n_%s" % l), w.function("mean_%s" % l))) w.factory("PROD::model(pois_L,pois_M)") w.defineSet("obs", common.argSet(w, ["n_L", "n_M"])) dataset = common.dataset(w.set("obs")) #w.Print() return common.fit_result(w, w.pdf("model"), "r", dataset, pl=True) if __name__ == "__main__": common.setup() __L2M = {"yRange": (0.0, 0.35), "yTitle": "CSVL to CSVM", "data": data_CSV_L2M, "tags": ["1tag;", "2tag;"]} common.go(pdf="L2M_fit.pdf", func=fit_two_terms, **__L2M) common.go(pdf="L2M_arithmetic.pdf", func=arithmetic, **__L2M) __R2T = {"yRange": (0.0, 1.0), "yTitle": "relaxed to tight", "data": data_SS_relaxed_to_tight, "tags": ["1;", "2;"]} common.go(pdf="R2T_fit.pdf", func=fit_two_terms, **__R2T) common.go(pdf="R2T_arithmetic.pdf", func=arithmetic, **__R2T)
def doTracking(delay=0): for i in xrange(200): cm.go(1) m = cm.video_source.getOutputColorMat() for j in xrange(tm.getFoundSubtreeCount()): tm.displayFoundSubtreeBorders(j, m, False, 2, 0)
m = cm.video_source.getOutputColorMat() for j in xrange(tm.getFoundSubtreeCount()): tm.displayFoundSubtreeBorders(j, m, False, 2, 0) if write_video: video_writer.write(m) if delay != -1: cm.wk(delay) cm.the_callback = callback n = cm.network if isTraining: cm.go(3200) n.save("ot.dst") else: n.load("ot.dst") # cm.network.save("ot.dst") tm = cm.pd.DestinTreeManager(n, 1) print "size of winning tree is: " + str(tm.getWinningCentroidTreeSize()) cm.freezeTraining() for i in xrange(100): cm.go(1) tm.addTree() support = 10 print "mining..." found = tm.mine(support)
w.defineSet("obs", common.argSet(w, ["n_L", "n_M"])) dataset = common.dataset(w.set("obs")) #w.Print() return common.fit_result(w, w.pdf("model"), "r", dataset, pl=True) if __name__ == "__main__": common.setup() __L2M = { "yRange": (0.0, 0.35), "yTitle": "CSVL to CSVM", "data": data_CSV_L2M, "tags": ["1tag;", "2tag;"] } common.go(pdf="L2M_fit.pdf", func=fit_two_terms, **__L2M) common.go(pdf="L2M_arithmetic.pdf", func=arithmetic, **__L2M) __R2T = { "yRange": (0.0, 1.0), "yTitle": "relaxed to tight", "data": data_SS_relaxed_to_tight, "tags": ["1;", "2;"] } common.go(pdf="R2T_fit.pdf", func=fit_two_terms, **__R2T) common.go(pdf="R2T_arithmetic.pdf", func=arithmetic, **__R2T)
def doTracking(delay=0): for i in xrange(200): cm.go(1) m = cm.video_source.getOutputColorMat() for j in xrange(tm.getFoundSubtreeCount()): tm.displayFoundSubtreeBorders(j, m, False, 2, 0) #cm.wk(delay) cm.the_callback = callback n = cm.network if isTraining: cm.go(3200) n.save("ot.dst") else: n.load("ot.dst") #cm.network.save("ot.dst") tm = cm.pd.DestinTreeManager(n, 1) print "size of winning tree is: " + str(tm.getWinningCentroidTreeSize()) cm.freezeTraining() for i in xrange(100): cm.go(1) tm.addTree() support = 10 print "mining..." found = tm.mine(support)
wimport(w, r.RooRealVar("qcd", "qcd", qcdIni, 0.0, 3.0 * max(1.0, qcdIni))) for l in ["M", "SSL", "SST"]: wimport(w, r.RooRealVar("ewk_%s" % l, "ewk_%s" % l, getattr(y, "ewk_%s" % l))) wimport(w, r.RooRealVar("n_%s" % l, "n_%s" % l, getattr(y, "n_%s" % l))) wimport(w, r.RooFormulaVar("mean_SSL", "(@0)+(@1)", r.RooArgList(w.var("ewk_SSL"), w.var("qcd_SSL")))) wimport(w, r.RooFormulaVar("mean_SST", "(@0)+((@1)*(@2))", r.RooArgList(w.var("ewk_SST"), w.var("qcd_SSL"), w.var("r")))) wimport(w, r.RooFormulaVar("mean_M", "(@0)+((@1)/(@2))", r.RooArgList(w.var("ewk_M"), w.var("qcd"), w.var("r")))) for l in ["M", "SSL", "SST"]: wimport(w, r.RooPoisson("pois_%s" % l, "pois_%s" % l, w.var("n_%s" % l), w.function("mean_%s" % l))) w.factory("PROD::model(pois_M,pois_SSL,pois_SST)") w.defineSet("obs", common.argSet(w, ["n_M", "n_SSL", "n_SST"])) dataset = common.dataset(w.set("obs")) #w.Print() return common.fit_result(w, w.pdf("model"), "qcd", dataset, pl=True) if __name__ == "__main__": common.setup() __qcd = {"data": data, "yTitle": "QCD yield estimate"} common.go(pdf="QCD_arithmetic1.pdf", func=arithmetic, tags=["1;"], yRange=(0.0, 50.0), **__qcd) common.go(pdf="QCD_arithmetic2.pdf", func=arithmetic, tags=["2;"], yRange=(0.0, 15.0), **__qcd) common.go(pdf="QCD_fit1.pdf", func=fit_qcd, tags=["1;"], yRange=(0.0, 50.0), **__qcd) common.go(pdf="QCD_fit2.pdf", func=fit_qcd, tags=["2;"], yRange=(0.0, 15.0), **__qcd)
if not Misc.CurrentScriptDirectory() in sys.path: sys.path.append(Misc.CurrentScriptDirectory()) # import System import common as common import hoboconstants as hobo for x in common.razorModules: x = str(x) exec(compile("common." + x + " = " + x, "<retards>", "exec")) startX = Player.Position.X startY = Player.Position.Y positions = { 1: [15, 15], 2: [-15, 15], 3: [-15, 0], 4: [15, 0], 5: [-15, -0], 6: [1, 1] } #Recal To Luna Moongate while not Player.IsGhost: for pos in positions: Misc.SendMessage(positions[pos][1]) common.go(startX + positions[pos][0], startY + positions[pos][1]) Misc.Pause(6000)