This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import re | |
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'} | |
def cleanhtml(raw_html): | |
cleanr =re.compile('<.*?>') | |
cleantext = re.sub(cleanr,'', raw_html) | |
return cleantext | |
def liveScore(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to Install ProR plugin into Eclipse | |
Open Eclipse | |
Go to Help->Install New Software | |
Click on Add new site | |
Add name as : ProR | |
link: | |
http://download.eclipse.org/rmf/updates/releases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are some resources collected/generated by me while beginning with networkx | |
Install using: | |
sudo pip install networkx | |
Examples given here | |
https://networkx.github.io/examples.html | |
>>> import networkx as nx | |
>>> G=nx.Graph() | |
>>> G.add_node("spam") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Instructions | |
First go to : https://www.dropbox.com/developers-v1/apps/create | |
Then create a "Drop ins app" there. | |
Now go to that from your dropbox apps console to get app_key and app_secret. | |
''' | |
import dropbox | |
app_key = 'APP_KEY_HERE' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generating json | |
import json | |
from pprint import pprint | |
data = {} | |
data['key'] = ['value'] | |
data['1']='bak' | |
json_data = json.dumps(data) | |
# Output: '{"1": "bak", "key": ["value"]}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# System + MySQL backup script | |
# Copyright (c) 2008 Marchost | |
# This script is licensed under GNU GPL version 2.0 or above | |
# --------------------------------------------------------------------- | |
# Taken from : https://www.howtoforge.com/shell-script-to-back-up-all-mysql-databases-each-table-in-an-individual-file-and-upload-to-remote-ftp | |
######################### | |
######TO BE MODIFIED##### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reference http://stackoverflow.com/a/18490935/2037928 | |
# Login as root | |
# Install needed packages | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
# Download appropriate ruby version https://www.ruby-lang.org/en/downloads/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some info and links to help people understand what exactly is web development, what are its key elements and all | |
you need to know to get started | |
First of all what is a Server? | |
http://whatis.techtarget.com/definition/server | |
What is a Client-Server architecture? | |
- It is one of the most prominent architectures used to design any software which interacts with web. Be it a website, | |
a chat service or anything. | |
https://en.wikipedia.org/wiki/Client%E2%80%93server_model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* pc-lock.c | |
* | |
* Created on: Sep 24, 2015 | |
* Author: Vikas Yadav (IMT2013060) | |
* Producer Consumer Problem using lock variables | |
* | |
* NOTE: | |
* | |
* This solution works most of the time properly. |