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 Calculator(object): | |
| def subtract(self, x, y): | |
| return x-y |
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 requests as req | |
| response = req.get('https://github.com/apps/devnet-app') | |
| print (response.status_code) | |
| if response.status_code == 200: | |
| print('Success!') |
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 requests as req | |
| response = req.get('https://github.com/apps/devnet-app/blah') | |
| print (response.status_code) | |
| if response.status_code == 200: | |
| print('Success!') |
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 requests | |
| import json | |
| token = 'N3h5OJYadMUFBYqhxkX6XOozRBI4RJSZlsB3' | |
| url = 'https://gorest.co.in/public-api/users' | |
| data = {"email":"email7@example.com","first_name":"devnet","last_name":"associate","gender":"male"} |
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 requests | |
| import json | |
| token = 'B3h5OJYadMUFBYqhxkX6XOozRBI4RJSZlsB3' #wrong token supplied | |
| url = 'https://gorest.co.in/public-api/users' | |
| data = {"email":"email8@example.com","first_name":"devnet","last_name":"associate","gender":"male"} |
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 requests | |
| from cryptography.hazmat.backends import default_backend | |
| import jwt | |
| import time | |
| fname = 'devnet-app.2019-09-28.private-key.pem' |
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 requests | |
| import json | |
| token = 'z8-sXMth942nOiQqXuikCNjbamrAlI2IjS7g' | |
| url = 'https://gorest.co.in/public-api/users' | |
| data = {"email":"em@tesla.com","first_name":"elon","last_name":"musk","gender":"male"} |
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 requests | |
| import json | |
| token = 'z8-sXMth942nOiQqXuikCNjbamrAlI2IjS7g' | |
| url = 'https://gorest.co.in/public-api/users/1571' | |
| result = requests.get(url, |
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 requests | |
| import json | |
| token = 'z8-sXMth942nOiQqXuikCNjbamrAlI2IjS7g' | |
| url = 'https://gorest.co.in/public-api/users/1571' | |
| data = {"phone":"510-123-4567"} |
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 requests | |
| import json | |
| token = 'z8-sXMth942nOiQqXuikCNjbamrAlI2IjS7g' | |
| url = 'https://gorest.co.in/public-api/users/1571' | |
| data = {"email":"ja@honest.com","first_name":"Jessica","last_name":"Alba","gender":"female"} |