Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@eidas
eidas / TojitomoApkManifest.json
Created February 12, 2023 09:25
刀使ノ巫女 ~刻みし一閃の燈火~ のxapkファイル用のmanifest.jsonです。
{
"xapk_version": 2,
"package_name": "com.square_enix.android_googleplay.TojinomikoTomoshibi",
"name": "刀使ノ巫女",
"locales_name": {
"af": "刀使ノ巫女",
"am": "刀使ノ巫女",
"ar": "刀使ノ巫女",
"as": "刀使ノ巫女",
"az": "刀使ノ巫女",
@eidas
eidas / pq.py
Created September 17, 2013 10:51
プチコン「クイズ 1ミニットショック」用問題データトランスレータ
#!/usr/bin/env python
#### -*- coding: utf-8 -*-
# encoding=shift_jis
#this script is for python 2.x
#quiz data translater for petitcom 'quiz 1minute shock'
import sys
import codecs
@eidas
eidas / animal2.py
Created September 13, 2013 07:58
PyCon2013 チュートリアル アニマル問題その2 推論+学習
#! /usr/bin/env python
# coding:utf-8
import sys
def line_input(prompt):
while True:
sys.stdout.write(">>> %s : " % prompt)
sys.stdout.flush()
answer = sys.stdin.readline().strip()
@eidas
eidas / animal1.py
Last active December 22, 2015 23:29
PyCon2013 チュートリアル アニマル問題その1 推論のみで学習しない時
#! /usr/bin/env python
# coding:utf-8
import sys
def line_input(prompt):
while True:
sys.stdout.write(">>> %s : " % prompt)
sys.stdout.flush()
answer = sys.stdin.readline().strip()
@eidas
eidas / maze2.py
Created September 13, 2013 05:03
PyCon 2013 チュートリアル 迷路問題その2 隣接マップで書き換えたもの
#! /usr/bin/env python
# coding:utf-8
class Maze(object):
def __init__(self, maze_map):
self.neighbor_node_map = dict()
self.build_neighbor_node_map(maze_map)
def is_floor(self, maze_map, x, y):
return True if maze_map[y][x]==0 else False
@eidas
eidas / maze.py
Created September 13, 2013 05:03
PyCon 2013 チュートリアル 迷路問題その1
#! /usr/bin/env python
# coding:utf-8
class Maze(object):
def __init__(self):
self.bitmap = (
(1,1,1,1,1,1,1,1),
(1,0,1,0,1,1,0,1),
(1,0,1,0,1,0,0,1),
(1,0,0,0,1,1,0,1),
@eidas
eidas / lifegame3.py
Created September 13, 2013 05:01
ライフゲーム for Python 2.x
#! /usr/bin/env python
# coding:utf-8
import Tkinter
from copy import *
from random import *
import pickle
'''ライフゲーム ver.3 Tkのキャンバス上にライフゲームのボードを再現してみる'''
@eidas
eidas / kai_square.py
Created March 8, 2012 15:35
Pythonの乱数評価用
import random
random.seed()
def rand(y,randmax,n):
for i in range(randmax+1):
y[i] = 0
for i in range(randmax*n+1):
r = random.randint(0,randmax)
y[r] += 1
@eidas
eidas / FONTED
Created January 17, 2012 16:07
PETITCOM フォントエディタ V0.2
'+------------------+
'| FONT EDITOR V0.2 |
'+------------------+
'PRG:FONTED
'------------
'--- ショキカ ---
'------------
CLEAR
PNLTYPE "OFF"
@eidas
eidas / sbcount.py
Created December 25, 2011 11:54
SMILE BASIC キーワードカウンタ
# -*- coding: utf-8 -*-
# sbcountmk2.py : Smile Basic mk2のキーワード出現頻度を調べる
import re, sys, codecs
# グローバル変数定義
iflag = False
dic = {}