Skip to content

Instantly share code, notes, and snippets.

View chowmean's full-sized avatar
🏠
Working from home

Gaurav Yadav chowmean

🏠
Working from home
View GitHub Profile
@chowmean
chowmean / runserver.py
Created February 4, 2016 20:11
Simple server listening and responding to all type of requests using SOCKETSERVER Python
import socket
import threading
import SocketServer
import time
import json
import sys
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
@chowmean
chowmean / sentiment_classification.py
Created February 4, 2016 05:57 — forked from bonzanini/sentiment_classification.py
Sentiment analysis with scikit-learn
# You need to install scikit-learn:
# sudo pip install scikit-learn
#
# Dataset: Polarity dataset v2.0
# http://www.cs.cornell.edu/people/pabo/movie-review-data/
#
# Full discussion:
# https://marcobonzanini.wordpress.com/2015/01/19/sentiment-analysis-with-python-and-scikit-learn
@chowmean
chowmean / image_download_under_proxy
Created December 15, 2015 05:09
Download image under proxy.
import urllib
proxies = {'http': 'http://YOUR_USERNAME:YOURPASSWORD@192.168.1.107:3128','https': 'https://YOUR_USRNAME:YOURPASSOWRD@192.168.1.107:3128'}
res=urllib.urlopen("http://www.py4inf.com/cover.jpg",proxies=proxies)
con=res.read()
outf=open("imgname.jpg",'wb')
outf.write(con)
outf.close()

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@chowmean
chowmean / get_product_detail.py
Created August 25, 2015 18:54
Getting details of product from flipkart using api.
import requests
product="MOBE8AHAT4SFH3PJ"
url="https://affiliate-api.flipkart.net/affiliate/product/json?id="
url=url+product
headers = {'Fk-Affiliate-Id': 'affliate_id','Fk-Affiliate-Token':'YOUR token'}
r = requests.get(url, headers=headers)
print r.content
@chowmean
chowmean / get_ytvideo_details.py
Created August 23, 2015 02:43
Get youtube video details
# Author: chowmean
# simple python script to get the comment of youtube videos using google apis get method
# Date: 23:08:2015
# mail: gaurav.dev.iiitm@gmail.com
# github:github.com/chowmean
#
import oauth2
import time
@chowmean
chowmean / get_tweets.py
Created August 22, 2015 10:16
Getting tweets using twitter search api and python
#author :chowmean
#github.com/chowmean
#You can make only 180 requests per 15 min.
import oauth2
import time
import urllib2
import json
@chowmean
chowmean / apicalls.php
Last active June 18, 2023 12:00
PHP script to make get and post calls with different parameters using cURL
<?php
#author : chowmean
$data["test_data"]="just testing";
CallAPI("POST","uri",$data,"deviceId","accessToken","application/json","firefox");
@chowmean
chowmean / getyoutubecomment.py
Last active February 4, 2016 20:13
Simple python script to get youtube comments using google api and requests. :D havefun
# Author: chowmean
# simple python script to get the comment of youtube videos using google apis get method
# Date: 21:08:2015
# mail: gaurav.dev.iiitm@gmail.com
# github:github.com/chowmean
#
import oauth2
import time