Skip to content

Instantly share code, notes, and snippets.

View anddev68's full-sized avatar

anddev68 anddev68

View GitHub Profile
@anddev68
anddev68 / runner_b
Last active August 29, 2015 14:08
CODE RUNNER 予選B
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Timers;
namespace CodeB
@anddev68
anddev68 / codefes2015_B_A
Last active October 25, 2015 14:20
CODEFES2015 予選B 問題A
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
StringBuilder sb = new StringBuilder();
for(int i=0; i<str.length(); i++){
char c = str.charAt(i);
boolean flag = false;
@anddev68
anddev68 / Python
Last active January 27, 2016 03:36
extractbb専用サーバ
from bottle import route,run,template,request,response
import commands
# route decoder
# receiver
@route('/send',method='POST')
def send():
# file save
@anddev68
anddev68 / gist:8e8383c41f3c60f8b43a
Created March 15, 2016 14:07
ルンゲクッタgpu
/*
ルンゲクッタ テストプログラム
*/
/* インクルード */
#include <stdio.h>
#include <string.h>
#include <math.h>
/*
CUDA サンプルプログラム1
http://cudasample.net/sample/1/003.html
タイマーについてはこの記事から
http://tnishinaga.hatenablog.com/entry/2014/08/10/215445
*/
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)
// ---Game.h---
// ゲームボードやゲームに関するメソッド類を保持する
// ====================
// ピースに関する情報
// ====================
typedef struct{
int turn; // 回転角
int num; // 番号
}Piece;
#include <stdio.h>
extern int PIECESLEN;
extern Piece PIECES[];
typedef struct{
int vector[][];
}Piece;
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++){
# -coding:utf-8-
import numpy
import math
# numpyの表示設定
numpy.set_printoptions(precision=2)
file = open('txt.txt')
#