Skip to content

Instantly share code, notes, and snippets.

View 1UC1F3R616's full-sized avatar
:shipit:
Attention is All You Need

Kush Choudhary 1UC1F3R616

:shipit:
Attention is All You Need
View GitHub Profile

CRUD

# pip install python-firebase

from firebase import firebase

firebase = firebase.FirebaseApplication("https://hale-ivy-111111s.firebaseio.com/", None)

data = {
    'Name':'Kush',

Read Write and Destory

import cv2
import numpy as np

def debug(x):
    print('\n\n{}\n\n'.format(str(x)))

image = 'images/image2.jpg'

To get Time

MOV DL,':'    ; To Print : in DOS
MOV AH,02H
INT 21H

;Seconds Part
Seconds:
MOV AH,2CH    ; To get System Time
INT 21H
  • Linear vs Non-Linear Classifier
  • White vs Black box
  • Perceptron, it's types and failure
    • MCNeuron has no concepts of weight so it gives equal weight to all nodes. It has no bias layers, only input and output and step function
  • Artificial Neural Network
    • Dense
    • Partial
    • Number of layers has no rule
    • By default Gradient Decent is used for error correction
  • Nothing but Matrix Algebra and a sequence of Matrix Operations

SELENIUM

    email = driver.find_element_by_name('email')
    print(dir(email))
    
    ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', 
    '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', 
    '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', 
    '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', 
    '__str__', '__subclasshook__', '__weakref__', '_execute', '_id', '_parent',

Major issues

  • Scraping the code <> using selenium

Code-Dated: 1-4-19| 6:10

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
  • A neural network is basically a set of functions which can learn patterns
  • TensorFlow allows developers to create dataflow graphs—structures that describe how data moves through a graph, or a series of processing nodes. Each node in the graph represents a mathematical operation, and each connection or edge between nodes is a multidimensional data array, or tensor.

NLP

Tokeniz

from tensorflow.keras.preprocessing.text import Tokenizer
sentences = [
  'i love my dog',
  'I, love my cat'
@1UC1F3R616
1UC1F3R616 / webscrappingsession2.ipynb
Created April 10, 2020 09:23
WebScrappingSession2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.