Skip to content

Instantly share code, notes, and snippets.

View VatslavDS's full-sized avatar

JorgeEscandon VatslavDS

View GitHub Profile
# Customization of Stratio Intelligence Core Image
FROM stratio/intelligence-spark-core:0.2.0
MAINTAINER Stratio Intelligence <intelligence@stratio.com>
# --- Begining Of Customizable Part ---
USER root
# ipython-sql
RUN apt-get install -y libpq-dev && \
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
links:
- zookeeper:zk
environment:
KAFKA_ADVERTISED_HOST_NAME: 127.0.1.1
import org.apache.avro.file.DataFileReader
import org.apache.avro.generic.{GenericDatumReader, IndexedRecord}
import org.apache.hadoop.fs.Path
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.hadoop.conf.Configuration
import org.apache.spark.sql.SQLContext
import org.apache.avro.mapred.FsInput
import parquet.avro.AvroParquetWriter
#!/bin/bash
#
# mongodb Startup script for the mongodb server
#
# chkconfig: - 64 36
# description: MongoDB Database Server
#
# processname: mongodb
#
//I have this two methods for read and write in SD memory
//THe problems is when i try to retrieve the image the quality is very low. What can i do?
//WRITE
public String saveToSD(Bitmap outputImage){
//THis create a directory
String name_millis = Long.toString(System.currentTimeMillis());
String directory = Environment.getExternalStorageDirectory() + "/.sales_tracker/";
File storagePath = new File(directory);
/*var sys = require("sys");
var stdin = process.openStdin();
stdin.addListener("data", function(d){
console.log("You entered " + d.toString());
console.log(parseInt(d.toString()));
process.kill();
});
*/
@VatslavDS
VatslavDS / gist:ef58b7a34aa274a92227
Last active August 29, 2015 14:00
Ajax_example
<!DOCTYPE html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
</head>
Hola
<script>
// using jQuery
function getCookie(name) {
var cookieValue = null;