Skip to content

Instantly share code, notes, and snippets.

View FooQoo's full-sized avatar
🐠

Satoshi Fukuyama FooQoo

🐠
View GitHub Profile
{
"hoge": "foo"
}
private static class MessageDataSerializer extends JsonDeserializer<MessageData> {
@Override
public MessageData deserialize(final JsonParser p,
final DeserializationContext ctxt)
throws ValidationException {
try {
final var treeNodeText = ((TextNode) p.getCodec().readTree(p)).asText();
final var decoded = decodeBase64Data(treeNodeText);
return OBJECT_MAPPER.readValue(decoded, MessageData.class);
import java.net.URI;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import org.springframework.lang.NonNull;
import org.springframework.web.util.UriComponentsBuilder;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.api.client.auth.oauth.OAuthHmacSigner;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import java.time.Instant;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;
from collections import Counter
from itertools import chain, combinations
from tqdm import tqdm
class BitermConverter:
def __init__(self, include_docs=False, min_df=1):
self.biterms = Counter()
self.include_docs = include_docs
self.min_df = min_df
@FooQoo
FooQoo / check_intel_mkl.py
Created December 6, 2018 07:36
installしたnumpyとscipyがintel mklに対応しているか確認するスクリプト
import numpy as np
import scipy.linalg.blas as slb
import time
M = 10000
N = 6000
k_list = [64, 128, 256, 512, 1024, 2048, 4096, 8192]
np.show_config()
@FooQoo
FooQoo / pretweet.py
Last active December 7, 2018 01:13
ツイート中のストップワード取り除きを単語の分ち書きにするpythonスクリプト
'''
requirement : janome, pandas
'''
import re
from janome.tokenizer import Tokenizer
import unicodedata
from html import unescape
import pandas as pd

2010

2 Online Variational Bayes for latent Dirichlet allocation

tips

  • betaは共通である仮定
  • 二乗誤差を最適化する手法による拡張

2.2 Online variational inference for LDA

batchによる変分ベイズ法のアルゴリズムは一定のメモリー空間を必要とし,CGBより高速であることがわかっている.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@FooQoo
FooQoo / sample.md
Last active April 2, 2018 06:33
Sample

Hello World