This is code to convert a string to a type based on discussions here:
https://groups.google.com/d/msg/julia-dev/q9lG55PMdlc/C3IRKbKXcpoJ
type UnsupportedType
end
is_valid_type_ex(s::Symbol) = true
is_valid_type_ex(x::Int) = true
import org.apache.spark.rdd.NewHadoopRDD | |
import org.apache.hadoop.hbase.mapreduce.TableInputFormat | |
import org.apache.hadoop.hbase.HBaseConfiguration | |
import org.apache.hadoop.hbase.client.Result | |
import org.apache.hadoop.hbase.io.ImmutableBytesWritable | |
import scala.collection.JavaConversions._ | |
import scala.collection.JavaConverters._ | |
import org.apache.spark.mllib.recommendation.ALS | |
import org.apache.spark.mllib.recommendation.Rating | |
import scala.collection.mutable.ArrayBuffer |
package ca.underflow.hbase | |
import org.hbase.async._ | |
import com.stumbleupon.async._ | |
object Demo extends App { | |
// This let's us pass inline functions to the deferred | |
// object returned by most asynchbase methods |
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a | |
; semicolon, such as this one, are comments. They are not executed. | |
; This script has a special filename and path because it is automatically | |
; launched when you run the program directly. Also, any text file whose | |
; name ends in .ahk is associated with the program, which means that it | |
; can be launched simply by double-clicking it. You can have as many .ahk | |
; files as you want, located in any folder. You can also run more than | |
; one .ahk file simultaneously and each will get its own tray icon. |
/* | |
Compile on Fedora 16 Linux: | |
g++ -O2 -Wall -g -o boostgz boostgz.cc -lboost_iostreams-mt | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fstream> | |
#include <iostream> |
# ... more above ... | |
# wsfl bash is not a login shell | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
# ssh-agent configuration | |
if [ -z "$(pgrep ssh-agent)" ]; then | |
rm -rf /tmp/ssh-* |
This is code to convert a string to a type based on discussions here:
https://groups.google.com/d/msg/julia-dev/q9lG55PMdlc/C3IRKbKXcpoJ
type UnsupportedType
end
is_valid_type_ex(s::Symbol) = true
is_valid_type_ex(x::Int) = true
''' | |
An authentication module for pyzmq modelled on zauth from czmq. | |
The functions to read and generate certificates should be interoperable | |
with czmq's zcert's - though are not as fully featured. | |
''' | |
import datetime | |
import glob | |
import json |
Run time performance of your SAS process can be greatly improved with parallel execution. | |
This gist describes an approach where your input data set(s) are divided into N equal-sized subsets and your code is | |
executed in parallel against each subset. For information on other methods of parallel processing, please see this page | |
from SAS Support: http://support.sas.com/rnd/scalability/tricks/connect.html | |
Step 1 | |
Divide your input data set(s) into N subsets that are approximately equal in size. The following macro shows one way to | |
do this. | |
%macro DIVIDE_INPUT_DATA(N); |
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
# file: unzip.py | |
import zipfile,os,sys | |
if len(sys.argv)==2: | |
fname=sys.argv[1] | |
else: | |
print "Usage: python %s filename\n\n" % sys.argv[0] | |
sys.exit() |
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |