Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
import pandas
import statsmodels.api as sm
import patsy as patsy
import numpy as np
from os import path
import matplotlib.pyplot as plt
# read csv file ======================================================
workdir = path.dirname( path.abspath( __file__ ) )
@threecourse
threecourse / 00_glm.py
Created April 27, 2014 06:46
pythonGLM20140427
# -*- coding: utf-8 -*-
import pandas
import statsmodels.api as sm
import patsy as patsy
import numpy as np
from os import path
import matplotlib.pyplot as plt
# read csv file ======================================================
workdir = path.dirname( path.abspath( __file__ ) )
set DM2="SG - Domain Member2"
set CIDR="<ローカルPCのIPアドレス>"
:: ==============================================================================
:: Creates Security groups Prior to Adding Rules
:: ==============================================================================
call ec2addgrp %DM2% -d "Active Directory Domain Member2"
:: ==============================================================================
@threecourse
threecourse / Roslyn.cs
Created October 5, 2014 11:22
analyze codes with roslyn
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
namespace MyRoslyn.CSharp
@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コードと同様
@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 / 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)
using System;
using System.Collections.Generic;
using System.Xml;
namespace XMLSettingTest
{
class Program
{
static void Main(string[] args)
{
@threecourse
threecourse / Calc.g
Last active December 20, 2015 00:49
AddinDSL
grammar Calc;
options{
language=CSharp3;
output=AST;
ASTLabelType=CommonTree;
}
@header {
using System;
# 適切なカレントディレクトリを設定した上で、このスクリプトを実行下さい。
# .NET Frameworkのカレントディレクトリをセット
[IO.Directory]::SetCurrentDirectory((Get-Location).ProviderPath)
# ユーティリティ関数の読み込み
. .\textmanip.ps1
# テスト用フォルダの作成
TestFileCreate "test sample1\1.txt" 1000