Skip to content

Instantly share code, notes, and snippets.

@naoa
naoa / word2vec_server.py
Last active August 29, 2015 13:58
word2vec http server program %python word2vec_server.py <model_file_path> <port> cosine example client:curl "127.0.0.1:8000?c=test&n=10" analogy example client:curl "127.0.0.1:8000?pos=king%20woman&neg=man&n=10"
# coding=utf-8
import sys
import socket
import select
from urlparse import urlparse, parse_qs
import word2vec
argvs = sys.argv
port = 8000
@ashigeru
ashigeru / memo.md
Last active December 30, 2020 14:33
Prestoソースコードリーディング#2 メモ

Presto メモ

  • presto 0.60
  • [ QueryResource , TaskResource )

環境

なんかそのまま mvn clean install eclipse:eclipse -DskipTests コマンド叩いても checkstyle で落ちたので:

mvn clean install -DskipTests
mvn eclipse:eclipse -Dcheckstyle.skip
@suvozy
suvozy / Setup.md
Last active December 28, 2022 07:43
Setup AWS EC2 and RDS (php5.5, apache2.4, mysql5.5, phpmyadmin)
@antimon2
antimon2 / answer_q684.py
Created February 12, 2014 14:16
CodeIQ の アルゴリズム問題「ジェムストリング問題」( https://codeiq.jp/ace/yuki_hiroshi/q684 )の解答出力プログラム。提出したのは answer_q684.py 、同じ処理を Ruby でも書いたのが answer_q684.rb 。
# -*- coding: utf-8 -*-
# answer_q684.py
# ===== DEFINITIONS =====
# メモ化再帰のためのキャッシュ
cache = {}
# 与えられた数値のリストから、各文字がその数だけある場合の全パターン総数を計算(メモ化再帰)
def calc_count(num_list):
@voluntas
voluntas / erlang.rst
Last active March 15, 2024 13:15
実践 Erlang/OTP コトハジメ 2014.11

実践 Erlang/OTP コトハジメ 2014.11

更新:2014-11-20
バージョン:0.0.5
作者:@voluntas
URL:http://voluntas.github.io/

概要

@rkmathi
rkmathi / GB37301.md
Last active March 7, 2020 06:41
情報システム特別講義D #GB37301

情報システム特別講義D

  • 1時限目 イントロ - 川島先生(筑波大学)

  • 2時限目 Inside PostgreSQL Kernel - 永安 悟史さん(アップタイム・テクノロジーズ)

  • 3時限目 データストレージの諸々 - 星野 喬さん(サイボウズ・ラボ)

  • 4時限目 並列データベースシステムの概念と原理 - 油井 誠さん(産総研)

@voluntas
voluntas / mqtt.rst
Last active February 16, 2018 00:03
MQTT コトハジメ

MQTT コトハジメ

更新:2014-05-14
バージョン:0.0.12
作者:@voluntas
URL:http://voluntas.github.io/

とても詳しいまとめがありますので、ますはそちらを見ることをオススメします。

@usk81
usk81 / config.properties
Last active June 15, 2017 01:27
僕の記事を見て魔法少女(Presto使い)になってよ ref: http://qiita.com/tienlen/items/3452c34175eb93b1573d
coordinator=true
datasources=jmx
http-server.http.port=8080
presto-metastore.db.type=h2
presto-metastore.db.filename=var/db/MetaStore
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://example.net:8080
import Control.Monad
charToInteger c = toInteger (fromEnum c - fromEnum '0')
cutDown x
| x >= fromIntegral 0 = floor x
| otherwise = ceiling x
-- cards scores
solve :: String -> [Integer] -> [Integer]
@gakuzzzz
gakuzzzz / article.md
Last active October 29, 2019 06:19
「Javaで継続モナド」をScalaに翻訳/Scala Advent Calendar 2013

「Javaで継続モナド」をScalaに翻訳

この記事はScala Advent Calendar 2013の7日目の記事です。

昨日は @shogogg さんのScala + sbt-android + IntelliJ で快適Androidアプリ開発でした。

明日は @takezoux2 さんのScalaのParserCombinator実践入門+です。

継続モナドを調べていたら、@terazzo さんのJavaで継続モナドという記事が非常に判りやすかったんですが、サンプルコードがJavaのボイラープレートの嵐でちょっと読むのが辛い感じだったのでScalaで翻訳してみました、というのがこの記事です。