Skip to content

Instantly share code, notes, and snippets.

@threecourse
threecourse / dockerfile-kag0
Created December 18, 2019 07:06
GUIを使うためのdocker設定
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
# reference: https://hub.docker.com/r/nejumi/tools_for_kaggle/dockerfile
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:git-core/ppa && \
apt-get update && \
apt-get install -y git build-essential cmake && \
git --version
@threecourse
threecourse / integrate.py
Created March 15, 2019 15:18
分かれたファイルを一つに統合するスクリプト(C#コード用)
import numpy as np
import pandas as pd
if __name__ == "__main__":
import glob
files = glob.glob("src/*")
print(files)
ls_using = []
ls_main = []
@threecourse
threecourse / init.sh
Last active October 29, 2017 12:27
ubuntu environment setting
#!/bin/bash
# utils
cd ~/
mkdir proj lib
sudo apt-get update
sudo apt-get install -y git build-essential libatlas-base-dev
sudo apt-get install -y python3-dev
git config --global credential.helper 'cache --timeout=3600'
git config --global user.email "xxxx@xxxx.com"
from util_log import Logger
logger = Logger()
from collections import OrderedDict
logger.info("run started")
d = OrderedDict([('run_name', "xgb_1"), ('fold', 0), ('logloss', 0.66)])
logger.result_ltsv_time(d)
@threecourse
threecourse / dqn_keras.py
Created February 1, 2017 14:03
dqn_keras_cartpole
# coding:utf-8
# args
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--test", action="store_true")
parser.add_argument("--prms", type=int, action="store", default=0)
args = parser.parse_args()
TEST = args.test
@threecourse
threecourse / alexnet_inference.py
Last active May 11, 2016 14:24 — forked from nervetumer/alexnet_inference.py
example of running inference on an image using neon
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@threecourse
threecourse / _spot_request.md
Last active March 2, 2016 17:17
request spot instance by python

spot_request.py

  • request spot instance
  • wait for running
  • print IP address

aws_run.py

  • rsync
  • nohup run command
@threecourse
threecourse / firstpattern4_4.py
Created April 4, 2015 04:21
firstpattern recognition R example 4.4
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import datasets
import urllib
# ピマインディアンデータセット ---------------------
# http://archive.ics.uci.edu/ml/machine-learning-databases/pima-indians-diabetes/pima-indians-diabetes.names
# URL for the Pima Indians Diabetes dataset (UCI Machine Learning Repository)
@threecourse
threecourse / ExcelRead.cs
Created March 8, 2015 12:55
ClosedXMLTest
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClosedXML.Excel;
namespace ClosedXMLTest
{
class ExcelRead
{
@threecourse
threecourse / Clustering.cs
Created December 28, 2014 14:24
Clustering
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using C5; // http://www.itu.dk/research/c5/
/*
* クラスタリングを行うプログラム
* ロジックは以下記事内のRコードと同様