This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| mkdfa.py | |
| Implementation of mkdfa.pl for python 3 | |
| Copyright (c) 2019 Sunao Hara. | |
| This script is released under the MIT license. | |
| https://opensource.org/licenses/mit-license.php | |
| """ |
This file contains hidden or 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
| % Example of Graph A | |
| A = [0 1 1 0 0; | |
| 1 0 0 0 0; | |
| 1 0 0 1 1; | |
| 0 0 1 0 0; | |
| 0 0 1 0 0 | |
| ]; | |
| initial_node = 1; | |
| target_node = 5; |
This file contains hidden or 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 maze_st = maze_convert(maze) | |
| % MAZE_CONVERT Convert from a map to Adjacency matrix | |
| % maze_st = MAZE_CONVERT(maze) | |
| % ARGS | |
| % maze Maze matrix | |
| % RETURN | |
| % maze_st.A Adjacency Matrix | |
| % maze_st.initial_node Initial node | |
| % maze_st.target_node Target node | |
| % maze_st.xy xy for gplot |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| Example of Dialog Management using Finite State Transducer (FST) | |
| """ | |
| import csv | |
| from collections import deque | |
| ## | |
| ## Load FST file |
This file contains hidden or 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
| # | |
| # 演習室でのレポート作成用 Makefile 例 | |
| # | |
| # by Sunao Hara 2016-10-31 | |
| # | |
| ## | |
| ## 作りたいPDFファイル名に変更する | |
| ## PDF は同名のTeXファイルから作成される | |
| ## |
This file contains hidden or 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
| /** RUN_PDFCROP.JS | |
| * Find pdf files in "img" directory, and convert them into cropped pdf files. | |
| * The job is skipped if the source file is old than the cropped file. | |
| * | |
| * Example: | |
| * img/inc1.pdf -> img/inc1-crop.pdf (convert) | |
| * img/inc1-crop.pdf -> img/inc1-crop.pdf (skip) | |
| * | |
| * Author: Sunao Hara (sunao.hara@gmail.com) | |
| * Last Modified: 2016-03-16 13:32:00. |
This file contains hidden or 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
| #!env perl | |
| =encoding UTF-8 | |
| =head1 NAME | |
| cb_download_attachment.pl - サイボウズLiveの添付ファイルを取得する | |
| =head1 SYNOPSIS | |
| # 1. Prepare download directory | |
| $ mkdir download |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Sample of job queing | |
| # | |
| # Copyright (C) 2014 Sunao HARA (hara@okayama-u.ac.jp) | |
| # Copyright (C) 2014 Abe laboratory, Okayama university | |
| # Last Modified: 2014/07/11 11:08:14. | |
| # | |
| function queue_job() { |
This file contains hidden or 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
| --- chasen-2.3.3/lib/dartsdic.cpp.org 2003-07-31 01:06:57.000000000 +0900 | |
| +++ chasen-2.3.3/lib/dartsdic.cpp 2012-08-24 19:24:13.000000000 +0900 | |
| @@ -68,7 +68,7 @@ | |
| da = (darts_t*)cha_malloc(sizeof(darts_t)); | |
| da->da_mmap = cha_mmap_file(daname); | |
| - darts->setArray(cha_mmap_map(da->da_mmap)); | |
| + darts->set_array(cha_mmap_map(da->da_mmap)); | |
| da->da = darts; | |
| da->lex_mmap = cha_mmap_file(lexname); |
This file contains hidden or 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
| *** predict.c 2011-02-05 21:21:49.000000000 +0900 | |
| --- predict2.c 2012-03-19 19:08:41.905910501 +0900 | |
| *************** | |
| *** 138,145 **** | |
| } | |
| else | |
| { | |
| ! predict_label = predict(model_,x); | |
| ! fprintf(output,"%d\n",predict_label); | |
| } |