Skip to content

Instantly share code, notes, and snippets.


Sam Bessalah samklr

Block or report user

Report or block samklr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View GameOL.rb
require "test/unit"
class World
def initialize
@cells = [[false, false, true],
[false, true, false],
[false, false, false],
public void insert(E value)
SkipNode<E> x = header;
SkipNode<E>[] update = new SkipNode[MAX_LEVEL + 1];
for (int i = level; i >= 0; i--) {
View MovieSimilarities.scala
import spark.SparkContext
import SparkContext._
* A port of [[]]
* to Spark.
* Uses movie ratings data from MovieLens 100k dataset found at [[]]
object MovieSimilarities {
View ProductRecommendationJob.scala
package com.mansur.scalding
import com.twitter.scalding._
import org.apache.mahout.common.distance.TanimotoDistanceMeasure
import org.apache.mahout.math.DenseVector
import org.apache.commons.math.util.MathUtils
View product_catalog.csv
women jeans Levi's 512 512 Perfectly Slimming Bootcut, Midnight Star Wash jeans 54.00 39.00
women jeans Tommy Hilfiger Jeans Hope Boot Cut, Caroline Original Wash jeans 69.50 54.00
women jeans Lauren Jeans Co. Jeans Slimming Bootcut, Rinse Wash jeans 80.00 65.00
women jeans INC International Concepts Jeans Curvy-Fit Skinny Ankle-Length jeans 69.00 48.99
women jeans MICHAEL Michael Kors Jeans Skinny Colored Denim jeans 89.50 69.99
women tops Karen Scott Top Short-Sleeve Boat-Neck top 29.00 12.99
women tops Cable & Gauge Top Three-Quarter-Sleeve Solid Twist Front top 24.98 19.99
women tops Style&co. Top Long-Sleeve Striped Button-Down Shirt top 39.98 29.99
women tops Style&co. Top Bell-Sleeve Printed Tunic top 49.98 35.99
women tops INC International Concepts Top Short-Sleeve Ruched Tee top 29.50 24.99
samklr /
Created Apr 13, 2013
DevKings FastCode .....
import java.util.ArrayList;
import java.util.List;
public class Challenge2 {
List <Arret> arretList = new ArrayList<Arret>();
samklr / FastCode.txt
Created Apr 13, 2013
Fast Code Challenge 2
View FastCode.txt
s maximum pour trouver une solution : 240:00
La région Loire-Atlantique a décidé d'ouvrir une grande quantité de données publiques.
Parmi celles-ci, la liste des arrêts, horaires et circuits TAN (Transports de l'Agglomération Nantaise). La région veut mettre à disposition des utilisateurs TAN un outil permettant de calculer le chemin le plus court entre deux arrêts en utilisant le réseau TAN.
En entrée de votre programme sont fournies les données dont vous avez besoin, au format ASCII :​
View Skiplist.rb
# Skip lists are relatively new comers to the data structures scene (invented in the 90s).
# They differ from most data structures by being probabilistic rather than deterministic.
# Search, insertion and deletion times are expected to be O(log n) with a very high probability.
# Skip lists are normal linked lists with additional layers that enable queries to *skip*
# elements. They are much simpler than other O(log n) structures like Red Black Trees
# The skip list supports inserting multiple values for the same key. Values will be stored
# in a list attached to that key. Even a single value will be stored in a list
public synchronized int read() throws IOException {
int result =;
if (result != -1) {
return result;
View EMR log
bash-3.2$ elastic-mapreduce --create --name "Sample Recommender" \
> --jar s3n:// \
> --arg s3n:// \
> --arg s3n:// \
> --arg s3n:// \
> --arg s3n://
Created job flow j-2HA2BVCBJGMVX
bash-3.2$ elastic-mapreduce --list
j-2HA2BVCBJGMVX STARTING Sample Recommender
PENDING Example Jar Step
You can’t perform that action at this time.