Skip to content

Instantly share code, notes, and snippets.

View VinACE's full-sized avatar
💭
I may be slow to respond.

VinACE

💭
I may be slow to respond.
View GitHub Profile
@VinACE
VinACE / world-index.json
Created November 2, 2017 14:32 — forked from sanaulla123/world-index.json
Index mapping structure for world index
{
"aliases":{},
"warmers":{},
"mappings": {
"world": {
"properties": {
"capital": {
"properties": {
"district": {
"type": "string"
@VinACE
VinACE / INSTALL
Created August 4, 2017 10:57 — forked from arya-oss/INSTALL.md
Ubuntu 16.04 Developer Tools installation
###### development tools
sudo apt-get install build-essential python-dev git nodejs-legacy npm gnome-tweak-tool openjdk-8-jdk
### Python packages
sudo apt-get install python-pip python-virtualenv python-numpy python-matplotlib
### pip packages
pip install django flask django-widget-tweaks django-ckeditor beautifulsoup4 requests classifier SymPy ipython
@VinACE
VinACE / df2json.py
Created November 28, 2016 07:27 — forked from mikedewar/df2json.py
A little script to convert a pandas data frame to a JSON object. Is there a better way?
"""
tiny script to convert a pandas data frame into a JSON object
"""
import ujson as json
import pandas
import numpy as np
df = pandas.DataFrame({
"time" : [1,2,3,4,5],
@VinACE
VinACE / pyspark_interactive_with_datastax_connector.py
Created November 25, 2016 07:10 — forked from spaceshipoperator/pyspark_interactive_with_datastax_connector.py
after successfully doing this http://planetcassandra.org/blog/kindling-an-introduction-to-spark-with-cassandra/ with spark-shell, one might reasonably think that the following would work....though I may be missing something trivial.
## invoking pyspark as follows: ##
# /path/to/spark-1.2.0-bin-hadoop2.4/bin/pyspark --jars /path/to/spark-1.2.0-bin-hadoop2.4/jars/spark-cassandra-connector-assembly-1.2.0-SNAPSHOT.jar
# first, stop the spark context launched by pyspark to avoid the conflict
sc.stop()
from py4j.java_gateway import java_import
from pyspark import SparkConf
conf = (SparkConf()
.setMaster("local")