Skip to content

Instantly share code, notes, and snippets.

View anddev68's full-sized avatar

anddev68 anddev68

View GitHub Profile
#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;
/**
Line follower program for Arduino
@author anddev68
@version 1.0.0
**/
#include <Servo.h>
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;
# -coding:utf-8-
import numpy
import math
# numpyの表示設定
numpy.set_printoptions(precision=2)
file = open('txt.txt')
#
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++){
#include <stdio.h>
extern int PIECESLEN;
extern Piece PIECES[];
typedef struct{
int vector[][];
}Piece;
// ---Game.h---
// ゲームボードやゲームに関するメソッド類を保持する
// ====================
// ピースに関する情報
// ====================
typedef struct{
int turn; // 回転角
int num; // 番号
}Piece;
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)
/*
CUDA サンプルプログラム1
http://cudasample.net/sample/1/003.html
タイマーについてはこの記事から
http://tnishinaga.hatenablog.com/entry/2014/08/10/215445
*/
@anddev68
anddev68 / gist:8e8383c41f3c60f8b43a
Created March 15, 2016 14:07
ルンゲクッタgpu
/*
ルンゲクッタ テストプログラム
*/
/* インクルード */
#include <stdio.h>
#include <string.h>
#include <math.h>