def do_GET(self):
        self.send_response(200)
        self.send_header("Content-type", "text/html")
        self.end_headers()
        imsi = parse_qs(urlparse(self.path).query).get('data', None)
        pars = imsi[0]
        pars = pars[1:len(pars) - 1]
        intpars = []
        cur = 0
        for i in range(len(pars)):
            if pars[i] != ',':
                cur = cur * 10 + float(pars[i])
            else:
                intpars.append(cur)
                cur = 0
        intpars.append(cur)
        #args = ""
        #for i in range(len(intpars)):
        #    args = args + str(intpars[i]) + " "
        #print(args)
        score1, score2, score3, score4, score5, score6 = test2.main(intpars)
        print("scores are:")

        print(str(score1))
        print(str(score2))
        print(str(score3))
        print(str(score4))
        print(str(score5))
        print(str(score6))
Пример #2
0
def export(day, doubt_to, black, white, row):  #ここが出力部分
    if day == "pre":
        return
    print(day)
    print("SUS", end="")
    Exec = most(doubt_to)  #処刑対象の判定
    print("BLACK", end="")
    Orac = most(black)  #占い対象の判定
    print("WHITE" + str(white))  #庇う対象もしくは殺害先の対象の判定
    if day != "プロローグ":
        if doubt_to != {}:
            Exec = random.choice(Exec)
        else:
            Exec = random.choice(chr_list)
        print("Executioned : " + Exec)  #Execが処刑先
        test2.main(str(row[1]), str(row[2]), str(row[1]), '', 'morning')
        if black != {}:
            Orac = random.choice(Orac)
        else:
            Orac = random.choice(chr_list)
        print("Oracle : " + Orac)  #Oracが占い先
        test2.main(str(row[1]), str(row[2]), str(row[1]), '', 'night')
        if white != {}:
            Sacr = random.choice(list(white.keys()))
            Prot = random.choice(list(white.keys()))
        else:
            Sacr = random.choice(chr_list)
            Prot = random.choice(chr_list)
        print("Sacrifice : " + Sacr)  #Sacrが人狼の殺害先
        test2.main(str(row[1]), str(row[2]), str(row[1]), '', 'morning')
        print("Protected : " + Prot)  #Protが狩人の庇う先

    print("\n")
Пример #3
0

from test2 import main 

##s=pytset.PyTSet(100,range(50,70))
##o=pytset.PyTSet(129,range(60,80))

##print len(o.tobytes())

##o=None
##gc.collect()
##print "s:",list(s)
##for item in s:
##    print item
##print "o:",list(o)

##s&=o
##print "intersection",list(s)

##s=pytset.PyTSet(100,range(50,70))
##s-=o
##print "s minus o:",list(s)

##s=pytset.PyTSet(100,range(50,70))
##s|=o
##print "union:",list(s)


main() 

Пример #4
0
        # 其他的 handler
    },
    'loggers': {
        'StreamLogger': {
            'handlers': ['console'],
            'level': 'DEBUG',
        },
        'ConsoleFileLogger': {
            # 既有 console Handler,还有 file Handler
            'handlers': ['console', 'file', 'rotaFile'],
            'level': 'DEBUG',
        },
        # 其他的 Logger
    }
}

logging.config.dictConfig(config)
StreamLogger = logging.getLogger("StreamLogger")
ConsoleFileLogger = logging.getLogger("ConsoleFileLogger")

if __name__ == '__main__':
    while True:
        ConsoleFileLogger.debug('debug')
        ConsoleFileLogger.info('info')
        ConsoleFileLogger.warn('warn')
        ConsoleFileLogger.error('error')

        test2.main()

        time.sleep(5)
Пример #5
0
import pytset
import gc

from test2 import main

##s=pytset.PyTSet(100,range(50,70))
##o=pytset.PyTSet(129,range(60,80))

##print len(o.tobytes())

##o=None
##gc.collect()
##print "s:",list(s)
##for item in s:
##    print item
##print "o:",list(o)

##s&=o
##print "intersection",list(s)

##s=pytset.PyTSet(100,range(50,70))
##s-=o
##print "s minus o:",list(s)

##s=pytset.PyTSet(100,range(50,70))
##s|=o
##print "union:",list(s)

main()
Пример #6
0
    #print(str(count) + ":" + str(row))

    row[3] = m_t.parse(str(row[3]))
    row[3] = row[3].replace('\n', '')
    remark = row[3].split(' ')
    #print(row,'\n\n')
    if row[3] == '':
        villager_label = main(str(a))
        print(villager_label)

        row[1]

        if villager_label == '__label__1':
            print(villager["1"])
            row[3] = villager["1"]
            test2.main(str(row[1]), str(row[2]), str(row[1]), '', 'noon')
        if villager_label == '__label__2':
            print(villager["2"])
            row[3] = villager["2"]
            test2.main(str(row[1]), str(row[2]), str(row[1]), str(row[3]),
                       'noon')
        if villager_label == '__label__3':
            print(villager["3"])
            row[3] = villager["3"]
            test2.main(str(row[1]), str(row[2]), str(row[1]), str(row[3]),
                       'noon')
        if villager_label == '__label__4':
            print(villager["4"])
            row[3] = villager["4"]
            test2.main(str(row[1]), str(row[2]), str(row[1]), str(row[3]),
                       'noon')
Пример #7
0
import character
import enemy
import roomLib
import test2

# Initialize pygame
pygame.init()

######################################################################
#SETTINGS
screenWidth = 800
screenHeight = 600
FPS = 30
# timeDelay = 50 DEPRECATED

#Creates window, and clock, sets Icon
screen = pygame.display.set_mode((screenWidth, screenHeight))
pygame.display.set_caption("Dungeon Taker: OTA")
icon = pygame.image.load('images/oubliette.png')
pygame.display.set_icon(icon)
clock = pygame.time.Clock()

state = "INTRO"
running = True

while running:
    if state == "INTRO":
        state = test2.main()
        print(state)