- @fergbyrne
- HTM = Hierarchical Temporal Memory
- Slides
- big data is like teenage sex
- noone knows how to do it
- everyone thinks everyone else is doing it
from django.views.generic import TemplateView | |
# Onesignal | |
# TemplateView will render this files as static content | |
urlpatterns += [ | |
path('manifest.json', TemplateView.as_view(template_name='onesignal/manifest.json', content_type='application/json')), | |
path('OneSignalSDKWorker.js', TemplateView.as_view(template_name='onesignal/OneSignalSDKWorker.js', content_type='application/x-javascript')), | |
path('OneSignalSDKWorker.js', TemplateView.as_view(template_name='onesignal/OneSignalSDKWorker.js', content_type='application/x-javascript')), | |
] |
# using four part files to construct "minitweet" | |
cat rawtweets/part-0000[1-3] > minitweets | |
# change log4j properties to WARN to reduce noise during demo | |
mv conf/log4j.properties.template conf/log4j.properties | |
vim conf/log4j.properties # Change to WARN | |
# launch Spark shell REPL | |
./bin/spark-shell |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from sklearn.metrics.pairwise import linear_kernel | |
import numpy as np | |
from itertools import combinations | |
from random import shuffle | |
def majorclust_sklearn(): | |
texts = [ | |
"foo blub baz", | |
"foo bar baz", |
/* | |
* Copyright (c) 2013. Regents of the University of California | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
# coding=UTF-8 | |
from __future__ import division | |
import nltk | |
from collections import Counter | |
# This is a simple tool for adding automatic hashtags into an article title | |
# Created by Shlomi Babluki | |
# Sep, 2013 | |
It is a rite of passage to post one's successful build instructions for OpenCV on a Mac | |
after you've tried all the other conflicting instructions out there and still failed. | |
brew failed for me (was this because I could never get a happy brew doctor situation? | |
I'll never know). macports? nope. build-from-source recipes? I didn't find one that | |
worked for me. | |
Here's what did work to build OpenCV 2.4.5 from the distribution tarball using cmake, | |
on Mac OSX 10.8.4, linked to an anaconda installation rather than the system python. | |
It is a mashup of various bits of advice out there. If you're already comfortable with | |
build/install from source, all you need to read is the cmake invocation in step 3 and |
@implementation UITextView (RSExtras) | |
static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
/*[s length] is assumed to be 0 or 1. s may be nil. | |
Totally not a strict check.*/ | |
if (s == nil || [s length] < 1) | |
return NO; |
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |