Skip to content

Commit

Permalink
new programs
Browse files Browse the repository at this point in the history
  • Loading branch information
linrakesh committed Dec 5, 2019
1 parent c24d8d3 commit 13b4dde
Show file tree
Hide file tree
Showing 8 changed files with 311 additions and 9 deletions.
7 changes: 7 additions & 0 deletions numpy/sumOfDD.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import numpy as np

a = np.array([(1, 2, 3), (4, 5, 6), (7, 8, 9)])
b = np.sum(a, 1)
print(b)

``
8 changes: 2 additions & 6 deletions string/string1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
str = "This is me rakesh"
n = len(str)
print('Length of string is : ',n)
str = str + "Hello rakesh"
print(str)
print(str[0])
str = "Hello Developer"
print(str[::-1])
2 changes: 2 additions & 0 deletions string/tempCodeRunnerFile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
str = "Hello Developer"
print(str[-1:])
6 changes: 6 additions & 0 deletions webscraper/news.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from newspaper import Article

url = 'http://fox13now.com/2013/12/30/new-year-new-laws-obamacare-pot-guns-and-drones/'
article = Article(url)
article.download()
print(article.html())
4 changes: 4 additions & 0 deletions webscraper/wiki.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import wikipedia as wi
print(wi.summary('wikipedia'))
result = wi.page('rakesh kumar')
print(result.url)
4 changes: 2 additions & 2 deletions webscraper/wikipedia.py → webscraper/wikipedia1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@


import requests
req = requests.post('https://binarynote.com', data = {'search':'wordpress'})
req = requests.post('https://binarynote.com', data={'search': 'wordpress'})
req.raise_for_status()
with open('wordpress.html', 'wb') as fd:
for chunk in req.iter_content(chunk_size=50000):
fd.write(chunk)

print("File generated...")
print("File generated...")
3 changes: 2 additions & 1 deletion websites.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# !python36
import webbrowser

webbrowser.open_new_tab("http://www.binarynote.com")
webbrowser.open_new_tab("https://www.clickbank.com")
webbrowser.open_new_tab("https://account.shareasale.com/a-login.cfm?")
webbrowser.open_new_tab("https://themeforest.net/")
webbrowser.open_new_tab("https://automatetheboringstuff.com")
webbrowser.open_new_tab("https://automatetheboringstuff.com")
286 changes: 286 additions & 0 deletions wordpress.html

Large diffs are not rendered by default.

0 comments on commit 13b4dde

Please sign in to comment.