Skip to content

Instantly share code, notes, and snippets.

View Qambar's full-sized avatar

UncleAaroh.eth Qambar

  • Remote
  • 22:23 (UTC)
View GitHub Profile
/* sans-serif */
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-family: Trebuchet, Tahoma, Arial, sans-serif;
font-family: GillSans, Calibri, Trebuchet, sans-serif;
font-family: "DejaVu Sans", "Bitstream Vera Sans", "Segoe UI", "Lucida Grande", Verdana, Tahoma, Arial, sans-serif;
font-family: Geneva, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
font-family: Geneva, Verdana, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
font-family: "HelveticaNeue-Roman", "Helvetica 55 Roman", Helvetica, Arial, sans-serif;
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
@Qambar
Qambar / mmds-q1.R
Created September 27, 2015 22:28 — forked from primaryobjects/mmds-q1.R
Mining Massive Datasets Quiz 1
# Q1
#
# Suppose we compute PageRank with a β of 0.7, and we introduce the additional constraint that the sum of the PageRanks of the three pages must be 3, to handle the problem that otherwise any multiple of a solution will also be a solution. Compute the PageRanks a, b, and c of the three pages A, B, and C, respectively. Then, identify from the list below, the true statement.
#
# Matrix
#
# A B C
# A 0 0 0
# B 0.5 0 0
# C 0.5 1 1
@Qambar
Qambar / mmds-q2a.R
Created September 27, 2015 22:29 — forked from primaryobjects/mmds-q2a.R
Mining Massive Datasets Quiz 2a: LSH (Basic)
#
# Quiz 2a
#
#
# Q1
# The edit distance is the minimum number of character insertions and character deletions required to turn one string into another. Compute the edit distance between each pair of the strings he, she, his, and hers. Then, identify which of the following is a true statement about the number of pairs at a certain edit distance.
#
packages <- c('combinat', 'stringdist')
@Qambar
Qambar / mapReduce.R
Created September 27, 2015 22:29 — forked from primaryobjects/mapReduce.R
Map Reduce example in R. Demonstrates applying a map and reduce function to an input array, resulting in a hash of key/value pairs. This example maps a method to find prime divisors of each input value and then reduces the result by summing the input value for each prime divisor. See demo at http://www.r-fiddle.org/#/fiddle?id=tyir23SG&version=1
is.prime <- function(num) {
if (num == 2) {
TRUE
} else if (any(num %% 2:(num-1) == 0)) {
FALSE
} else {
TRUE
}
}
@Qambar
Qambar / How to convert P12 to PEM file
Created December 10, 2015 13:09 — forked from jak/How to convert P12 to PEM file
How to convert P12 to PEM file
openssl pkcs12 -in myfile.p12 -out newfile.pem -nodes
#!/usr/bin/env sh
export projectname=blogs
git clone [email protected]:bbc/symfony-bootstrap.git $projectname && cd $_ && script/rename $projectname
@Qambar
Qambar / gist:27732658727f2ed2066cc6d0e2bed263
Created January 12, 2017 12:18 — forked from bpsm/gist:1858654
g[un]zip input to output
(ns clj-gunzip.core
(:require [clojure.java.io :as io])
(:require [clojure.string :as str])
(:import java.util.zip.GZIPInputStream
java.util.zip.GZIPOutputStream))
(defn gunzip
"Writes the contents of input to output, decompressed.
input: something which can be opened by io/input-stream.
@Qambar
Qambar / Clojure.sublime-settings
Created April 28, 2017 08:02 — forked from arnaudsj/Clojure.sublime-settings
Sublime Text 3: Clojure
// installed Clojure packages:
//
// * BracketHighlighter
// * lispindent
// * SublimeREPL
// * sublime-paredit
{
"word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?",
"paredit_enabled": true,
@Qambar
Qambar / mqtt.clj
Created May 1, 2017 19:00 — forked from fsmunoz/mqtt.clj
Simple example of MQTT message publishing using Clojure and the Eclipse Paho libraries
;; Simple example of MQTT message publish using Clojure
;;
;; Uses the Websphere Eclipse Paho client
;;
;; Author: Frederico Munoz <[email protected]>
;; Date: 18-Jun-2013
;; Keywords: mqtt, messaging, m2m, telemetry, clojure, iot, paho
;;
;; Copying and distribution of this file, with or without modification,
;; are permitted in any medium without royalty provided the copyright