VOICEVOX C++ Library を動かす Y さんのサンプルコードに対して、PR VOICEVOX/voicevox_core#93 における変更を反映したものです。動かし方は元のサンプルコードと同様です。
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
# frozen_string_literal: true | |
# 書籍「俺々言語にだって型推論が欲しい!」(https://github.com/kakkun61/type-reconstruction-book-sample-code) | |
# の型推論器を Ruby (3.2.2) で実装してみたものです | |
# | |
# irb 上での使い方: | |
# | |
# irb(main):001> require_relative 'oreinfer' | |
# => true | |
# |
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
const std = @import("std"); | |
const Op = enum { plus, minus, times, div }; | |
const StackError = error{ StackOverflow, EmptyStack, DivByZero }; | |
const stackSize: usize = 1024; | |
const Stack = struct { | |
top: usize = 0, | |
seq: [stackSize]i32 = [_]i32{0} ** stackSize, |
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 enum import Enum, auto | |
class TokenKind(Enum): | |
# リテラル | |
BOOLEAN = auto() # true または false | |
INTEGER = auto() # 整数値 | |
FLOAT = auto() # 浮動小数点数値 | |
STRING = auto() # 文字列 | |
NULL = auto() # null |
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 pathlib import Path | |
import sys | |
from typing import List, Set | |
from check_shlib_util import get_dylib_paths, SharedLib | |
base_path: Path = Path.cwd() | |
if len(sys.argv) >= 2: |
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
''' | |
String replacement script for Pythonista | |
MIT License | |
Copyright (c) 2020 SuitCase | |
Permission is hereby granted, free of charge, to any | |
person obtaining a copy of this software and associated | |
documentation files (the "Software"), to deal in the |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SICP Picture Language</title> | |
<meta charset="utf-8"> | |
<script src="sicp_pict.js" async></script> | |
</head> | |
<body> | |
<canvas id="canvas" width="400" height="400"></canvas> | |
</body> |
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 pyto_ui as ui | |
import sys | |
import urllib3 | |
from urllib3.exceptions import InsecureRequestWarning | |
urllib3.disable_warnings(InsecureRequestWarning) | |
http = None |
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
=begin | |
# mruby doesn't have the even? method. | |
class Integer | |
def even? | |
self % 2 == 0 | |
end | |
end | |
=end | |
def trcall(value) |
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
{ | |
"url": "https://url.to.your.webapp", | |
"source": "en", | |
"target": "ja", | |
"langs": [ | |
"en", | |
"ja", | |
"zh-cn", | |
"de" | |
] |
NewerOlder