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
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
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 requests | |
#from selenium import webdriver | |
from bs4 import BeautifulSoup as bs | |
inp=input("Enter flipkart link of the product- ") | |
#chromedriver = "C:\\Users\\crazy\\Desktop\\chromedriver" | |
#driver=webdriver.Chrome(chromedriver) | |
#driver.get(inp) | |
#price=driver.find_element_by_xpath('/html/body/div[1]/div/div[3]/div[2]/div[1]/div[2]/div[2]/div/div[3]/div[1]/div/div[1]') | |
#print(price) | |
txt=requests.get(inp).text |
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 bs4,requests | |
import webbrowser,re,time | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
inp=input('Enter your search: ') | |
a='https://www.youtube.com/results?search_query=' |
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
#Dictionaries are created by {} or using dict() function. | |
Dict1={'Hello':"World",2:"two",3:4,"List":[1,2,5,6]} | |
Dict2=dict(Key='Value',Integer=10) | |
print(Dict1) | |
print(Dict2) | |
#Length of Dictionary is given by len() | |
print(len(Dict1)) | |
print(Dict1[2]) #printing value of keyword '2' (Note its not printing acc to index) | |
print(Dict1.get("Hello")) #get() method to get the value of a key | |
Dict1['Hello']="Everyone" #changing the value of key 'Hello' |
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
#Linked list in python | |
class node: #creating a class called node. All nodes created in code are objects of this node class. | |
def __init__(self, value): #crustructor (automatically called when an object is made) | |
self.data=value | |
self.next=None #next contains points to the next node.There is nothing to point at initially so here its None | |
class LinkedList: | |
def __init__(self): | |
self.head=node(None) #head node has no data and points to the first element in the linked list. | |
def append(self, value): #Member function to append data at end. | |
new=node(value) #created a new node with value to be appended |
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
#Lists in python | |
#Lists are created using [] | |
List1=[1,2,3,"Hello",5.5,1+2j] #List1 having 6 elements | |
List2=[3,4,"World",1.0] #List2 having 4 elements | |
print("List1=",List1,'\n',"List2=",List2) | |
#To find lenght of list, we use len() | |
print("The length of List1-",len(List1)) | |
#To add any element at end of the list, we use append() | |
List1.append("new_element") | |
print("List1 after adding new element",List1) |