Skip to content

Instantly share code, notes, and snippets.

View tkgshn's full-sized avatar
🌏
Working from anywhere

taka (Shunsuke Takagi) tkgshn

🌏
Working from anywhere
View GitHub Profile
@tkgshn
tkgshn / calculate_economics.py
Created December 22, 2023 02:54
Estimating the cost of generate clustered data in GR participant data via DeCartography
import json
def load_data(file_path):
with open(file_path, 'r') as f:
return json.load(f)
def calculate_tasks(data, file_path):
total_address = len(data)
print(f"Analyzing {total_address:,} addresses... (Target file: '{file_path.split('/')[-1]}')")
let Dic = [
["japanese": "私", "english": "I", "phraseAudioName" : "人称"],
["japanese": "私とあなた", "english": "I and You", "phraseAudioName" : "国と言語"],
["japanese": "私たち", "english": "both of us", "phraseAudioName" : "人称"],
["japanese": "彼", "english": "he", "phraseAudioName" : "国と言語"],
["japanese": "彼と彼女", "english": "he and she", "phraseAudioName" : "人称"],
["japanese": "彼ら", "english": "they both", "phraseAudioName" : "国と言語"],
]
// MARK: - やりたいこと
//japanese(日本語)を3つほどランダムで表示する
// MARK: - Code
////フレーズという辞書を定義する
let phrases = [
["japanese": "私", "english": "I", "phraseAudioName" : "人称"],
["japanese": "私とあなた", "english": "I and You", "phraseAudioName" : "国と言語"],