Skip to content

Instantly share code, notes, and snippets.

View toshimasa-nanaki's full-sized avatar

Syunken Nanaki toshimasa-nanaki

  • 日本(東京)
View GitHub Profile
@toshimasa-nanaki
toshimasa-nanaki / api.py
Created November 19, 2017 12:27
API を呼び出し(Python3 Ver)
from flask import Flask, render_template, request
import xmltodict
import urllib.request
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html', title='API TEST')
@toshimasa-nanaki
toshimasa-nanaki / index.html
Created November 21, 2017 12:55
Python3 + Flaskで簡易RSSリーダー
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$('#submit').on("click", function() {
@toshimasa-nanaki
toshimasa-nanaki / index.html
Last active November 24, 2017 00:53
AIを作りたい1
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$('#submit').on("click", function() {
@toshimasa-nanaki
toshimasa-nanaki / Vagrantfile
Last active November 29, 2017 15:04
Vagrantfile サンプル
# coding: utf-8
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |v|
v.name = "centos7_test"
v.customize ["modifyvm", :id, "--memory", 2048]
end
config.vm.box = "centos/7"
config.vm.hostname = "vagrant-test"
@toshimasa-nanaki
toshimasa-nanaki / init.sh
Created November 28, 2017 11:00
Vagrant init.sh
#!/bin/sh
#パッケージを更新
sudo yum -y update
#wgetインストール
sudo yum -y install wget
#unzipインストール
sudo yum -y install unzip
@toshimasa-nanaki
toshimasa-nanaki / index.html
Created December 3, 2017 09:30
AIを作りたい2
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$('#submit').on("click", function() {
@toshimasa-nanaki
toshimasa-nanaki / es5.js
Last active December 3, 2017 14:02
Reactのes5からes6変換
var Index = React.createClass({
getInitialState: function() {
return {data: "test"};
},
testHandler: function(event) {
console.log("test");
}
render: function(){
return (
<input type="button" value={this.state.data} onClick = {this.testHandler} />
@toshimasa-nanaki
toshimasa-nanaki / index.html
Last active April 2, 2020 13:51
PDF.jsサンプル Pythonサーバー 
<!DOCTYPE html>
<html>
<head>
<title>{{ title }}</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="../static/libs/pdf.js"></script>
</head>
<body>
@toshimasa-nanaki
toshimasa-nanaki / Vagrantfile
Created December 9, 2017 09:20
Vagrantfileとinit.sh(Redmine動作確認用)
# coding: utf-8
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |v|
v.name = "centos7-redmine"
v.customize ["modifyvm", :id, "--memory", 2048]
end
config.vm.box = "centos/7"
config.vm.hostname = "centos7-redmine"
@toshimasa-nanaki
toshimasa-nanaki / AggregateSample.java
Created December 10, 2017 12:39
Java8 streamサンプル
import java.util.ArrayList;
import java.util.Scanner;
public class AggregateSample {
public static final String LINE_SEPARATOR_PATTERN = "\\r\\n|[\\n\\r\\u2028\\u2029\\u0085]";
public static void main(String[] args) {
ArrayList<Integer> dataList = new ArrayList<>();
Scanner scan = new Scanner(System.in);