Skip to content

Instantly share code, notes, and snippets.

View avinash-mishra's full-sized avatar

Avinash avinash-mishra

View GitHub Profile
$ sudo apt-get update
Err:13 xenial/main Sources
404 Not Found [IP: 80]
Ign:17 xenial/main amd64 Packages
Ign:20 xenial/main i386 Packages
Ign:22 xenial/main all Packages
Ign:23 xenial/main Translation-en_US
avinash-mishra /
Created April 4, 2017 08:48 — forked from diegopacheco/
How to setup a Cassandra 2.x Cluster in AWS EC2 / Amazon Linux

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
avinash-mishra /
Last active September 10, 2018 08:02 — forked from stevenyap/
AWS S3 Command Line

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://[移動先バケット名]
avinash-mishra /
Last active August 3, 2018 01:40
dash starter
Install dependencies before running :
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 /
Created January 11, 2018 09:28
python setup file example
"""A setuptools based setup module.
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
avinash-mishra / sample.json
Last active October 2, 2017 05:25
Easy json for testing
"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 /
Created September 23, 2016 09:22 — forked from erincerys/
Dumps a MySQL table and reformulates it into JSON to be ingested into a Cassandra table
#! /usr/bin/env python
# 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