This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
""" | |
ユースケース: | |
夫婦が離婚した場合、子の養育費は主に二人の収入によって決定する。 | |
養育費を計算したいが、互いに自分の年収を相手に知らせたくない。 | |
このとき、秘密計算によって互いの年収を知ることなく養育費を計算する。 | |
""" | |
from flask import Flask, request, jsonify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.stats import norm | |
from __future__ import absolute_import | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
from __future__ import division |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import matplotlib.cm as cm | |
class HopfieldNetwork(object): | |
def __init__(self, nonmonotone=False): | |
self.__nonmonotone = nonmonotone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# coding: utf-8 | |
# USAGE: ruby parse_enex.rb XX.enex > XX.csv | |
require 'nokogiri' | |
require 'date' | |
require 'ostruct' | |
class Note < OpenStruct; end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Libraries | |
- SlackApp: M3W5Ut3Q39AaIwLquryEPMwV62A3znfOO | |
- Underscore: MGwgKN2Th03tJ5OdmlzB8KPxhMjh3Sh48 | |
- Moment: MHMchiX6c1bwSqGM1PZiW_PxhMjh3Sh48 | |
Usage | |
- Create sheet named "Channel List", then paste this script on script editor. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
# 1. CSV export | |
# https://xxxxx.slack.com/services/export | |
# 2. Confirm target user ID | |
# curl https://slack.com/api/users.list?token=YOUR_SLACK_TOKEN | |
user = "XXXXXX" | |
export_dir = "export_csv/chanel_name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import os | |
from logging import getLogger | |
import numpy as np | |
import copy | |
logger = getLogger(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
■ Promiscuous: A robust service-oriented architecture framework | |
Nicolas Viennot & Kareem Kouddous | |
小さなチームで、比較的巨大なアプリを数ヶ月で作成したことのある人達にとって、 | |
乱雑なコードや遅いテスト、新規開発者の習得時間の長さなどのせいで、 | |
RailsやSinatraを使ったときの幸福感といったものは、すぐに失われてしまうものだ。 | |
サービスオブジェクトを抽出したり、MVCをMOVEなどにしたところで、コードが複雑になり、 | |
シンプルにし損ねるだけだし、Javascript MVCは、多くのviewロジックを抽出するのに役立つものの、 | |
巨大なバックエンドサーバはそのまま残ってしまうだろう。 | |
そこで我々は、巨大なアプリを、メンテがしやすい、多くの小さなアプリに分割する方法を提案する。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>JSONP TEST</title> | |
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> | |
</head> | |
<body> |