Skip to content

Instantly share code, notes, and snippets.

import colorsys
import csv
from datetime import datetime
from pathlib import Path
import matplotlib.colors as mcolors
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import markers
from matplotlib.path import Path as pPath
{
"1": {
"id": 1,
"name": "はじまりの朝 天海春香",
"img": "http://m.ip.bn765.com/11006f0a05d58d133f",
"rarity": "HR",
"region": "Vo",
"ap": 3600,
"dp": 3600,
"skillName": "日々前進!",
Google Inc.
Copyright 2018 Google Inc. All rights reserved.
Google Chrome 71.0.3578.80 (Official Build) beta (64-bit) (cohort: Beta)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Windows
JavaScript V8 7.1.302.28
Flash 32.0.0.101 C:\Windows\system32\Macromed\Flash\pepflashplayer64_32_0_0_101.dll
User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36
Command Line "C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe" --flag-switches-begin --disable-accelerated-video-decode --load-media-router-component-extension=0 --disable-smooth-scrolling --flag-switches-end
Google Inc.
Copyright 2018 Google Inc. All rights reserved.
Google Chrome 71.0.3578.80 (Official Build) (64-bit) (cohort: 71_Win_80)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Windows
JavaScript V8 7.1.302.28
Flash 32.0.0.101 C:\Windows\system32\Macromed\Flash\pepflashplayer64_32_0_0_101.dll
User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36
Command Line "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --flag-switches-begin --disable-accelerated-video-decode --load-media-router-component-extension=0 --disable-smooth-scrolling --flag-switches-end
@fireattack
fireattack / vtt_to_srt.py
Last active August 14, 2018 07:56
Py3 requirement: chardet
import argparse
import datetime
import re
from os.path import exists, splitext, join
from os import walk
import chardet
def main():
parser = argparse.ArgumentParser()
@fireattack
fireattack / DumpAZW6_py3.py
Last active April 3, 2024 08:01
Py3 version
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
import sys
import os, getopt, struct
import imghdr
def get_image_type(imgname, imgdata=None):
imgtype = imghdr.what(imgname, imgdata)
<?xml version="1.0"?>
<Chapters>
<EditionEntry>
<ChapterAtom>
<ChapterTimeStart>00:0:00.000000000</ChapterTimeStart>
<ChapterDisplay>
<ChapterString>Opening</ChapterString>
<ChapterLanguage>jpn</ChapterLanguage>
</ChapterDisplay>
</ChapterAtom>
iter = 50000;
gold_result = zeros(1, iter);
gold_odd = 0.1;
initial_dust = 2000;
for method = 1:2
for i = 1:iter
bag = 0;
gold = 0;
filenames = {'samples/teacher/super.wav','samples/teacher/yume_deem.wav','samples/teacher/yume2005_deem.wav'};
%'samples/panic.wav','samples/super.wav', 'samples/yume.wav','samples/yume2005.wav','samples/single.mp3'
%filenames = {'old/good_rg.wav','old/bad_rg.wav'};
method = 'peri'; % peri, welch, fft, fftband
close all
for i = 1:length(filenames)
file = filenames{i};
[wave,Fs]=audioread(file);
x=(wave(:,1)+wave(:,2))/2; %Downmix
@fireattack
fireattack / normalizerms.m
Created July 1, 2017 22:34
Normalize audio signal via target RMS (in dB)
function [ y ] = normalizerms( x, targetdB )
%NORMALIZERMS Summary of this function goes here
% Detailed explanation goes here
%normalize
targetrms=10^(targetdB/20);
myrms=rms(x);
% valueDBFS = 20*log10(abs(myrms));
y=x/(myrms/targetrms);
end