Small notes changes. Added HackerRank Internal's Templates

This commit is contained in:
Norm Rasmussen
2023-02-13 13:35:02 -05:00
parent 747bb47464
commit 0a322b8f3a
333 changed files with 1881 additions and 106 deletions

BIN
Scripts/.DS_Store vendored

Binary file not shown.

View File

@ -2,64 +2,62 @@ import requests
apiKey = "Bknf8kidbluRfcKu3m3lKoxS8"
groups = [
"Armonk",
"Babylon",
"Bayside",
"Bedford",
"Cutchogue",
"East Hampton",
"East Setauket",
"Executive",
"Farmingville",
"Franklin Square",
"Garden City",
"Great Neck",
"Greenport",
"Hampton Bays",
"Hamptons",
"Huntington",
"Huntington Station",
"Katonah",
"Locust Valley",
"Long Beach",
"Long Island",
"Long Island City",
"Manhasset",
"Manhattan",
"Massapequa Park",
"Mattituck",
"Merrick",
"Montauk",
"New Hyde Park",
"New York",
"North Fork",
"Ocean Beach",
"Plainview",
"Port Washington",
"Queens",
"Quogue",
"Rockville Centre",
"Roslyn",
"Sag Harbor",
"Sayville",
"Scarsdale",
"Sea Cliff",
"Smithtown",
"Southampton",
"Syosset",
"Westchester",
"Westhampton Beach"
]
"Armonk",
"Babylon",
"Bayside",
"Bedford",
"Cutchogue",
"East Hampton",
"East Setauket",
"Executive",
"Farmingville",
"Franklin Square",
"Garden City",
"Great Neck",
"Greenport",
"Hampton Bays",
"Hamptons",
"Huntington",
"Huntington Station",
"Katonah",
"Locust Valley",
"Long Beach",
"Long Island",
"Long Island City",
"Manhasset",
"Manhattan",
"Massapequa Park",
"Mattituck",
"Merrick",
"Montauk",
"New Hyde Park",
"New York",
"North Fork",
"Ocean Beach",
"Plainview",
"Port Washington",
"Queens",
"Quogue",
"Rockville Centre",
"Roslyn",
"Sag Harbor",
"Sayville",
"Scarsdale",
"Sea Cliff",
"Smithtown",
"Southampton",
"Syosset",
"Westchester",
"Westhampton Beach",
]
def findgroupIDs(apiKey, groups):
groupuuids = []
badGroups = []
for group in groups:
url = "https://api.northpass.com/v2/groups?filter[name][eq]="
headers = {
"accept": "application/json",
"X-Api-Key": apiKey
}
headers = {"accept": "application/json", "X-Api-Key": apiKey}
response = requests.get(url + group, headers=headers)
response = response.json()
try:
@ -69,26 +67,22 @@ def findgroupIDs(apiKey, groups):
badGroups.append(group)
finally:
pass
#print(badGroups)
#print(groupuuids)
assignCourse(apiKey,url, groupuuids)
# print(badGroups)
# print(groupuuids)
assignCourse(apiKey, url, groupuuids)
def assignCourse(apiKey, url, groupuuids):
for group in groupuuids:
try:
try:
url = f"https://api.northpass.com/v2/groups/{group}/relationships/courses"
courseuuid = "10e9b174-cbad-4caa-b0ff-1a7338f2345a"
headers = {
"accept": "application/json",
"content-type": "application/json",
"X-Api-Key": apiKey
"X-Api-Key": apiKey,
}
payload = {"data": [
{
"type": "courses",
"id": courseuuid
}
]}
payload = {"data": [{"type": "courses", "id": courseuuid}]}
print(f"Group {group} successfully accepted the course")
response = requests.post(url, json=payload, headers=headers)
except:
@ -96,5 +90,6 @@ def assignCourse(apiKey, url, groupuuids):
finally:
pass
if __name__ == "__main__":
findgroupIDs(apiKey, groups)

BIN
Scripts/Backup/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Some files were not shown because too many files have changed in this diff Show More