Japanese words in Hiragana.
English | Japanese |
---|---|
Good Morning | ohayou おはよう |
Good Bye | sayounara さようなら |
Hello | konichiwa こんいちわ |
KN = ["", chr(19968), chr(20108), chr(19977), chr(22235), chr(20116), chr(20845), chr(19971), | |
chr(20843), chr(20061), chr(21313)] | |
TEN = chr(21313) | |
HUNDRED = chr(30334) | |
THOUSAND = chr(21315) | |
def split3(array): | |
groups = [] | |
odd = len(array) % 3 |
import requests | |
def basicInfo(pokemon): | |
res = requests.get("https://pokeapi.co/api/v2/pokemon/" + pokemon) | |
json = res.json() | |
name = json['name'] | |
id = json['id'] | |
moves = [] |
def listgen(n, obj=0): | |
return [obj for _ in range(n)] | |
def makeLineToCells(line, rowSize=0): | |
line = line.strip() | |
if line.startswith("|"): line = line[1:] | |
if line.endswith("|"): line = line[:-1] | |
cells = line.split("|") | |
cellsLen = len(cells) | |
import curses, birc | |
# Primitive input method for curses. | |
def read(i): | |
buffer = "" | |
i.erase() | |
i.addstr("> ") | |
while True: | |
key = i.getch() |
from socket import socket | |
from threading import Thread | |
from message import MessageParser, MessageBuffer | |
class Socket(socket): | |
def __init__(self, address, port): | |
socket.__init__(self) | |
self.connect((address, port)) | |
class IRCMessageLoop(Thread): |
from telethon.tl.types import MessageEntityMention | |
def getMentionEntities(message): | |
mentions = [] | |
for entity in message.entities: | |
if type(entity) is MessageEntityMention: | |
offset = entity.offset | |
length = entity.length | |
mentions.append(message.message[offset:offset + length]) | |
return mentions |