This file contains hidden or 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 pathlib import Path | |
| # Creating a file | |
| file = Path("example.txt") | |
| file.write_text("Hello, Pathlib!") | |
| # Reading the file | |
| print(file.read_text()) | |
| # Checking existence |
This file contains hidden or 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 React, { useContext, useState, useEffect } from "react"; | |
| import { | |
| createUserWithEmailAndPassword, | |
| signInWithEmailAndPassword, | |
| onAuthStateChanged, | |
| signOut, | |
| GoogleAuthProvider, | |
| signInWithPopup, | |
| sendPasswordResetEmail, | |
| confirmPasswordReset, |
This file contains hidden or 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 React, { useContext, useState, useEffect } from "react"; | |
| import { | |
| createUserWithEmailAndPassword, | |
| signInWithEmailAndPassword, | |
| onAuthStateChanged, | |
| signOut, | |
| GoogleAuthProvider, | |
| signInWithPopup, | |
| } from "firebase/auth"; | |
| import { doc, setDoc } from "firebase/firestore"; |
This file contains hidden or 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 { BrowserRouter as Router, Route, Routes } from "react-router-dom"; | |
| import "react-notifications/lib/notifications.css"; | |
| import { NotificationContainer } from "react-notifications"; | |
| import { createStore, combineReducers, applyMiddleware } from "redux"; | |
| import { Provider } from "react-redux"; | |
| import ReduxThunk from "redux-thunk"; | |
| import Homescreen from "./Screens/Homescreen/Homescreen"; // | | |
| import PagenotFound from "./Screens/PageNotFound/PagenotFound"; // | | |
| import ForgotPassword from "./Screens/ForgotPassword/ForgotPassword"; // | |
This file contains hidden or 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 React from "react"; | |
| const PagenotFound = () => { // Change here the Name accordingly | |
| return ( | |
| <div> | |
| <h1>Page Not Found</h1> | |
| {/* Chnage here accordingly too */} | |
| </div> | |
| ); | |
| }; |
This file contains hidden or 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 { createStore, combineReducers, applyMiddleware } from "redux"; | |
| import { Provider } from "react-redux"; | |
| import ReduxThunk from "redux-thunk"; | |
| import Homescreen from "./Screens/Homescreen/Homescreen";// | | |
| import PagenotFound from "./Screens/PageNotFound/PagenotFound";// | | |
| import ForgotPassword from "./Screens/ForgotPassword/ForgotPassword";// | | |
| import UserActions from "./Screens/UserActions/UserActions";// | | |
| import Upload from "./Screens/Upload/Uplaod";// | Some screens with dummy data (FOR NOW) | |
| import WatchScreen from "./Screens/WatchScreen/WatchScreen";// | |
This file contains hidden or 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 { SET_UserDetails } from "../actions/Auth"; | |
| const initialState = { | |
| userInfo: null, | |
| }; | |
| export default (state = initialState, action) => { | |
| switch (action.type) { | |
| default: | |
| return state; |
This file contains hidden or 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 | |
| import re | |
| from bs4 import BeautifulSoup | |
| headers = { | |
| "User-Agent":'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36'} | |
| st = input("enter from:") | |
| sto = input("enter to:") | |
| base = 'https://www.google.com/search?safe=active&rlz=1C1YQLS_enIN897IN897&biw=1366&bih=657&sxsrf=ALeKk02Y8GEcD4XWh64yCvecTCetld-HZQ%3A1608364202503&ei=qrDdX5WVHtSprtoPmu6HiA0&q=distance+between+' | |
| url = (base+st+'+and+'+sto) |