This file contains hidden or 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 lang="ko"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>말빛 사전 카드 30개 — 더나일</title> | |
| <style> | |
| * { box-sizing: border-box; margin: 0; padding: 0; } | |
| body { font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif; background: #fdf8f3; color: #333; padding: 24px 16px; } | |
| h1 { text-align: center; font-size: 28px; color: #2d6a4f; margin-bottom: 8px; } |
This file contains hidden or 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
| def chunk(msg, n): | |
| words = msg.split(" ") | |
| totalPages = 1 | |
| prevTotalPages = 0 | |
| while totalPages != prevTotalPages: | |
| chunks = [] | |
| chunk = [] | |
| for word in words: | |
| page = "(%d/%d)" % (len(chunks) + 1, totalPages) | |
| if len(" ".join(chunk + [page])) > n: |
This file contains hidden or 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
| """ | |
| (C) Mathieu Blondel - 2010 | |
| Implementation of the collapsed Gibbs sampler for | |
| Latent Dirichlet Allocation, as described in | |
| Finding scientifc topics (Griffiths and Steyvers) | |
| """ | |
| import numpy as np |
This file contains hidden or 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 "matrix" | |
| def cross( v, w ) | |
| x = v[1]*w[2] - v[2]*w[1] | |
| y = v[2]*w[0] - v[0]*w[2] | |
| z = v[0]*w[1] - v[1]*w[0] | |
| Vector[x,y,z] | |
| end | |
| def multi_sumV( v, w ) |
This file contains hidden or 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
| # Script to test stemming for ElasticSearch. Working now!! | |
| # Reference: http://stackoverflow.com/questions/4981001/why-elasticsearch-is-not-finding-my-term | |
| require 'rubygems' | |
| require 'net/http' | |
| require 'yaml' | |
| require 'json' | |
| # kill the index | |
| delete = Net::HTTP::Delete.new("/willindex") |