Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Avinash avinash-mishra

🎯
Focusing
View GitHub Profile
@avinash-mishra
avinash-mishra / AWS-CLI.md
Last active Sep 10, 2018 — forked from stevenyap/AWS-CLI.md
AWS S3 Command Line
View AWS-CLI.md

S3 Syncing

# sync from bucket to local
aws s3 sync <bucket> <target_folder> <options>
aws s3 sync s3://mybucket . --acl public-read

aws s3 sync --region ap-northeast-1 s3://[移動元バケット名] s3://[移動先バケット名]
View dash_starter.py
"""
Install dependencies before running : https://dash.plot.ly/installation
"""
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
pd.core.common.is_list_like = pd.api.types.is_list_like
@avinash-mishra
avinash-mishra / sampleSetup.py
Created Jan 11, 2018
python setup file example
View sampleSetup.py
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
@avinash-mishra
avinash-mishra / sample.json
Last active Oct 2, 2017
Easy json for testing
View sample.json
[
{
"time": "03:53:25 AM",
"milliseconds_since_epoch": 1362196405309,
"date": "03-02-2013",
"name": "alphabet"
},
{
"time": "03:53:26 AM",
"milliseconds_since_epoch": 1362196405300,
@avinash-mishra
avinash-mishra / cassandra-cluster-ec2-linux.md
Created Apr 4, 2017 — forked from diegopacheco/cassandra-cluster-ec2-linux.md
How to setup a Cassandra 2.x Cluster in AWS EC2 / Amazon Linux
View cassandra-cluster-ec2-linux.md

Cassandra 2.x Cluster on AWS EC2

Install java 8

# Remove java 7
sudo yum remove -y java

# Install basic packages
sudo yum install -y git
View Kafka MultiNode - MultiBroker Cluster.md
View ubuntu 16.04.1 fix error for sudo apt-get update
Problem:
$ sudo apt-get update
..........
..........
Err:13 http://extras.ubuntu.com/ubuntu xenial/main Sources
404 Not Found [IP: 91.189.92.152 80]
Ign:17 http://extras.ubuntu.com/ubuntu xenial/main amd64 Packages
Ign:20 http://extras.ubuntu.com/ubuntu xenial/main i386 Packages
Ign:22 http://extras.ubuntu.com/ubuntu xenial/main all Packages
Ign:23 http://extras.ubuntu.com/ubuntu xenial/main Translation-en_US
@avinash-mishra
avinash-mishra / mysql2cassandra.py
Created Sep 23, 2016 — forked from erincerys/mysql2cassandra.py
Dumps a MySQL table and reformulates it into JSON to be ingested into a Cassandra table
View mysql2cassandra.py
#! /usr/bin/env python
#
# mysql2cassandra.py
# Dump a MySQL result set to file and then import into a Cassandra column family
#
# Configuration
# mysql_params [host, port, user, password, db] MySQL conenction parameters
# mysql_columns [colname, colname2, ...] Columns for building MySQL query
# The column that will hold values of the row key in the Cassandra column family must be first