-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0733049
commit 168dcaf
Showing
146 changed files
with
112,635 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
i=1 | ||
for x in reversed(range(5)): | ||
print(' '*x + '*'*i) | ||
i+=2 |
This file contains 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
Binary file modified
BIN
+0 Bytes
(100%)
Python Machine Learning/__pycache__/create_sentiment_featuresets.cpython-36.pyc
Binary file not shown.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from selenium import webdriver | ||
from selenium.webdriver.common.keys import Keys | ||
|
||
driver = webdriver.Chrome() | ||
driver.get("http://www.python.org") | ||
assert "Python" in driver.title | ||
elem = driver.find_element_by_name("q") | ||
elem.clear() | ||
elem.send_keys("pycon") | ||
elem.send_keys(Keys.RETURN) | ||
assert "No results found." not in driver.page_source | ||
driver.close() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,38 @@ | ||
import requests | ||
from bs4 import BeautifulSoup | ||
import requests, string | ||
from bs4 import BeautifulSoup | ||
|
||
baseURL = 'https://github.com/' | ||
github_repo = {} | ||
|
||
# requesting the web URL | ||
page = requests.get("http://www.geekeefy.wordpress.com") | ||
page = requests.get("https://github.com/trending/powershell") | ||
soup = BeautifulSoup(page.content,'html.parser') | ||
#print(soup.prettify()) # Parses the content and a readable format | ||
li_tags = soup.find_all('li',{"class": "col-12 d-block width-full py-4 border-bottom"}) | ||
for li in li_tags: | ||
div_tags = li.find_all('div', {"class": "d-inline-block col-9 mb-1"}) | ||
for div in div_tags: | ||
reponame = div.get_text().strip().replace(" ", "") | ||
|
||
github_repo["Repo"]=reponame | ||
github_repo["RepoURL"]="https://github.com/"+reponame | ||
|
||
div_tags = li.find_all('div', {"class": "py-1"}) | ||
for div in div_tags: | ||
description = div.get_text().strip() | ||
github_repo["Description"]=description | ||
|
||
div_tags = li.find_all('div', {"class": "f6 text-gray mt-2"}) | ||
|
||
print(soup.find_all('p')[2]) | ||
print(soup.find_all('p')[2].get_text()) | ||
print(soup.find_all('p')) | ||
for div in div_tags: | ||
a_tags = div.find_all('a', {"class": "muted-link d-inline-block mr-3"}) | ||
github_repo['StargazersURL']=baseURL+a_tags[0]['href'] | ||
github_repo['StargazersCOunt']=a_tags[0].get_text().strip() | ||
github_repo['Forks']=baseURL+a_tags[1]['href'] | ||
github_repo['ForksCount']=a_tags[1].get_text().strip() | ||
|
||
span = div.find_all('span', {"class": "d-inline-block float-sm-right"}) | ||
for s in span: | ||
github_repo['StarsThisMonth']=s.get_text().strip() | ||
|
||
print(github_repo) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import json, requests | ||
|
||
subreddit = 'powershell' | ||
|
||
r = requests.get( | ||
'http://www.reddit.com/r/{}.json'.format(subreddit), | ||
headers={'user-agent': 'Mozilla/5.0'} | ||
) | ||
|
||
# view structure of an individual post | ||
print(r.json()['data']['children']) | ||
|
||
#for post in r.json()['data']['children']: | ||
# print('Title:',post['data']['title']) | ||
# print('URL:', post['data']['url']) | ||
# print('ups',post['data']['ups']) | ||
# print('Num of comments',post['data']['num_comments'])#, post['data']['selftext']) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# pip install praw | ||
import praw | ||
|
||
reddit = praw.Reddit( | ||
client_id='_MupVEzusqnB4g', | ||
client_secret='OE88oDY9ZJZYlXUYLLM--A-R3gs', | ||
password='Durg@v@ti@123', | ||
user_agent='PrawTut', | ||
username='Prateeksingh1590') | ||
|
||
subreddit = reddit.subreddit('powershell') | ||
|
||
hot_python = subreddit.hot(limit=5) | ||
|
||
for submission in hot_python: | ||
if not submission.stickied: | ||
#print(dir(submission)) | ||
print( | ||
'Title: {}, fullname: {}, ups: {}, downs: {}, flair: {} url: {} views: {} comments: {} timeUTC: {}'. | ||
format(submission.title, submission.fullname, submission.ups, | ||
submission.downs, submission.link_flair_text, submission.url, | ||
submission.view_count, submission.num_comments, | ||
submission.created_utc)) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# pip install python-wordpress-xmlrpc | ||
from wordpress_xmlrpc import Client, WordPressPost, WordPressPage | ||
from wordpress_xmlrpc.methods.posts import GetPosts, NewPost | ||
from wordpress_xmlrpc.methods.users import GetUserInfo | ||
from wordpress_xmlrpc.methods import posts | ||
|
||
|
||
wp = Client('http://ridicurious.com/xmlrpc.php', '[email protected]', 'Durg@v@ti@123') | ||
#posts = wp.call(GetPosts()) | ||
#posts = Client.call(posts.GetPosts()) | ||
pages = Client.call(posts.GetPosts({'post_type': 'page'}, results_class=WordPressPage)) | ||
|
||
print(dir(pages)) | ||
|
||
#print(dir(posts[0])) | ||
#for post in posts: | ||
# print('title: {}, status: {}, id: {}, link: {}'.format(post.title, post.post_status, post.id, post.link)) |
6 changes: 6 additions & 0 deletions
6
...n for Finance/Python-for-Finance-Repo-master/.ipynb_checkpoints/Untitled-checkpoint.ipynb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"cells": [], | ||
"metadata": {}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Oops, something went wrong.