This file contains 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
""" | |
The code is implementation of techniques in this lecture: https://www.essie.ufl.edu/~kgurl/Classes/Lect3421/Fall_01/NM5_curve_f01.pdf | |
""" | |
import matplotlib.pyplot as plt | |
import numpy as np | |
def curve(X, Y, order): | |
sigma_x=[] | |
for i in range(2*order + 1): |
This file contains 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
import org.deeplearning4j.bagofwords.vectorizer.TfidfVectorizer; | |
import org.deeplearning4j.models.word2vec.VocabWord; | |
import org.deeplearning4j.models.word2vec.wordstore.VocabCache; | |
import org.deeplearning4j.models.word2vec.wordstore.inmemory.AbstractCache; | |
import org.deeplearning4j.text.documentiterator.LabelAwareIterator; | |
import org.deeplearning4j.text.documentiterator.LabelledDocument; | |
import org.deeplearning4j.text.documentiterator.LabelsSource; | |
import org.deeplearning4j.text.tokenization.tokenizerfactory.DefaultTokenizerFactory; | |
import org.nd4j.linalg.api.ndarray.INDArray; |
This file contains 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
-- $ ./redis-cli --eval cleanSpringRedisCache.lua <CACHE_NAME> | |
local logtable = {} | |
local function logit(msg) | |
logtable[#logtable+1] = msg | |
end | |
local cacheName=KEYS[1]..'~keys' | |
logit('Cache: '..cacheName) | |
local cacheValues=redis.call("zrevrange", cacheName, 0, 100) |
This file contains 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
curl 'http://localhost:8080/search/?yql=select%20*%20from%20sources%20*%20where%20(sddocname%20contains%20(%5B%7B%22implicitTransforms%22%3A%20false%7D%5D%22tweet%22))%20limit%200%20%7C%20all(group(n_tA_c)%20max(1)%20each(output(count()%20as(count))))%3B&ranking=unranked' | python -m json.tool | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 472 100 472 0 0 23 0 0:00:20 0:00:20 --:--:-- 118 | |
{ | |
"root": { | |
"children": [ | |
{ | |
"children": [ | |
{ |
This file contains 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
curl 'http://localhost:8080/search/?yql=select%20*%20from%20sources%20*%20where%20(sddocname%20contains%20(%5B%7B%22implicitTransforms%22%3A%20false%7D%5D%22tweet%22))%20%7C%20all(group(n_tA_c)%20max(10)%20each(output(count()%20as(count))))%3B' | python -m json.tool | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 1234 0 1234 0 0 61 0 --:--:-- 0:00:20 --:--:-- 308 | |
{ | |
"root": { | |
"children": [ | |
{ | |
"children": [ | |
{ |