Skip to content

Instantly share code, notes, and snippets.

View masaponto's full-sized avatar
🍣
🍣

Ponto masaponto

🍣
🍣
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import os.path
class SimplePerceptron:
def __init__(self, r = 0.5, v = 0):
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import random
class MLP:
def __init__(self, mid_num, out_num, epochs, r = 0.5, a = 1):
import Data.List (transpose)
import System.Random
import Control.Monad (liftM)
type Vector a = [a]
type Matrix a = [Vector a]
-- vector expression
-- innner product
#!/usr/bin/env ruby
require "matrix"
class SimplePerceptron
def initialize(r = 0.5, v = 0)
@r = r
@v = v
@w_v = Vector[]
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from sklearn import preprocessing
from sklearn.base import BaseEstimator
from sklearn.datasets import fetch_mldata
from sklearn import cross_validation
from sklearn.datasets import load_svmlight_file
@masaponto
masaponto / elm.jl
Last active October 18, 2015 10:15
#Pkg.add("RDatasets")
using Base.Test
using RDatasets
type Model
a_vs::Array{Float64, 2}
beta_vs::Array{Float64, 1}
end
<!-- reference http://www.hanemaru.com/itemcolumn/11yolp003.html -->
<!DOCTYPE html>
<html>
<body>
<div id="map" style="width:400px; height:300px"></div>
<script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" charset="utf-8" src="http://js.api.olp.yahooapis.jp/OpenLocalPlatform/V1/jsapi?appid=[your-id-goes-here]"></script>

systemdによる定期実行

$HOME/.config/systemd/user/ofls-bot.serviceに以下を書く

[Unit]
Description=ofls-bot-service

[Service]
Type=simple
ExecStart=/home/s1200107/.pyenv/shims/python /home/s1200107/Dropbox/Works/ofls-bot/ofls_bot.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from tabulate import tabulate
from sklearn.preprocessing import normalize
from sklearn.datasets import fetch_mldata
from sklearn.model_selection import cross_val_score, KFold
from elm import ELM
#!/usr/bin/env python
import numpy as np
from matplotlib import pylab as plt
import pandas as pd
import sys
def main():