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
#[test] | |
fn test_eat_primary() { | |
assert_eq!(eat_primary("3+5"), (3, "+5")); | |
assert_eq!(eat_primary("8-5*4+3"), (8, "-5*4+3")); | |
} | |
// 先頭から数字を一個食って、「食った数字と食い残した文字列」を返す | |
fn eat_primary(s: &str) -> (i32, &str) { | |
if s.starts_with('0') { return (0, &s[1..]); } | |
if s.starts_with('1') { return (1, &s[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
# I tested this in a cleanly installed Ubuntu on WSL2 | |
sudo apt-get upgrade | |
sudo apt-get update | |
sudo apt-get install build-essential | |
sudo apt-get install libncurses5-dev libncursesw5-dev | |
# Edinburgh Speech Tools 2.5 | |
# The folder name MUST be speech_tools/ | |
curl http://festvox.org/packed/festival/2.5/speech_tools-2.5.0-release.tar.gz -o speech_tools.tar.gz | |
tar -xvf speech_tools.tar.gz |
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
(** | |
以下、日本標準時 (UTC+9:00) においては西暦2020年12月30日に行われた会話である | |
hsjoihs 16:29 | |
おっ。とりあえず私はOpeLaの構文論を形式化しようとしています | |
uchan_nos 16:29 | |
そんなことを!?w |
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
java.lang.NullPointerException | |
at javafx.base/javafx.collections.transformation.SortedList$Element.access$200(SortedList.java:277) | |
at javafx.base/javafx.collections.transformation.SortedList$ElementComparator.compare(SortedList.java:299) | |
at javafx.base/javafx.collections.transformation.SortedList$ElementComparator.compare(SortedList.java:288) | |
at javafx.base/com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:260) | |
at javafx.base/com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:272) | |
at javafx.base/com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:271) | |
at javafx.base/com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:271) | |
at javafx.base/com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:271) | |
at javafx.base/com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:272) |
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
CommonIO.hs:20: putStrLn' English $ NormalMessage $ "\nparsing " ++ filepath ++ ":\n" | |
Execute.hs:64: then runtimeError $ "f5 register was not preserved after the call. It should be in " ++ show initialF5 ++ " but is actually in " ++ show a | |
Execute.hs:276: Nothing -> runtimeError $ "Undefined label `" ++ unLabel label ++ "`" | |
Execute.hs:276: Nothing -> runtimeError $ "Undefined label `" ++ unLabel label ++ "`" | |
Execute.hs:309: | otherwise -> runtimeError $ "nx has an invalid address " ++ show currentNX | |
Linker.hs:23: Left _ -> Left $ LinkError "multiple files lack `kue`" | |
Linker.hs:25: Nothing -> Left $ LinkError "all files have `kue`" | |
Linker.hs:37: "conflict: different files export the same label(s) `" ++ intercalate ", " (map unLabel labels) ++ "“" | |
Linker.hs:45-46: "conflict: cannot import label(s) `" ++ intercalate ", " (map unLabel xokConflicts) ++ "` that is already defined in the file" | |
Linker.hs:50-51: "cannot export label(s) `" ++ intercalate ", " (map unLabel kueWithoutEvidence) ++ "` that |
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
~stususn =0.809263; | |
( | |
SynthDef("kin2lia1", { | |
arg note=0, amp=1; | |
var a = (note+61.478).midicps; | |
var duration = 2.5*~stususn; | |
var factor = 0.8; | |
var divisor = 1.0+factor+(factor*factor)+(factor*factor*factor)+(factor*factor*factor*factor); | |
var snd = LPF.ar( |
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
function counting(arr){ | |
var obj={}; | |
for(var i=0;i<arr.length;i++){ | |
obj[arr[i][0]] = obj[arr[i][0]] ? (obj[arr[i][0]]+arr[i][1]) : arr[i][1]; | |
} | |
return obj; | |
} | |
var dat2 = dat.map(a=>a[1]).map(a => [].concat.apply([],a).map(b=>[b,1/a.length])) | |
var dat3 = [].concat.apply([],dat2); | |
console.log(JSON.stringify(counting(dat3))); |
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
["-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'c","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-'d","-' |
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
''dijyk'' | |
'c | |
'd | |
'i | |
's | |
-e- | |
-sti | |
1-akrs | |
6fta | |
[baog] |
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
"-adlis", | |
"-afa", | |
"-afi'a", | |
"-afis", | |
"-ain", | |
"-al", | |
"-an", | |
"-anfy", | |
"-axm", | |
"-back", |
NewerOlder