Skip to content

Instantly share code, notes, and snippets.

Avatar
🍣
🍣

Ponto masaponto

🍣
🍣
View GitHub Profile
View simple_perceptron.py
#!/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):
View mlp.hs
import Data.List (transpose)
import System.Random
import Control.Monad (liftM)
type Vector a = [a]
type Matrix a = [Vector a]
-- vector expression
-- innner product
View simple_perceptron.rb
#!/usr/bin/env ruby
require "matrix"
class SimplePerceptron
def initialize(r = 0.5, v = 0)
@r = r
@v = v
@w_v = Vector[]
View kmeans.py
#!/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
View elm.jl
#Pkg.add("RDatasets")
using Base.Test
using RDatasets
type Model
a_vs::Array{Float64, 2}
beta_vs::Array{Float64, 1}
end
View map_sample.html
<!-- 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>
View README.md

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
View mlp.py
#!/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):
View tabulate_sample.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
View graph.py
#!/usr/bin/env python
import numpy as np
from matplotlib import pylab as plt
import pandas as pd
import sys
def main():
You can’t perform that action at this time.