See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
CREATE TEMPORARY FUNCTION | |
-- In this function, we're going to be working on arrays of values. | |
-- we're also going to define a set of functions 'inside' the kMeans. | |
-- *heavily borrowing from https://github.com/NathanEpstein/clusters* -- | |
kMeans(x ARRAY<FLOAT64>, -- ESR1 gene expression | |
y ARRAY<FLOAT64>, -- EGFR gene expression | |
iterations FLOAT64, -- the number of iterations |
#repsych is on github and is here only for the glibrary idiom | |
library(repsych) | |
#install and load the following packages | |
glibrary(whisker, lubridate, magrittr, rappdirs, awsjavasdk, rJava) | |
if (!aws_sdk_present()) { | |
install_aws_sdk() | |
} | |
load_sdk() |
A list of R libraries for Recommender systems. Most of the libraries are good for quick prototyping.
Maintainer: Srikanth KS(talegari) Email: gmail me at sri dot teach (do write to me about packages ommited)
Package | Dev page | Description |
---|---|---|
recommenderlab | github | Provides a research infrastructure to test and develop recommender algorithms including UBCF, IBCF, FunkSVD and association rule-based algorithms |
rrecsys | github | Implementations of several popular recommendation systems like Global/Item/User-Average baselines, Item-Based KNN, FunkSVD, BPR and weighted ALS for rapid prototyping |
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce
method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List
is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
consumer_key = 'your-consumer-key' | |
consumer_secret = 'your-consumer-secret' | |
access_token = 'your-access-token' | |
access_secret = 'your-access-secret' |
#=================================================== | |
# Demo multi-function roxygen2 - three ways to do it | |
#=================================================== | |
# This shows how things do work, including wierd corner cases, not | |
# how they should be done. Most of the information comes from | |
# http://r-pkgs.had.co.nz/man.html | |
#==================================================== | |
# Demo multi-function roxygen2 page using @describeIn |
library("RSiteCatalyst") | |
library("d3Network") | |
#### Authentication | |
SCAuth("key", "secret") | |
#### Get Pathing data: Single page, then ::anything:: pattern | |
pathpattern <- c("http://randyzwitch.com/big-data-hadoop-amazon-ec2-cloudera-part-1", "::anything::") | |
next_page <- QueuePathing("zwitchdev", | |
"2014-01-01", |
library("RSiteCatalyst") | |
library("d3Network") | |
#### Authentication | |
SCAuth("username", "secret") | |
#### Get Pathing data using ::anything:: wildcards | |
# Results are limited by the API to 50000 | |
pathpattern <- c("::anything::", "::anything::") |