- GEOFF HILTON {Father of DNN}
- MLP {Multi Layered Perceptron} -> Vanialla Neural Network
- Problem of Vanishing Gradient {This is what RBM Solves}
- Forward/Backward Phase
import re | |
import ssl | |
from urllib import request | |
seedlist = ['https://scrapy.org/'] | |
def extract_urls(url): | |
""" | |
this function is used to extract URLs from HTML | |
""" |
def numeric_encoding(some_string): | |
mappings = {"A": "1", "G": "2", "C": "3", "T": "4"} | |
results = "" | |
for current in some_string: | |
results += mappings[current] | |
return results | |
numeric_encoding("AGCTTCA") |
# This is example from https://developers.google.com/sheets/api/quickstart/python | |
""" | |
Shows basic usage of the Sheets API. Prints values from a Google Spreadsheet. | |
""" | |
from __future__ import print_function | |
from apiclient.discovery import build | |
from httplib2 import Http | |
from oauth2client import file, client, tools |
# Grammar Based Natural Language Query Parser | |
# Background: I've implemented a better search engine for an eCommerce Site. There was a legacy code which had lot of | |
# if-else blocks. By using Grammer based parsing code I was able to reduce Line of Codes for Module and | |
# make it more extensible and maintainable | |
# Ref: | |
# 1. http://infohost.nmt.edu/tcc/help/pubs/pyparsing/pyparsing.pdf | |
# 2. http://q3k.org/gentoomen/Programming/Python/Getting%20Started%20with%20Pyparsing%20(2007).pdf | |
from pyparsing import Word, alphas, oneOf |
# This is Readable | |
>>> nums = [] | |
>>> for i in range(1000): | |
... nums.append(random.randint(1, 1000)) | |
... | |
# This is not readable | |
num_1 = [random.randint(1, 1000) for i in range(1000)] | |
# Traditional way of doing things |
from string import strip | |
def format_name(name): | |
#Step 1: Split by , | |
#Step 2: Remove any extrac white space in tokens using Map | |
#Step 3: Reverse List using ::-1 | |
#Step 4: Join with White Space | |
return " ".join(map(strip, name.split(","))[::-1]) | |
>>> format_name("Shah, Saheb") | |
'Saheb Shah' |
# -*- coding: utf-8 -*- | |
import os | |
import scrapy | |
from scrapy.spiders import CrawlSpider, Rule | |
from scrapy.linkextractors import LinkExtractor | |
from hashlib import md5 | |
from pymongo import MongoClient | |
client = MongoClient('localhost', 27017) | |
db = client.skoovbot |
environmental change | |
resistor ladder | |
effects of high altitude on humans | |
mendelian inheritance | |
pellucidar | |
ryōji noyori | |
aphthous stomatitis | |
holonomic brain theory | |
umbilicus (mollusc) | |
destroy all humans! |
parser.add_argument('-v', '--verbose', action='count', default=0) | |
parser.add_argument('-q', '--quiet', action='count', default=0) | |
logging_level = logging.WARN + 10*args.quiet - 10*args.verbose | |
# script -vv -> DEBUG | |
# script -v -> INFO | |
# script -> WARNING | |
# script -q -> ERROR | |
# script -qq -> CRITICAL |