Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
from pyspark import SparkContext | |
from pyspark.sql import SQLContext | |
from pyspark.sql.types import * | |
from IPython.display import display | |
sc = SparkContext(appName="CarCSV") | |
sqlContext = SQLContext(sc) | |
schema = StructType([StructField("year", IntegerType(), False), | |
StructField("make", StringType(), False), |
from bitarray import bitarray | |
import mmh3 | |
class BloomFilter: | |
def __init__(self, size, hash_count): | |
self.size = size | |
self.hash_count = hash_count | |
self.bit_array = bitarray(size) | |
self.bit_array.setall(0) |
This gist explains how a graph database can help for HR analytics. There are two files included: | |
- load the data.cql: this file contains the cypher statements that load the data into neo4j | |
- query the data.cql: this file has some sample queries that serve to demonstrate some of the concepts. | |
Hope this is useful. | |
Rik |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
/* | |
This example uses Scala. Please see the MLlib documentation for a Java example. | |
Try running this code in the Spark shell. It may produce different topics each time (since LDA includes some randomization), but it should give topics similar to those listed above. | |
This example is paired with a blog post on LDA in Spark: http://databricks.com/blog | |
Spark: http://spark.apache.org/ | |
also use..... | |
https://github.com/databricks/spark-csv |
In my optimization class last semester we briefly talked about project management, where there is a set of activities with given durations and some activities need to be completed before other activities can begin. We were taught to explore the management of the project’s timeline in Excel, which was tedious and prone to errors due to its manual process.
import akka.actor.{ Actor, Props } | |
object $NAME$ { | |
def props: Props = Props(new $NAME$) | |
} | |
class $NAME$ extends Actor { | |
override def receive = ??? | |
} |
Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
import sys | |
import numpy | |
from nltk.cluster import KMeansClusterer, GAAClusterer, euclidean_distance | |
import nltk.corpus | |
from nltk import decorators | |
import nltk.stem | |
stemmer_func = nltk.stem.EnglishStemmer().stem | |
stopwords = set(nltk.corpus.stopwords.words('english')) |