Skip to content

Instantly share code, notes, and snippets.

@alex9311
alex9311 / LDAspark.md
Last active April 15, 2020 23:13
How to implement LDA in Spark and get the topic distributions of new documents

How to implement LDA in Spark and get the topic distributions of new documents

import org.apache.spark.rdd._
import org.apache.spark.mllib.clustering.{LDA, DistributedLDAModel, LocalLDAModel}
import org.apache.spark.mllib.linalg.{Vector, Vectors}
import scala.collection.mutable

val stopWordsInput = sc.textFile("stopwords.csv")
val stopWords = stopWordsInput.collect()
@AlexTiTanium
AlexTiTanium / ParticaleAnimator.cs
Created May 30, 2013 08:27
Time scale independent Particle system in unity3d
using UnityEngine;
using System.Collections;
public class ParticaleAnimator : MonoBehaviour {
private void Awake()
{
particle = GetComponent<ParticleSystem>();
}