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
def quicksort(list): | |
# Define lists | |
less = [] | |
equal = [] | |
greater = [] | |
if len(list) > 1: # Check if list have more than 1 element | |
pivot = list[0] # This is now pivot value | |
for number in list: # Go through numbers in list |
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
from bs4 import BeautifulSoup | |
import csv | |
import re | |
import requests | |
# Copy URL you wanna crawl | |
print ("Copy the link you wanna scrap:") | |
url = raw_input("->") | |
# Fetch url | |
request = requests.get(url) |
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
import geocoder | |
def company(name): | |
results = geocoder.google(name) | |
print ("Coordinates: Latitude - %s, Longitude - %s" %(results.lat, results.lng)) | |
print ("Address: %s" % results.address) | |
if __name__ == '__main__': | |
print ("Type name of the place:") | |
name = raw_input() |
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
# Import socket library | |
import socket | |
# Import hexlify for ip address conversion | |
from binascii import hexlify | |
# Use NTP protocol | |
import ntplib | |
from time import ctime | |
# Print hostname | |
hostname = socket.gethostname() |
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
from urllib import urlopen | |
from xml.etree.ElementTree import parse | |
rss_url = urlopen('http://www.dropsql.com/feed') | |
xml = parse(rss_url) | |
f = open('dropsql-feeds.txt', 'w') | |
# Looks for all item elements under channel tag | |
for item in xml.iterfind('channel/item'): |
OlderNewer