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/create"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
request.AddHeader("Authorization", "Token fcf3081d09f4c8e37a74f1f528bc37c3ca93091e"); | |
request.AlwaysMultipartFormData = true; | |
request.AddParameter("client_id", "xxx"); | |
request.AddParameter("client_secret", "xxx"); | |
request.AddParameter("environment", "sandbox"); | |
request.AddParameter("notify_url", "https://pesapedia.co.ke/api/v2/paypal/cancel/callback"); | |
request.AddParameter("return_url", "https://pesapedia.co.ke/api/v2/paypal/return/callback"); |
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/hello"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.GET); | |
request.AddHeader("Authorization", "Token fcf3081d09f4c8e37a74f1f528bc37c3ca93091e"); | |
request.AlwaysMultipartFormData = true; | |
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/api-token-auth"); | |
client.Timeout = -1; | |
var request = new RestRequest(Method.POST); | |
request.AlwaysMultipartFormData = true; | |
request.AddParameter("username", "xxx"); | |
request.AddParameter("password", "xxx"); | |
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
class PayPalView(APIView): | |
#permission_classes = [HasAPIKey] | |
def PaypalToken(self, client_id, client_secret): | |
url = 'https://api.sandbox.paypal.com/v1/oauth2/token' | |
data = { | |
"client_id": client_id, | |
"client_secret": client_secret, | |
"grant_type": "client_credentials" | |
} |
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 os | |
from selenium import webdriver | |
from time import sleep | |
from colorama import init, Fore, Style | |
init(autoreset=True) | |
def loop1(): # views | |
sleep(20) |
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> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400&display=swap" rel="stylesheet"> | |
<link rel="stylesheet" href="https://res.cloudinary.com/prometheusapi/raw/upload/v1648495012/church_registration/fonts/icomoon/style_piie03.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
from time import sleep, perf_counter | |
import requests | |
def task1(): | |
print("Started Unthreaded Requests") | |
send_sms = requests.get('{{api_url}}?number=254797584194&text=hello') | |
print(send_sms.status_code) | |
start_time = perf_counter() |
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> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<script> | |
//function to validate password. For prototyping purposes | |
function validate() { | |
//read values from inout in sign in page |
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 os, random | |
from django.db import models | |
from django.utils.timezone import now | |
from django.db import models | |
from django.db.models import Model | |
from django.db.models import Sum | |
from django.forms.fields import DateField | |
from django.contrib.admin.widgets import AdminDateWidget |
NewerOlder