code
stringlengths
3
6.57k
_init_categories(categories=categories)
globals()
items()
_init_categories()
getdefaultlocale()
getdefaultlocale()
categories.items()
getlocale(category)
resetlocale()
resetlocale()
categories.items()
getlocale(category)
setlocale(LC_ALL, '')
setlocale(LC_ALL, "")
setlocale(LC_ALL, "")
categories.items()
getlocale(category)
__all__.append('LC_MESSAGES')
_print_locale()
_test()
_get_handlers(location:str="")
argparse.ArgumentParser()
argparser.add_argument('handicap', type=int, nargs=1)
argparser.add_argument('output_sgf', nargs='?', default='output.sgf')
argparser.parse_args()
SevenPlaneProcessor()
open(model_file, 'r')
yaml.load(f)
model_from_yaml(yaml.dump(yml)
model.compile(loss='categorical_crossentropy', optimizer='adadelta', metrics=['accuracy'])
model.load_weights(weight_file)
KerasBot(model=model, processor=processor)
subprocess.Popen(pachi_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
send_command(gtpStream, cmd)
gtpStream.stdin.write(cmd)
print(cmd.strip()
get_response(gtpStream)
gtpStream.stdout.readline()
line.strip()
print("Response is: " + line)
re.sub('^= ?', '', line)
sgfCoord(coords)
send_command(p, "boardsize 19\n")
get_response(p)
if(handicap == 0)
send_command(p, "komi 7.5\n")
get_response(p)
send_command(p, "fixed_handicap " + str(handicap)
get_response(p)
str(handicap)
stones.split(" ")
gtp_position_to_coords(pos)
bot.apply_move('b', move)
sgfCoord(move)
if(handicap > 1)
if(last_color != our_color)
bot.select_move(our_color)
send_command(p, "play " + colors[our_color] + " pass\n")
our_color.upper()
coords_to_gtp_position(move)
send_command(p, "play " + colors[our_color] + " " + pos + "\n")
our_color.upper()
sgfCoord(move)
get_response(p)
send_command(p, "genmove " + colors[their_color] + "\n")
get_response(p)
if(pos == 'resign')
elif(pos == 'pass')
their_color.upper()
gtp_position_to_coords(pos)
bot.apply_move(their_color, move)
their_color.upper()
sgfCoord(move)
open(args.output_sgf, 'w')
out_h.write(sgf)
main()
print("starting...",end='')
print("[" + ("OK" if state else "ERROR" )
winThread.start()
comunication.start()
threading.Thread(target=window.start)
main()
requests.get(ENDPOINT, params=parameters)
wp_call.json()
replace("-","")
days.keys()
keys()
print(days)
days.items()
dval.items()
print(days)
requests.get(ENDPOINT + wp_code + '/' + access + '/' + agents + '/' + quote(page_title, safe='')
wp_call.json()
print(json.dumps(response, indent=4)
print(dv['timestamp'])
days.keys()
print(json.dumps(days, indent=4)
sorted(days.items()
operator.itemgetter(0)
print(days_sorted)