Hello, my name is Sohaib and I am passionate about Artificial Intelligence.
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
""" | |
# Draft Email on you Gmail Account | |
## Author: Sohaib Anwaaar | |
### Description: | |
Create Email Draft in your gmail account | |
### Create Credentials.json |
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
name: Zappa Deployment | |
env: | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
DB_HOST: ${{ secrets.DB_HOST }} | |
KEY_ID: ${{ secrets.KEY_ID }} | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
on: | |
push: |
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
--- | |
version: '2' | |
services: | |
zk: | |
image: confluentinc/cp-zookeeper:6.1.1 | |
hostname: zk | |
container_name: zk | |
ports: | |
- "2181:2181" | |
environment: |
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
from selenium.webdriver import Chrome | |
from selenium.webdriver.chrome.options import Options | |
options = Options() | |
options.binary_location = '/opt/headless-chromium' | |
options.add_argument('--headless') | |
options.add_argument('--no-sandbox') | |
options.add_argument('--start-maximized') | |
options.add_argument('--start-fullscreen') |
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
################################################################################### | |
# | |
# Decode Image and use in your API | |
# | |
# | |
################################################################################### | |
def string_to_ndarray(image_str: str) -> np.ndarray: |
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
#!/bin/bash | |
## This gist contains instructions about cuda v11.2 and cudnn 8.1 installation in Ubuntu 18.04 for PyTorch | |
############################################################################################# | |
##### forked by : https://gist.github.com/Mahedi-61/2a2f1579d4271717d421065168ce6a73 ######## | |
############################################################################################# | |
### steps #### | |
# verify the system has a cuda-capable gpu |
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 datetime | |
import logging | |
class Logger: | |
def setup_logger(self, name, log_file, level=logging.INFO): | |
"""To setup as many loggers as you want""" | |
formatter = logging.Formatter( | |
'%(asctime)s %(name)s - %(levelname)s - %(message)s') |
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 boto3 | |
from botocore.exceptions import NoCredentialsError | |
import requests | |
import mimetypes | |
import time | |
import random | |
AWS_STORAGE_BUCKET_NAME = "backend-s3-assets" | |
AWS_S3_ACCESS_KEY_ID = "*********" | |
AWS_S3_SECRET_ACCESS_KEY = "************************************" |
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 boto3 | |
from botocore.exceptions import NoCredentialsError | |
import requests | |
import mimetypes | |
import time | |
import random | |
AWS_STORAGE_BUCKET_NAME = "*********************" | |
AWS_S3_ACCESS_KEY_ID = "****************" |
NewerOlder