Skip to content

Instantly share code, notes, and snippets.

@CodeWithHarry
CodeWithHarry / pymongoTutorial.py
Created April 17, 2022 12:46
This gist contains the code written in PyMongo in one video by CodeWithHarry on YouTube - https://youtu.be/X3eSATZhXp0
import pymongo
connectionString = "mongodb+srv://username:[email protected]/test"
def insertDocument():
studentInfo = {
"name": "Drake",
"section": 2,
@CodeWithHarry
CodeWithHarry / Tic-Tac-Toe.py
Created April 30, 2022 05:36
Code for the tic tac toe game we created in this video: https://youtu.be/E8fmDDtaHLU on CodeWithHarry channel on YouTube
def sum(a, b, c ):
return a + b + c
def printBoard(xState, zState):
zero = 'X' if xState[0] else ('O' if zState[0] else 0)
one = 'X' if xState[1] else ('O' if zState[1] else 1)
two = 'X' if xState[2] else ('O' if zState[2] else 2)
three = 'X' if xState[3] else ('O' if zState[3] else 3)
four = 'X' if xState[4] else ('O' if zState[4] else 4)
five = 'X' if xState[5] else ('O' if zState[5] else 5)
@CodeWithHarry
CodeWithHarry / Source code for Amazon Reviews Extraction
Created July 10, 2022 06:50
The code we wrote for the Amazon review extraction videos on CodeWithHarry and ProgrammingWithHarry YouTube channels
import requests
import pandas as pd
from bs4 import BeautifulSoup
import random
reviewlist = []
def getRandomProxy():
# Using Proxy