This file contains 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
export default class RestClient { | |
axios: any; | |
constructor(baseUrl: string) { | |
const axiosBase = require("axios"); | |
const csrfToken = (<HTMLMetaElement>document.querySelector("meta[name=csrf-token]")).content; | |
this.axios = axiosBase.create({ | |
baseURL: baseUrl, | |
timeout: 1000, |
This file contains 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
from PIL import Image | |
import numpy as np | |
import os | |
import struct | |
# (このファイルのpath)/imagesに画像化したMNISTを保存する | |
def load_mnist(path, kind='train'): | |
"""MNISTデータをpathからロード""" |
This file contains 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
from graphviz import * | |
def export_graphviz_tree(tree, filename='tree'): | |
"""graphvizで木構造の画像を生成する | |
Treeの属性 | |
------------ | |
root: Node | |
treeの根ノード | |
This file contains 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
" dein Scripts----------------------------- | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
" Required: | |
syntax enable | |
" Required: | |
set runtimepath+=/Users/shintanitoshio/.vim/bundle/repos/github.com/Shougo/dein.vim |
This file contains 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 <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
#include <time.h> | |
#define MAXS 2048 | |
#define TRIAL_NUM 1001 //試行回数(シャッフル回数) | |
// TODO: テストを行うコードの記述(完了) |
This file contains 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
''' | |
Python 2.7.11 | |
pip install lxml | |
pip install cssselect | |
''' | |
import sys | |
import lxml.html | |
param = sys.argv |
This file contains 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
// | |
// main.c | |
// xor.c | |
// | |
// Created by Shintani Teppei on 2015/10/10. | |
// Copyright © 2015年 Teppei Shintani. All rights reserved. | |
// | |
// TODO: 処理の共通化 | |
// TODO: 変数aのいい名前を考える |
This file contains 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
var POST_URL = "https://hooks.slack.com/services/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"; | |
var POST_CHANNEL = "#free_lunch"; | |
var SHEET_ID = "1BzidS47agZZH3hTTr1H1EaPBUfJDyQG8guCJ0ccTKpI"; | |
var ss = SpreadsheetApp.openById(SHEET_ID); | |
var users = ss.getSheetByName("users"); | |
var histories = ss.getSheetByName("histories"); | |
var types = [ | |
'co-ba', |