Skip to content

Instantly share code, notes, and snippets.

View masaponto's full-sized avatar
🍣
🍣

Ponto masaponto

🍣
🍣
View GitHub Profile
#!/usr/bin/env python
import requests
import ffmpeg
import subprocess
class DTALK:
"""
This scripts depends on 'aplay' command
(define (queens board-size)
(define (queen-cols k)
(if (= k 0)
(list empty-board)
(filter
(lambda (positions) (safe? k positions))
(flatmap
(lambda (rest-of-queens)
(map (lambda (new-row)
(adjoin-position
@masaponto
masaponto / Dockerfile
Created October 28, 2017 11:40
修論用
FROM debian:jessie
MAINTAINER masaponto <masaponto@gmail.com>
RUN apt-get update -y && \
apt-get install -y \
texlive \
texlive-fonts-extra \
texlive-bibtex-extra \
texlive-lang-japanese \
@masaponto
masaponto / README.md
Last active November 8, 2017 01:47
某室のシフトをGoogleカレンダーに登録します。

Setting

$ pip3 install --upgrade google-api-python-client
$ pip3 install --upgrade git+https://github.com/masaponto/ofls-shift
$ echo 'export OFLS_KEY=<your-key-for-spread-sheet-goes-here>' >> ~/.bash_profile
$ echo 'export OFLS_GID=' &gt;&gt; ~/.bash_profile
@masaponto
masaponto / app.py
Last active April 22, 2017 05:47
MESHボタン押すとラズパイが天気しゃべるよ (http://masaponto.hatenablog.com/entry/2017/04/21/234752)
from bottledaemon import daemon_run
from bottle import route, run, get
from talk_weather import talk_weather, talk_datetime
@get('/test')
def test():
return 'Hello Raspbery Pi!'
#!/usr/bin/env python
from elm import ELM
from sklearn.cluster import KMeans
import numpy as np
class ClusteringBasedELM(ELM):
"""
This script is clustering based extreme learning machine(CBELM),
#!/usr/bin/env python
import copy
import numpy as np
from sklearn.base import BaseEstimator, ClassifierMixin
class Bagging(BaseEstimator, ClassifierMixin):
def __init__(self, estimator, n_ensemble, max_samples=1.0):
cmake_minimum_required (VERSION 3.7)
project (matrix_calc_ndk)
add_executable(matrix_calc_ndk matrix_calc_ndk.cpp)
@masaponto
masaponto / github-pandoc.css
Created February 4, 2017 11:02 — forked from dashed/github-pandoc.css
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@masaponto
masaponto / numpy.hpp
Created February 1, 2017 11:15 — forked from rezoo/numpy.hpp
Reimplementation of libnpy. This library is header-only and compatible with any environment including MSVC.
/*
* Copyright (c) 2012 Masaki Saito
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*