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
| #include <Servo.h> | |
| const int pwm_a = 3; | |
| const int pwm_b = 11; | |
| const int dir_a = 12; | |
| const int dir_b = 13; | |
| const int sensor_ol = 2; | |
| const int sensor_il = 3; | |
| const int sensor_ir = 4; |
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
| /** | |
| Line follower program for Arduino | |
| @author anddev68 | |
| @version 1.0.0 | |
| **/ | |
| #include <Servo.h> | |
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
| module kadai(x,y1); | |
| input [3:0] x; | |
| output [6:0] y1; | |
| led instance1(.x(x), .y(y1)); | |
| endmodule | |
| module led(x,y); | |
| input [3:0] x; | |
| output [6:0] y; |
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- | |
| import numpy | |
| import math | |
| # numpyの表示設定 | |
| numpy.set_printoptions(precision=2) | |
| file = open('txt.txt') | |
| # |
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
| Player{ | |
| std::list<Point> connection_points; /* 接続点(置ける点) */ | |
| }; | |
| void expand_with_prior(GameState *state,int player_id){ | |
| /* 接点リストにある点から候補を選ぶ */ | |
| std::list<Point>::iterator it; | |
| for(it=state->player[player_id].connection_points.begin(); it!=player[player_id].connection_points | |
| for(y=0; y<width; w++){ | |
| for(x=0; x<width; x++){ |
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
| #include <stdio.h> | |
| extern int PIECESLEN; | |
| extern Piece PIECES[]; | |
| typedef struct{ | |
| int vector[][]; | |
| }Piece; |
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
| // ---Game.h--- | |
| // ゲームボードやゲームに関するメソッド類を保持する | |
| // ==================== | |
| // ピースに関する情報 | |
| // ==================== | |
| typedef struct{ | |
| int turn; // 回転角 | |
| int num; // 番号 | |
| }Piece; |
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
| import numpy | |
| import math | |
| # 配列の宣言 | |
| # tk = numpy.zeros(1000,1000) | |
| setten = numpy.array(1000,2) | |
| youso = numpy.array(1000,4) | |
| # w = numpy.array(4) | |
| ek = numpy.array(4,4) |
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
| /* | |
| CUDA サンプルプログラム1 | |
| http://cudasample.net/sample/1/003.html | |
| タイマーについてはこの記事から | |
| http://tnishinaga.hatenablog.com/entry/2014/08/10/215445 | |
| */ | |
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
| /* | |
| ルンゲクッタ テストプログラム | |
| */ | |
| /* インクルード */ | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <math.h> |