Skip to content

Instantly share code, notes, and snippets.

View mongodb_quest.py
# *-* coding: utf-8 *-*
import requests
try:
from pymongo import MongoClient
except ImportError:
raise ImportError('PyMongo is not installed')
try:
@vijayanandrp
vijayanandrp / Bigquery_util.py
Last active Jan 31, 2018
Big Query to Google Cloud storage
View Bigquery_util.py
#!/usr/bin/env python
# Copyright 2016 Google Inc. All Rights Reserved.
import os
import sys
import time
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'BigQuery.json'
from google.cloud import bigquery
from google.cloud.bigquery.job import DestinationFormat, ExtractJobConfig, Compression
View bigquery_poc.py
from google.cloud import bigquery
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'Google Analytics POC.json'
client = bigquery.Client()
query_job = client.query("""
SELECT
View lib_config_manager.py
#!/usr/bin/env python3.5
# encoding: utf-8
import configparser
config = configparser.ConfigParser()
# I believe this config parser should use the perl autovivification method to create dynamic objects
config['DEFAULT'] = {
'Name': 'Vijay Anand',
View example.ini
[DEFAULT]
married = False
sex = M
name = Vijay Anand
age = 26
nationality = Indian
[www.facebook.com]
user_name = VjyAnnd
View Yelp_Predictions.md

Tutorial Exercise: Yelp reviews (Solution)

Introduction

This exercise uses a small subset of the data from Kaggle's Yelp Business Rating Prediction competition.

Description of the data:

  • yelp.csv contains the dataset. It is stored in the repository (in the data directory), so there is no need to download anything from the Kaggle website.
View spam_predict_1.md

Text SMS - Spam Classification Model

The base requirement of this project is to analyse the SMS dataset and come up with a machine learning models to predict or claissify the sms text. For getting my latest code and datasets please do visit my github.com account.

The following are the list of actions that we gonna do to solve this problem approach
  1. Reading a text-based dataset into pandas
  2. Vectorizing our dataset
  3. Building and evaluating a model
@vijayanandrp
vijayanandrp / tutorial_with_solutions.md
Created Dec 15, 2017
Pycon 2016 tutorial by Kevin Markham. -
View tutorial_with_solutions.md

Tutorial: Machine Learning with Text in scikit-learn

Agenda

  1. Model building in scikit-learn (refresher)
  2. Representing text as numerical data
  3. Reading a text-based dataset into pandas
  4. Vectorizing our dataset
  5. Building and evaluating a model
View gender_analysis.md

Data wrangling

Data wrangling, sometimes referred to as data munging, is the process of transforming and mapping data from one "raw" data form into another format with the intent of making it more appropriate and valuable for a variety of downstream purposes such as analytics. A data wrangler is a person who performs these transformation operations. Wiki

Wrangler is an interactive tool for data cleaning and transformation. Spend less time formatting and more time analyzing your data. stanford

Example - 1

View age_analysis.md

Data wrangling

Data wrangling, sometimes referred to as data munging, is the process of transforming and mapping data from one "raw" data form into another format with the intent of making it more appropriate and valuable for a variety of downstream purposes such as analytics. A data wrangler is a person who performs these transformation operations. Wiki

Wrangler is an interactive tool for data cleaning and transformation. Spend less time formatting and more time analyzing your data. stanford

Example - 1