Skip to content

Instantly share code, notes, and snippets.

@dauuricus
dauuricus / spaceinvaders_copy.py
Created December 12, 2019 18:54
インベーダーゲーム
# Created by Lee Robinson
# インベーダーゲーム
from pygame import *
import sys
from os.path import abspath, dirname
from random import choice
# ファイルへのパス
# Created by Lee Robinson
# インベーダーゲーム
from pygame import *
import sys
from os.path import abspath, dirname
from random import choice
# ファイルへのパス
import pygame, sys
from pygame.locals import *
pygame.init()
DISPLAYSURF = pygame.display.set_mode((400,300))
pygame.display.set_caption('Hello world')
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
@dauuricus
dauuricus / vim-SpaceInvaders.py
Last active January 10, 2021 04:38
インベーダーゲーム
#!/usr/bin/env python
# Space Invaders
# Created by Lee Robinson
#
from pygame import *
import sys
from os.path import abspath, dirname
from random import choice
@dauuricus
dauuricus / How_to_Flash_the_Eachine_E011_with_an_Acro_Firmware.srt
Last active February 3, 2020 08:31
How to Flash the Eachine E011 with an Acro Firmware japanese subtitle
1
00:00:00,510 --> 00:00:05,890
私は最近、Eachine
E011をレビューで言及した代替ファームウェアでフラッシュしました。
2
00:00:05,890 --> 00:00:10,020
主な機能は、アクロモードにアクセスできることです。
3
@dauuricus
dauuricus / .vimrc
Created December 25, 2020 05:31
DroidVim
" DroidVim default settings
" You can change Vim settings by editing this file.
" You can use a plugin or color scheme by copying the files to the user runtime directory ($HOME/.vim).
" See "Long press menu" > "Help" > "Vimfiles".
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
scriptencoding utf-8

Click here for the article that I used as a reference. The reference code is almost the same.

Install the python package googletrans with google colab and split from English txt to English and Japanese txt (and others).

about googletrans

Subtitle files (.srt and .sbv) etc. to google translate and see the translated one, the time code part and counter index are randomly changed to kanji, and the colon (:) is full-width.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dauuricus
dauuricus / json_to_srt.py
Last active January 2, 2022 15:46
deepspeech 0.9.3 json to subrip .srt for googlecolab
import json
import datetime
from google.colab import files
import copy
import sys
#sys.setrecursionlimit(30000)
uploaded = files.upload()
#upfilename = 'json.txt'
#!/usr/bin/env python3
from vosk import Model, KaldiRecognizer, SetLogLevel
import sys
import os
import wave
import json
from googletrans import Translator
import h2.connection
import h2.config