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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Irrihub - Unlocking Productivity</title> | |
<link rel="icon" href="https://irri-hub.com/wp-content/uploads/2022/05/favic-150x150.png" sizes="32x32" /> | |
<link rel="icon" href="https://irri-hub.com/wp-content/uploads/2022/05/favic.png" sizes="192x192" /> | |
<link rel="apple-touch-icon" href="https://irri-hub.com/wp-content/uploads/2022/05/favic.png" /> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Irrihub - Unlocking Productivity</title> | |
<link rel="icon" href="https://irri-hub.com/wp-content/uploads/2022/05/favic-150x150.png" sizes="32x32" /> | |
<link rel="icon" href="https://irri-hub.com/wp-content/uploads/2022/05/favic.png" sizes="192x192" /> | |
<link rel="apple-touch-icon" href="https://irri-hub.com/wp-content/uploads/2022/05/favic.png" /> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> |
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 urllib.request | |
from bs4 import BeautifulSoup | |
from urllib.parse import urljoin | |
# Replace the URL below with the URL of the HTML file you want to download src links from | |
base_url = "https://themes.3rdwavemedia.com/profolio/bs5/" | |
html_file = "index.html" | |
url = urljoin(base_url, html_file) | |
# Fetch the HTML content of the URL and parse it using BeautifulSoup |
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
class DownloadVideoAPIView(APIView): | |
def post(self, request): | |
allowed_ips = ['127.0.0.1:5500'] | |
x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR') | |
if x_forwarded_for: | |
return HttpResponseForbidden('Requests from proxy servers are not allowed') | |
if request.META['REMOTE_ADDR'] not in allowed_ips: | |
print(request.META['REMOTE_ADDR']) | |
return HttpResponseForbidden() | |
video_id = request.GET.get('video_id') |
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 pytesseract | |
import cv2 | |
# Read the ID image into memory | |
image = cv2.imread("polo.jpg") | |
# Pre-process the image by converting it to grayscale and applying thresholding | |
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)[1] |
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
var client = new RestClient("https://pesapedia.co.ke/api/v2/paypal/transaction/fetch"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
request.AddHeader("Authorization", "Token fcf3081d09f4c8e37a74f1f528bc37c3ca93091e"); | |
request.AlwaysMultipartFormData = true; | |
request.AddParameter("transaction_id", "5GA24859K8264923D"); | |
IRestResponse response = client.Execute(request); | |
Console.WriteLine(response.Content); |
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
var client = new RestClient("https://pesapedia.co.ke/api/v2/coinbase/transaction/fetch"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
request.AddHeader("Authorization", "Token fcf3081d09f4c8e37a74f1f528bc37c3ca93091e"); | |
request.AlwaysMultipartFormData = true; | |
request.AddParameter("charge_id", "AAAAAAAA"); | |
IRestResponse response = client.Execute(request); | |
Console.WriteLine(response.Content); |
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
var client = new RestClient("https://pesapedia.co.ke/api/v2/coinbase/cancel/charge"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
request.AddHeader("Authorization", "Token fcf3081d09f4c8e37a74f1f528bc37c3ca93091e"); | |
request.AlwaysMultipartFormData = true; | |
request.AddParameter("coinbase_apikey", "XXX"); | |
request.AddParameter("charge_id", "51983a09-f087-48af-8ba4-ec809f27b85e"); | |
IRestResponse response = client.Execute(request); | |
Console.WriteLine(response.Content); |
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
var client = new RestClient("https://pesapedia.co.ke/api/v2/coinbase/create/checkout"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
request.AddHeader("Authorization", "Token fcf3081d09f4c8e37a74f1f528bc37c3ca93091e"); | |
request.AlwaysMultipartFormData = true; | |
request.AddParameter("coinbase_apikey", "YOUR COINBASE API KEY"); | |
request.AddParameter("item_name", "Airtime Safaricom"); | |
request.AddParameter("item_price_in_dollars", "0.82"); | |
request.AddParameter("item_description", "Pre_tups"); | |
IRestResponse response = client.Execute(request); |
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
var client = new RestClient("https://pesapedia.co.ke/api/v2/paypal/order/capture"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
request.AddHeader("Authorization", "Token fcf3081d09f4c8e37a74f1f528bc37c3ca93091e"); | |
request.AlwaysMultipartFormData = true; | |
request.AddParameter("environment", "sandbox"); | |
request.AddParameter("client_id", "xxx"); | |
request.AddParameter("client_secret", "xxx"); | |
request.AddParameter("url", "https://api.sandbox.paypal.com/v2/checkout/orders/2S71025914161602N/capture"); | |
IRestResponse response = client.Execute(request); |