This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export BUILD_PATH=./build-asan | |
rm $BUILD_PATH/lib/gimp/2.0/plug-ins/* | |
afl-fuzz \ | |
-i sample \ | |
-o results \ | |
-D \ | |
-s 123 \ | |
-t 100 \ | |
-- $BUILD_PATH/bin/gimp-console-2.8 --verbose -d -f @@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import re | |
import subprocess | |
from tqdm import tqdm | |
_binary = "./build/bin/tiffinfo" | |
# _base = "./results/default/crashes" | |
# _dump = "./dump/default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (C) https://github.com/praat/praat | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional, Tuple | |
import numpy as np | |
import torch | |
from yin import YIN, localmin, parabolic_interp | |
def viterbi(log_prob: torch.Tensor, log_trans: torch.Tensor, log_init: torch.Tensor) -> torch.Tensor: | |
"""Viterbi algorithm. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search(log_prob: torch.Tensor, mask: torch.Tensor) -> torch.Tensor: | |
"""Monotonic alignment search from Glow-TTS. | |
Args: | |
log_prob: [B, S, T], log-probability. | |
mask: [B, S, T], attention mask. | |
Returns: | |
[B, S, T], alignment. | |
""" | |
bsize, seqlen, timestep = log_prob.shape | |
# [B, S, T] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
class TextNormalizer: | |
"""Normalize text in to fixed graphme set. | |
WARNING: It does not accept digits, please use normalized text in LJ Speech. | |
""" | |
GRAPHEMES = 'abcdefghijklmnopqrstuvwxyz !?,.' | |
REPLACER = { | |
'"\'()-:;[]’“”': '', # punct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import sys | |
class Format(object): | |
hpp = '''\ | |
#ifndef {0} | |
#define {0} | |
{1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#define REQUIRE(method, ...) \ | |
template <typename Cont, typename = void> \ | |
struct require_##method : std::false_type {}; \ | |
template <typename Cont> \ | |
struct require_##method< \ | |
Cont, \ | |
std::void_t<decltype(std::declval<Cont>().method(__VA_ARGS__))>> \ | |
: std::true_type {}; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
template <typename T> | |
class Box { | |
public: | |
Box(size_t size) : ptr(new T[size]), size(size) { | |
// Do Nothing | |
} | |
Box(T* ptr, size_t size) : ptr(ptr), size(size) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <tuple> | |
#include <type_traits> | |
template <typename T, typename U> | |
using comparison_t = decltype(std::declval<T>() == std::declval<U>()); | |
template <typename T, typename U, typename = std::void_t<>> | |
struct is_comparable : std::false_type {}; |
NewerOlder