Skip to content

Instantly share code, notes, and snippets.

View foundjem's full-sized avatar

Foundjem foundjem

View GitHub Profile
@foundjem
foundjem / curl-crawler.sh
Created February 1, 2018 18:53 — forked from oliveratgithub/curl-crawler.sh
Unix Shell-Script to crawl a list of website URLs using curl
#!/bin/sh
timezone="Europe/Zurich"
# List of valid timezones: wikipedia.org/wiki/List_of_tz_database_time_zones
script="${0##*/}"
rootdir=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
logfile="$script.log"
log="$rootdir/$logfile"
now=$(TZ=":$timezone" date)
# Uncomment 'mailto=' (remove #) to enable emailing the log upon completion
#mailto="[email protected]"
@foundjem
foundjem / SDES.java
Created September 29, 2017 21:41 — forked from RahulSD/SDES.java
Simple Implementation of SDES Algorithm in Java
/**
SDES Algorithm
By: Rahul S Dambre
*/
package RahulDambre.SDES;
import java.util.*;
@foundjem
foundjem / friends_recommender.py
Created November 6, 2016 21:15 — forked from marcelcaraciolo/friends_recommender.py
Twitter Friends Recommender
#-*-coding: utf-8 -*-
'''
This module represents the recommender system for recommending
new friends based on 'mutual friends'.
'''
__author__ = 'Marcel Caraciolo <[email protected]>'
@foundjem
foundjem / AggregateByKey.scala
Created March 14, 2016 13:22 — forked from bbejeck/AggregateByKey.scala
Sample code for the Spark PairRDDFunctions - AggregateByKey
package bbejeck.grouping
import org.apache.log4j.{Level, Logger}
import org.apache.spark.{SparkConf, SparkContext}
import scala.collection.mutable
/**
* Created by bbejeck on 7/31/15.
*
@foundjem
foundjem / CombineByKey.scala
Created March 14, 2016 13:20 — forked from bbejeck/CombineByKey.scala
Source code for CombineByKey blog post
package bbejeck.grouping
import org.apache.log4j.{Level, Logger}
import org.apache.spark.{SparkConf, SparkContext}
import scala.collection.mutable
/**
* Created by bbejeck on 8/6/15.
* Example usage of combineByKey
@foundjem
foundjem / ec2.py
Created February 24, 2016 21:43 — forked from iMilnb/ec2.py
AWS EC2 simple manipulation script using python and boto3
#!/usr/bin/env python
# Simple [boto3](https://github.com/boto/boto3) based EC2 manipulation tool
#
# To start an instance, create a yaml file with the following format:
#
# frankfurt:
# - subnet-azb:
# - type: t2.micro
# image: image-tagname