Skip to content

Instantly share code, notes, and snippets.

View edrisranjbar's full-sized avatar
🏠
Working from home

Edris Ranjbar edrisranjbar

🏠
Working from home
View GitHub Profile
@edrisranjbar
edrisranjbar / SendWhatsappMessage.py
Created August 30, 2022 20:08
Send whatsapp message using python and selenium
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
driver = webdriver.Chrome(service=Service(
ChromeDriverManager().install()
@andreagrandi
andreagrandi / permissions.py
Created September 30, 2016 09:49
IsAdminOrReadOnly is a custom Django Rest Framework permission class that allows Admin users to POST and anonymous to GET
from rest_framework.permissions import BasePermission, SAFE_METHODS
class IsAdminOrReadOnly(BasePermission):
def has_permission(self, request, view):
if request.method in SAFE_METHODS:
return True
else:
return request.user.is_staff
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 21, 2024 17:56
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites