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
public void geoadd(String objectId, BigDecimal latitude, BigDecimal longitude) {"geoadd(): {} {} {}", objectId, latitude, longitude);
try (Jedis jedis = jedisPool.getResource()) {
if (geoaddSha == null) {
String script = "return'geoadd','" + GEOSET + "', ARGV[1], ARGV[2], KEYS[1])";
geoaddSha = jedis.scriptLoad(script);
}"geoaddSha: {}", geoaddSha);, 1, objectId, latitude.toString(), longitude.toString()).toString());
samklr / dnn.txt
Created Mar 19, 2014
Pointers Deep Learning intro materials
View dnn.txt (Good One ... )
Geoffrey Hinton (God himself) Coursera Course
Geoffrey Hinton Academic page with great links
View tuning_storm_trident.asciidoc

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
samklr / interviewitems.MD
Last active Aug 29, 2015 — forked from KWMalik/interviewitems.MD
Silly (or not ?) interview questions from tech companies
View interviewitems.MD

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
View GrasswireUrlShortener.scala
package com.grasswire.grasswireurlshortener
import com.typesafe.config.ConfigFactory
import org.apache.commons.validator.routines.UrlValidator
import spray.http.StatusCodes
import spray.routing._
import scala.util.Random
import scalaz.concurrent._
#### Start IPython, generate SHA1 password to use for IPython Notebook server
$ ipython
Python 2.7.5 |Anaconda 1.8.0 (x86_64)| (default, Oct 24 2013, 07:02:20)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
samklr /
Last active Aug 29, 2015
Install Java Scala and SBT on Debian (useless pain in the ass)
sudo apt-get -yqq git core
echo "deb trusty main" | sudo tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src trusty main" | sudo tee -a /etc/apt/sources.list.d/webupd8team-java.list
sudo apt-key adv --keyserver --recv-keys EEA14886
sudo apt-get update
sudo apt-get install oracle-java8-installer
View Typesafe-activator-dockerfile
FROM ringo/scientific:6.5
RUN yum install -y wget unzip
RUN mkdir -p /home/src/ && cd /home/src && wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" && rpm -ivh jdk-8u5-linux-x64.rpm
RUN cd /home/src && wget && unzip
RUN ln -s /home/src/activator-1.2.2 /usr/local/lib/activator && ln -s /usr/local/lib/activator/activator /usr/local/bin/activator
samklr /
Created Oct 15, 2014
Mesos Master Debian/Ubuntu
### Good start for mesos. A great thanks to the guys from mesosphere
#! /bin/bash
# Add Mesosphere Ubuntu 14.04 Repo
sudo apt-key adv --keyserver --recv E56151BF
DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
CODENAME=$(lsb_release -cs)
samklr / ALSRecommender.scala
Last active Aug 29, 2015
View ALSRecommender.scala
//Download a 10 Millions movieLens file to test your data.
// wget
// unzip
import java.util.Random
import org.apache.log4j.Logger
import org.apache.log4j.Level
You can’t perform that action at this time.