Skip to content

Instantly share code, notes, and snippets.

View kaecy's full-sized avatar
🌄
I'm awake.

Eris kaecy

🌄
I'm awake.
  • Freelancer
  • England
View GitHub Profile
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

Words / Kotoba

Japanese words in Hiragana.

General

English Japanese
Good Morning ohayou おはよう
Good Bye sayounara さようなら
Hello konichiwa こんいちわ
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)
@kaecy
kaecy / readme.md
Last active June 9, 2023 13:22
Uses ffmpeg and ffprobe to extract all subtitle files, make sure you have them installed. Experimental.

Use

> subs.py "Revolution Today.mkv"

Subs
SUBRIP  ENG Revolution Today
SUBRIP  ENG Revolution Today
SUBRIP  CHI Revolution Today
SUBRIP  CHI Revolution Today
SUBRIP  DAN Revolution Today
SUBRIP  GER Revolution Today

Katakana

  a i u e o n
 
k
s
t
n
h

Audio Track Delay

Needs to be used after the input file.

Option:
  -itsoffset 1.3 (delay by 1.3 seconds)

Scale Video

Option:
import curses, birc
# Primitive input method for curses.
def read(i):
buffer = ""
i.erase()
i.addstr("> ")
while True:
key = i.getch()
@kaecy
kaecy / birc.py
Last active December 12, 2021 13:03
IRC library in python in development.
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):
@kaecy
kaecy / getMentionEntities.py
Last active December 22, 2021 19:47
Py/Telegram extension.
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