1
0
Fork 0
mirror of synced 2024-04-27 01:02:50 +12:00

Add a flash card like quiz for JLPT quizes

This commit is contained in:
Dan Hess 2021-04-12 14:52:05 -08:00
parent 1cbaf43fe6
commit 80649d187d
8 changed files with 6177 additions and 1 deletions

View file

@ -1,6 +1,14 @@
import json
from discord.ext import commands
from utils import conjugator, checks, request, Pages, CannotPaginate
from utils import (
conjugator,
checks,
request,
Pages,
CannotPaginate,
chunks,
FlashCardDisplay,
)
class Japanese(commands.Cog):
@ -8,6 +16,7 @@ class Japanese(commands.Cog):
def __init__(self):
# Load the verbs
with open("utils/japanese_verbs.json") as f:
verbs = json.load(f)
@ -21,6 +30,20 @@ class Japanese(commands.Cog):
self.verbs = verbs
# Load the JLPT vocab
with open("utils/japanese_vocabulary_n2.json") as f:
n2 = json.load(f)
self.n2_packs = list(chunks(n2, 50))
with open("utils/japanese_vocabulary_n3.json") as f:
n3 = json.load(f)
self.n3_packs = list(chunks(n3, 50))
with open("utils/japanese_vocabulary_n4.json") as f:
n4 = json.load(f)
self.n4_packs = list(chunks(n4, 50))
with open("utils/japanese_vocabulary_n5.json") as f:
n5 = json.load(f)
self.n5_packs = list(chunks(n5, 50))
@commands.command(aliases=["活用", "かつよう", "katsuyou"])
@checks.can_run(send_messages=True)
async def conjugate(self, ctx, verb):
@ -109,6 +132,26 @@ query ($name: String) {
except CannotPaginate as e:
await ctx.send(str(e))
@commands.command()
@commands.max_concurrency(1, per=commands.BucketType.channel)
@checks.can_run(send_messages=True)
async def jlpt(self, ctx, level=None, pack: int = None):
"""
Runs a "flash card" pack for the JLPT level specified. This has N2-N5 available
and there are 50 cards per pack, per level.
EXAMPLE: !jlpt n5 1
RESULT: Starts a flash card game of 50 cards from the JLPT n5 vocab list
"""
if level not in ("n2", "n3", "n4", "n5"):
return await ctx.send("JLPT level options are n2, n3, n4, or n5")
packs = getattr(self, f"n{level}_packs")
if pack > len(packs) or pack < 1:
return await ctx.send(f"The JLPT n{level} has {len(packs)} available")
pack = packs[pack - 1]
await FlashCardDisplay(pack).start(ctx, wait=True)
def setup(bot):
bot.add_cog(Japanese())

View file

@ -4,3 +4,4 @@ from .config import *
from .utilities import *
from .paginator import Pages, CannotPaginate, HelpPaginator
from .database import DB, Cache
from .flash_card import FlashCardDisplay

98
utils/flash_card.py Normal file
View file

@ -0,0 +1,98 @@
import discord
from discord.ext import menus
class FlashCard:
def __init__(self, vocab, sentence, answer):
self.vocab = vocab
self.sentence = sentence
self.answer = answer
def show_question(self):
return discord.Embed(
description=f"""
**Vocabulary**: {self.vocab}
"""
)
def show_hint(self):
return discord.Embed(
description=f"""
**Vocabulary**: {self.vocab}
**Example sentence**: {self.sentence}
"""
)
def show_answer(self):
return discord.Embed(
description=f"""
**Vocabulary**: {self.vocab}
""" # **Example sentence**: {self.sentence}
"""
**Answer**: {self.answer}
"""
)
class FlashCardDisplay(menus.Menu):
def __init__(self, pack):
super().__init__(clear_reactions_after=True)
self.pack = pack
self.count = 0
self.current_card = pack[self.count]
self.amount_of_cards = len(pack)
self.showing_answer = False
async def send_initial_message(self, ctx, channel):
await ctx.send(
"Instructions: You'll be shown a vocabulary word. "
"If you know/don't know the answer hit ▶️. The answer will then "
"be shown, and you can choose 🔴 if you didn't know the answer or 🟢 if you did."
)
embed = self.modify_embed(self.current_card.show_question())
return await self.ctx.send(embed=embed)
def next_card(self):
try:
self.count += 1
self.current_card = self.pack[self.count]
return self.modify_embed(self.current_card.show_question())
except IndexError:
# Probably show results
self.stop()
def modify_embed(self, embed):
embed = embed.set_footer(text=f"{self.count + 1}/{self.amount_of_cards}")
embed = embed.set_author(
name=self.ctx.author, icon_url=self.ctx.author.avatar_url
)
return embed
# @menus.button("❔")
# async def do_hint(self, payload):
# embed = self.modify_embed(self.current_card.show_hint())
# return await self.message.edit(embed=embed)
@menus.button("▶️")
async def do_flip(self, payload):
self.showing_answer = True
embed = self.modify_embed(self.current_card.show_answer())
return await self.message.edit(embed=embed)
@menus.button("🔴")
async def do_failure(self, payload):
if not self.showing_answer:
return
# Save that they got it wrong
self.showing_answer = False
embed = self.next_card()
return await self.message.edit(embed=embed)
@menus.button("🟢")
async def do_correct(self, payload):
if not self.showing_answer:
return
# Save that they got it right
self.showing_answer = False
embed = self.next_card()
return await self.message.edit(embed=embed)

View file

@ -0,0 +1,398 @@
[
{
"vocabulary": " 明け方",
"meaning": "dawn"
},
{
"vocabulary": " 青白い",
"meaning": "pale; bluish-white"
},
{
"vocabulary": " 足跡",
"meaning": "footprints"
},
{
"vocabulary": " 売買",
"meaning": "trade; buying and selling"
},
{
"vocabulary": " 売店",
"meaning": "stand; stall; booth; kiosk; store"
},
{
"vocabulary": " 募集",
"meaning": "recruitment; invitation; taking applications; solicitation"
},
{
"vocabulary": " 長男",
"meaning": "eldest son; first-born son"
},
{
"vocabulary": " 楕円",
"meaning": "ellipse"
},
{
"vocabulary": " 大学院",
"meaning": "graduate school"
},
{
"vocabulary": " 出入口",
"meaning": "exit and entrance"
},
{
"vocabulary": " 宴会",
"meaning": "party; banquet; reception; feast; dinner"
},
{
"vocabulary": " 円周",
"meaning": "circumference"
},
{
"vocabulary": " 遠足",
"meaning": "excursion; outing; trip"
},
{
"vocabulary": " 学科",
"meaning": "study subject; course of study; department"
},
{
"vocabulary": " 学会",
"meaning": "scientific society; academic meeting; academic conference"
},
{
"vocabulary": " 学力",
"meaning": "scholarly ability; scholarship; knowledge; literary ability"
},
{
"vocabulary": " 外科",
"meaning": "surgery; department of surgery"
},
{
"vocabulary": " 花火",
"meaning": "fireworks"
},
{
"vocabulary": " 半径",
"meaning": "radius"
},
{
"vocabulary": " 半島",
"meaning": "peninsula"
},
{
"vocabulary": " 発売",
"meaning": "sale; release (for sale); launch (product)"
},
{
"vocabulary": " 早口",
"meaning": "fast-talking; rapid talking"
},
{
"vocabulary": " 外れる",
"meaning": "to be disconnected; to be off; to miss the mark"
},
{
"vocabulary": " 閉会",
"meaning": "closure (of a ceremony, event, meeting, etc.)"
},
{
"vocabulary": " 昼寝",
"meaning": "nap, siesta"
},
{
"vocabulary": " 意地悪",
"meaning": "malicious; ill-tempered; unkind"
},
{
"vocabulary": " 移転",
"meaning": "moving; relocation; change of address"
},
{
"vocabulary": " 一旦",
"meaning": "once; for a short time; briefly; temporarily"
},
{
"vocabulary": " 寺院",
"meaning": "Buddhist temple; religious building"
},
{
"vocabulary": " 人文科学",
"meaning": "humanities; social sciences; liberal arts"
},
{
"vocabulary": " 自習",
"meaning": "self-study; teaching oneself"
},
{
"vocabulary": " 時速",
"meaning": "speed (per hour)"
},
{
"vocabulary": " 実習",
"meaning": "practice; training; practical exercise; drill"
},
{
"vocabulary": " 過半数",
"meaning": "majority"
},
{
"vocabulary": " 開会",
"meaning": "opening of a meeting; starting (an event, etc)"
},
{
"vocabulary": " 会館",
"meaning": "meeting hall; assembly hall"
},
{
"vocabulary": " 回転",
"meaning": "rotation; revolution; turning"
},
{
"vocabulary": " 加速",
"meaning": "acceleration; speeding up"
},
{
"vocabulary": " 加速度",
"meaning": "acceleration"
},
{
"vocabulary": " 見学",
"meaning": "study by observation; field trip; tour; review; inspection"
},
{
"vocabulary": " 国王",
"meaning": "king; queen; monarch; sovereign"
},
{
"vocabulary": " 国立",
"meaning": "national"
},
{
"vocabulary": " 国籍",
"meaning": "nationality; citizenship"
},
{
"vocabulary": " 転がる",
"meaning": "to roll; to fall over; to lie down"
},
{
"vocabulary": " 転がす",
"meaning": "to roll; to turn over"
},
{
"vocabulary": " 校舎",
"meaning": "school building; schoolhouse"
},
{
"vocabulary": " 校庭",
"meaning": "schoolyard; playground; school grounds; campus"
},
{
"vocabulary": " 待合室",
"meaning": "waiting room"
},
{
"vocabulary": " 待ち合わせる",
"meaning": "to rendezvous; to meet at a prearranged place and time; to arrange to meet"
},
{
"vocabulary": " 窓口",
"meaning": " ticket window; teller window; counter"
},
{
"vocabulary": " 毎度",
"meaning": "each time; always; often; thank you for your continued patronage"
},
{
"vocabulary": " 真っ青",
"meaning": "deep blue; bright blue; ghastly pale; white as a sheet"
},
{
"vocabulary": " 真っ白",
"meaning": "pure white; blank"
},
{
"vocabulary": " 名刺",
"meaning": "business card"
},
{
"vocabulary": " 店屋",
"meaning": "store; shop"
},
{
"vocabulary": " 木材",
"meaning": "lumber; timber; wood"
},
{
"vocabulary": " 元々",
"meaning": "originally, by nature, from the start"
},
{
"vocabulary": " 内科",
"meaning": "internal medicine"
},
{
"vocabulary": " 並木",
"meaning": "roadside tree; row of trees"
},
{
"vocabulary": " 入社",
"meaning": "joining a company"
},
{
"vocabulary": " 押さえる",
"meaning": "to pin down; to hold down; to press down"
},
{
"vocabulary": " 理科",
"meaning": "science (department; course)"
},
{
"vocabulary": " 領収",
"meaning": "receipt (of money); receiving"
},
{
"vocabulary": " 再三",
"meaning": "again and again; repeatedly"
},
{
"vocabulary": " 刺さる",
"meaning": "to stick into (with a sharp point); to prick; to get stuck (in);"
},
{
"vocabulary": " 刺身",
"meaning": "sashimi (raw sliced fish, shellfish or crustaceans)"
},
{
"vocabulary": " 早速",
"meaning": "at once; immediately; without delay; promptly"
},
{
"vocabulary": " 刺す",
"meaning": "to pierce; to stab; to prick; to stick; to thrust; to sting"
},
{
"vocabulary": " 青少年",
"meaning": "youth; young person"
},
{
"vocabulary": " 赤道",
"meaning": "equator"
},
{
"vocabulary": " 社会科学",
"meaning": "social science"
},
{
"vocabulary": " 社説",
"meaning": "editorial; leading article; leader"
},
{
"vocabulary": " 司会",
"meaning": "master of ceremonies; leading a meeting; presenter; host"
},
{
"vocabulary": " 新幹線",
"meaning": "Japanese bullet train"
},
{
"vocabulary": " 白髪",
"meaning": "white hair; grey hair"
},
{
"vocabulary": " 自然科学",
"meaning": "natural science"
},
{
"vocabulary": " 書店",
"meaning": "bookshop; bookstore"
},
{
"vocabulary": " 商社",
"meaning": "trading company; firm"
},
{
"vocabulary": " 商店",
"meaning": "shop; small store; business; firm"
},
{
"vocabulary": " 集合",
"meaning": "gathering; assembly; meeting"
},
{
"vocabulary": " 習字",
"meaning": "calligraphy; penmanship"
},
{
"vocabulary": " 集会",
"meaning": "meeting; assembly; gathering; convention; rally"
},
{
"vocabulary": " 父母",
"meaning": "father and mother; parents"
},
{
"vocabulary": " 速力",
"meaning": "speed"
},
{
"vocabulary": " 速達",
"meaning": "express; special delivery"
},
{
"vocabulary": " 足袋",
"meaning": "Japanese socks (with split toe)"
},
{
"vocabulary": " 足る",
"meaning": "to be sufficient; to be enough; to be worth doing; to be worthy of; to deserve"
},
{
"vocabulary": " 特売",
"meaning": "special sale"
},
{
"vocabulary": " 透明",
"meaning": "transparent; clear"
},
{
"vocabulary": " 東洋",
"meaning": "Orient"
},
{
"vocabulary": " 売れ行き",
"meaning": "sales; demand"
},
{
"vocabulary": " 売上",
"meaning": "amount sold; sales; proceeds; turnover"
},
{
"vocabulary": " 売り切れ",
"meaning": "sold out"
},
{
"vocabulary": " 売り切れる",
"meaning": "to be sold out"
},
{
"vocabulary": " 我が",
"meaning": "my; our; one's own"
},
{
"vocabulary": " 洋品店",
"meaning": "shop that handles Western-style apparel and accessories"
},
{
"vocabulary": " 輸血",
"meaning": "blood transfusion"
},
{
"vocabulary": " 輸送",
"meaning": "transport; transportation"
},
{
"vocabulary": " 材木",
"meaning": "lumber; timber"
}
]

View file

@ -0,0 +1,770 @@
[
{
"vocabulary": " 明かり",
"meaning": "light; illumination; glow; gleam"
},
{
"vocabulary": " 明ける",
"meaning": "to dawn,to become daylight"
},
{
"vocabulary": " 明らか",
"meaning": "clear; obvious"
},
{
"vocabulary": " 悪魔",
"meaning": "devil; demon; fiend; Satan"
},
{
"vocabulary": " 暗記",
"meaning": "memorization; learning by heart"
},
{
"vocabulary": " 新た",
"meaning": "new; fresh; novel"
},
{
"vocabulary": " 有らゆる",
"meaning": "all; every"
},
{
"vocabulary": " 集まり",
"meaning": "gathering; meeting; assembly; collection; attendance"
},
{
"vocabulary": " 部分",
"meaning": "portion; section; part"
},
{
"vocabulary": " 分",
"meaning": "part; segment; share; ration"
},
{
"vocabulary": " 文明",
"meaning": "civilization; culture"
},
{
"vocabulary": " 分析",
"meaning": "analysis"
},
{
"vocabulary": " 分野",
"meaning": "field; sphere; realm; division; branch"
},
{
"vocabulary": " 父親",
"meaning": "father"
},
{
"vocabulary": " 地平線",
"meaning": "horizon (related to land)"
},
{
"vocabulary": " 地位",
"meaning": "(social) position; status"
},
{
"vocabulary": " 長期",
"meaning": "long-term"
},
{
"vocabulary": " 中",
"meaning": "during; while; medium; middle"
},
{
"vocabulary": " 中学",
"meaning": "junior high school; middle school"
},
{
"vocabulary": " 昼食",
"meaning": "lunch; midday meal"
},
{
"vocabulary": " 大部分",
"meaning": "most part; greater part; majority"
},
{
"vocabulary": " 駄目 ",
"meaning": "no good; cannot"
},
{
"vocabulary": " 男子",
"meaning": "youth; young man"
},
{
"vocabulary": " 出会い",
"meaning": "meeting; rendezvous; encounter"
},
{
"vocabulary": " 出会う",
"meaning": "to meet (by chance); to come across; to run across; to encounter"
},
{
"vocabulary": " 読書",
"meaning": "reading"
},
{
"vocabulary": " 努力",
"meaning": "effort; exertion; endeavor; hard work; striving"
},
{
"vocabulary": " 同一",
"meaning": "identical; same; one and the same; equal"
},
{
"vocabulary": " 円",
"meaning": "yen; Japanese monetary unit; circle"
},
{
"vocabulary": " 不利",
"meaning": "disadvantage; handicap; unfavorable position"
},
{
"vocabulary": " 不足",
"meaning": "insufficiency; shortage; deficiency; lack; dearth"
},
{
"vocabulary": " 再び",
"meaning": "again; once more; a second time"
},
{
"vocabulary": " 外交",
"meaning": "diplomacy"
},
{
"vocabulary": " 外出",
"meaning": "going out; outing; leaving (one's home, office, etc.)"
},
{
"vocabulary": " 学期",
"meaning": "school term; semester"
},
{
"vocabulary": " 学",
"meaning": "learning; education; study of"
},
{
"vocabulary": " 学問",
"meaning": "scholarship; study; learning"
},
{
"vocabulary": " 学者",
"meaning": "scholar"
},
{
"vocabulary": " 学習",
"meaning": "study; learning; tutorial"
},
{
"vocabulary": " 議長",
"meaning": "chairman; president; moderator"
},
{
"vocabulary": " 議会",
"meaning": "congress; parliament; diet; legislative assembly"
},
{
"vocabulary": " 語学",
"meaning": "study of foreign languages; linguistics"
},
{
"vocabulary": " 激しい",
"meaning": "violent; extreme; intense"
},
{
"vocabulary": " 母親",
"meaning": "mother"
},
{
"vocabulary": " 博物館",
"meaning": "museum"
},
{
"vocabulary": " 販売",
"meaning": "sales; selling; marketing"
},
{
"vocabulary": " 発明",
"meaning": "invention"
},
{
"vocabulary": " 外す",
"meaning": "to remove; to undo; to drop; to miss"
},
{
"vocabulary": " 品",
"meaning": "elegance, article"
},
{
"vocabulary": " 一言",
"meaning": "single word; a few words; brief comment"
},
{
"vocabulary": " 一人一人",
"meaning": "one by one; each; one at a time"
},
{
"vocabulary": " 本物",
"meaning": "genuine article; real thing; real deal"
},
{
"vocabulary": " 本人",
"meaning": "the person in question; the person themselves; said person"
},
{
"vocabulary": " 一致",
"meaning": "agreement; union; match; coincidence"
},
{
"vocabulary": " 一時",
"meaning": "one o'clock"
},
{
"vocabulary": " 意外",
"meaning": "unexpected; surprising"
},
{
"vocabulary": " 一家",
"meaning": "a family; a household; a home; one's family; whole family"
},
{
"vocabulary": " 今に",
"meaning": "before long; even now"
},
{
"vocabulary": " 今にも",
"meaning": "at any moment; at any minute; on the verge of"
},
{
"vocabulary": " 一般",
"meaning": "general; universal; ordinary; average; common"
},
{
"vocabulary": " 一方",
"meaning": "one (esp. of two); one way; the other direction; although"
},
{
"vocabulary": " 一生",
"meaning": "whole life; a lifetime; a generation"
},
{
"vocabulary": " 一種",
"meaning": "species; kind; variety"
},
{
"vocabulary": " 一瞬",
"meaning": "instant; moment; for an instant"
},
{
"vocabulary": " 一層",
"meaning": "much more; still more; all the more; single layer; sooner; preferably"
},
{
"vocabulary": " 一体",
"meaning": "(what) the heck; (why) in the world"
},
{
"vocabulary": " 所謂",
"meaning": "what is called; as it is called; the so-called; so to speak"
},
{
"vocabulary": " 邪魔",
"meaning": "hindrance"
},
{
"vocabulary": " 化学",
"meaning": "chemistry"
},
{
"vocabulary": " 会",
"meaning": "meeting; assembly; party; association; club"
},
{
"vocabulary": " 会員",
"meaning": "member"
},
{
"vocabulary": " 海外",
"meaning": "foreign; abroad; overseas"
},
{
"vocabulary": " 会合",
"meaning": "meeting; assembly; gathering; association"
},
{
"vocabulary": " 会計",
"meaning": "finance; account; treasurer; bill"
},
{
"vocabulary": " 開始",
"meaning": "start; commencement; beginning; initiation"
},
{
"vocabulary": " 科目",
"meaning": "(school) subject; curriculum; course"
},
{
"vocabulary": " 権利",
"meaning": "right; privilege"
},
{
"vocabulary": " 基本",
"meaning": "basics; fundamentals; basis; foundation"
},
{
"vocabulary": " 記事",
"meaning": "article; news story; report; account"
},
{
"vocabulary": " 気味",
"meaning": "sensation; feeling; tendency"
},
{
"vocabulary": " 記念",
"meaning": "commemoration; celebration; honoring the memory of something"
},
{
"vocabulary": " 気に入る",
"meaning": "to like; to take a liking to"
},
{
"vocabulary": " 記入",
"meaning": "entry; filling in; filling out"
},
{
"vocabulary": " 記憶",
"meaning": "memory; recollection; remembrance"
},
{
"vocabulary": " 記者",
"meaning": "reporter; journalist"
},
{
"vocabulary": " 期待",
"meaning": "expectation; anticipation; hope"
},
{
"vocabulary": " 国家",
"meaning": "state; country; nation"
},
{
"vocabulary": " 国会",
"meaning": "National Diet; legislative assembly of Japan; parliament; congress"
},
{
"vocabulary": " 国境",
"meaning": "national border"
},
{
"vocabulary": " 国語",
"meaning": "national language"
},
{
"vocabulary": " 国民",
"meaning": "people (of a country); nation; citizen; national"
},
{
"vocabulary": " 今後",
"meaning": "from now on; hereafter"
},
{
"vocabulary": " 今回",
"meaning": "now; this time; lately"
},
{
"vocabulary": " 今日",
"meaning": "today; this day"
},
{
"vocabulary": " 転ぶ",
"meaning": "to fall down; to fall over"
},
{
"vocabulary": " 高速",
"meaning": "high-speed; rapid; express"
},
{
"vocabulary": " 訓練",
"meaning": "training; drill; practice; discipline"
},
{
"vocabulary": " 教科書",
"meaning": "textbook; coursebook; schoolbook"
},
{
"vocabulary": " 協力",
"meaning": "cooperation; collaboration"
},
{
"vocabulary": " 強力",
"meaning": "powerful; strong"
},
{
"vocabulary": " 急激",
"meaning": "sudden; abrupt; rapid; sharp; drastic; radical"
},
{
"vocabulary": " 急に",
"meaning": "swiftly; rapidly; quickly; immediately; hastily"
},
{
"vocabulary": " 吸収",
"meaning": "absorption; suction; attraction"
},
{
"vocabulary": " 急速",
"meaning": "rapid (e.g. progress)"
},
{
"vocabulary": " 真面目 ",
"meaning": "serious; earnest"
},
{
"vocabulary": " 真っ赤",
"meaning": "bright red; deep red; flushed (of face)"
},
{
"vocabulary": " 学ぶ",
"meaning": "to study (in depth); to learn; to take lessons in"
},
{
"vocabulary": " 万一",
"meaning": "emergency; unlikely event; by some chance; by some possibility"
},
{
"vocabulary": " 満足",
"meaning": "satisfaction; contentment; sufficient; enough"
},
{
"vocabulary": " 明確",
"meaning": "clear; precise; definite; distinct"
},
{
"vocabulary": " 飯",
"meaning": "cooked rice; meal"
},
{
"vocabulary": " 味方",
"meaning": "friend; ally; supporter; taking sides with; supporting"
},
{
"vocabulary": " 魅力",
"meaning": "charm; fascination; glamour; attraction; appeal"
},
{
"vocabulary": " 木曜",
"meaning": "Thursday"
},
{
"vocabulary": " 半ば",
"meaning": "middle; half; semi; halfway; partly"
},
{
"vocabulary": " 熱心",
"meaning": "enthusiastic; eager"
},
{
"vocabulary": " 日本",
"meaning": "Japan"
},
{
"vocabulary": " 能力",
"meaning": "ability; faculty"
},
{
"vocabulary": " 入場",
"meaning": "entrance; admission; entering"
},
{
"vocabulary": " お昼",
"meaning": "lunch; midday; daytime"
},
{
"vocabulary": " 収める",
"meaning": "to supply; to dedicate; to make an offering; to pay"
},
{
"vocabulary": " 連続",
"meaning": "continuation; succession; series"
},
{
"vocabulary": " 利益",
"meaning": "profit; gains; benefit"
},
{
"vocabulary": " 利口",
"meaning": "clever; intelligent; wise; bright; sharp"
},
{
"vocabulary": " 留学",
"meaning": "studying abroad"
},
{
"vocabulary": " 作品",
"meaning": "work of art; performance"
},
{
"vocabulary": " 左右",
"meaning": "left and right"
},
{
"vocabulary": " 成長",
"meaning": "growth; development; growing up; becoming an adult"
},
{
"vocabulary": " 製品",
"meaning": "manufactured goods; finished goods; product"
},
{
"vocabulary": " 青年",
"meaning": "youth; young man"
},
{
"vocabulary": " 刺激",
"meaning": "stimulus; impetus; incentive; encouragement; motivation; provocation; excitement; thrill"
},
{
"vocabulary": " 資本",
"meaning": "funds; capital"
},
{
"vocabulary": " 品",
"meaning": "article; item; thing; goods; stock; quality"
},
{
"vocabulary": " 身長",
"meaning": "body height; stature"
},
{
"vocabulary": " 進学",
"meaning": "entering a higher-level school (often university)"
},
{
"vocabulary": " 新鮮",
"meaning": "fresh"
},
{
"vocabulary": " 支店",
"meaning": "branch office; branch store"
},
{
"vocabulary": " 使用",
"meaning": "use; application; employment; utilization."
},
{
"vocabulary": " 食品",
"meaning": "food; food products"
},
{
"vocabulary": " 書物",
"meaning": "book; volume"
},
{
"vocabulary": " 書類",
"meaning": "document; official papers"
},
{
"vocabulary": " 書斎",
"meaning": "study; library; den; home office; reading room"
},
{
"vocabulary": " 商売",
"meaning": "trade; business; commerce; transaction; occupation"
},
{
"vocabulary": " 奨学金",
"meaning": "scholarship; stipend; student loan"
},
{
"vocabulary": " 正午",
"meaning": "midday"
},
{
"vocabulary": " 商品",
"meaning": "commodity; article of commerce; goods; stock; merchandise"
},
{
"vocabulary": " 少女",
"meaning": "little girl; maiden; young lady"
},
{
"vocabulary": " 証明",
"meaning": "proof; verification; certification"
},
{
"vocabulary": " 少年",
"meaning": "boy; juvenile; young boy; youth; lad"
},
{
"vocabulary": " 少々",
"meaning": "just a minute; small quantity"
},
{
"vocabulary": " 招待",
"meaning": "invitation"
},
{
"vocabulary": " 週",
"meaning": "week"
},
{
"vocabulary": " 集中",
"meaning": "concentration; focusing; centralization; integration"
},
{
"vocabulary": " 集団",
"meaning": "group; mass"
},
{
"vocabulary": " 収穫",
"meaning": "harvest; crop; fruits (of one's labors)"
},
{
"vocabulary": " 週間",
"meaning": "week"
},
{
"vocabulary": " 週刊",
"meaning": "weekly publication"
},
{
"vocabulary": " 収入",
"meaning": "income; receipts; revenue; salary"
},
{
"vocabulary": " 速度",
"meaning": "speed; velocity; pace; rate"
},
{
"vocabulary": " 少しも",
"meaning": "anything of; not one bit (with negative sentence)"
},
{
"vocabulary": " 大半",
"meaning": "majority; more than half; most; largely; mainly"
},
{
"vocabulary": " 大会",
"meaning": "convention; rally; conference; tournament;"
},
{
"vocabulary": " 大した",
"meaning": "considerable; great; important; significant; a big deal"
},
{
"vocabulary": " 単なる",
"meaning": "mere; simple; sheer"
},
{
"vocabulary": " 多少",
"meaning": "more or less; somewhat; a little; a few; some"
},
{
"vocabulary": " 手品",
"meaning": "magic trick; illusion"
},
{
"vocabulary": " 哲学",
"meaning": "philosophy"
},
{
"vocabulary": " 徹夜",
"meaning": "staying up all night"
},
{
"vocabulary": " 土地",
"meaning": "plot of land; lot; soil"
},
{
"vocabulary": " 都会",
"meaning": "(big) city"
},
{
"vocabulary": " 取れる",
"meaning": "to come off; to be removed; to be obtainable"
},
{
"vocabulary": " 取り上げる",
"meaning": "to pick up"
},
{
"vocabulary": " 図書",
"meaning": "books"
},
{
"vocabulary": " 通学",
"meaning": "commuting to school; school commute"
},
{
"vocabulary": " 受け取る",
"meaning": "to receive; to understand"
},
{
"vocabulary": " 上手い",
"meaning": "skillful; delicious"
},
{
"vocabulary": " 運転",
"meaning": "operation; driving"
},
{
"vocabulary": " 売れる",
"meaning": "to sell (well)"
},
{
"vocabulary": " 分ける",
"meaning": "to divide; to split; to part; to separate"
},
{
"vocabulary": " 悪口",
"meaning": "slander; bad-mouthing; abuse; insult; speaking ill (of)"
},
{
"vocabulary": " 夜明け",
"meaning": "dawn; daybreak"
},
{
"vocabulary": " 余分",
"meaning": "extra; excess; surplus"
},
{
"vocabulary": " 読み",
"meaning": "reading (of a kanji, situation, etc)"
},
{
"vocabulary": " 夜中",
"meaning": "middle of the night; dead of night"
},
{
"vocabulary": " 宜しい",
"meaning": "(respectful) OK; all right"
},
{
"vocabulary": " 唯一",
"meaning": "only; sole; unique"
},
{
"vocabulary": " 輸入",
"meaning": "import; importation; introduction"
},
{
"vocabulary": " 輸出",
"meaning": "export; exportation"
},
{
"vocabulary": " 夕べ",
"meaning": "evening / last night; yesterday evening"
},
{
"vocabulary": " 有利",
"meaning": "advantageous; favorable; profitable"
},
{
"vocabulary": " 全国",
"meaning": "the whole country"
},
{
"vocabulary": " 随分",
"meaning": "very; extremely; surprisingly; considerably; awfully"
}
]

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -216,3 +216,9 @@ async def update_records(key, db, winner, loser):
await db.execute(update_query, loser_rating, loser_wins, loser_losses, loser.id)
else:
await db.execute(create_query, loser_rating, loser_wins, loser_losses, loser.id)
def chunks(list, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(list), n):
yield list[i : i + n]