Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .01_github.py.swp
Binary file not shown.
Binary file added .02_github.py.swp
Binary file not shown.
Binary file added .index.html.swo
Binary file not shown.
Binary file added .index.html.swp
Binary file not shown.
7 changes: 7 additions & 0 deletions aws.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import boto3

s3 = boto3.resource('s3', aws_access_key_id= "AKIAXCLWW4HVEZUTRTKA", aws_secret_access_key= "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")

s3.create_bucket(Bucket='gjgj667745asasdasd')

s3.meta.client.upload_file('/home/gb760/Lab02/hello.txt', 'gjgj667745asasdasd', 'hello.txt')
1 change: 1 addition & 0 deletions hello.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
25 changes: 25 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python

import json # to parse JSON
import requests # to make HTTP requests
import argparse # to parse command-line arguments
import time

if __name__ == "__main__":
url_1 = "https://api.github.com/emaadmanzoor"
r = requests.get(url_1)
#print(r.status_code)
#print(r.json())

a=5
while a>0 :
if r.status_code != 200:
time.sleep(3)
r = requests.get(url_1)
a=a-1
print(r.status_code)
if a == 0:
print(r.json()["message"])
else:
print(r.json())
break