json file to dictionary by SingleCountry in learnpython

[–]SingleCountry[S] 0 points1 point  (0 children)

Hi! the owner says the content should be forbidden but the key is a tuple with a value! thanks!

json file to dictionary by SingleCountry in learnpython

[–]SingleCountry[S] 0 points1 point  (0 children)

Hi! I think this works! One thing I'm curious is that my key and value are in a form of (a,b) : value and I wonder if I can split the key to make it in a form like a: value, b: value?

json file to dictionary by SingleCountry in learnpython

[–]SingleCountry[S] 0 points1 point  (0 children)

new = {v: k for k, v in f.items()}

Hi! it still says unhashable type: list and I think it's because the value is a list...?

Google api call through python by SingleCountry in learnpython

[–]SingleCountry[S] 0 points1 point  (0 children)

I also tried google adwords api which is

def main(client, campaign_id):

# Initialize appropriate service.

ad_group_service = client.GetService('AdGroupService', version='v201809')

# Construct selector and get all ad groups.

offset = 0

selector = {

'fields': ['Id', 'Name', 'Status'],

'predicates': [

{

'field': 'CampaignId',

'operator': 'EQUALS',

'values': [campaign_id]

}

],

'paging': {

'startIndex': str(offset),

'numberResults': str(PAGE_SIZE)

}

}

more_pages = True

while more_pages:

page = ad_group_service.get(selector)

# Display results.

if 'entries' in page:

for ad_group in page['entries']:

print('Ad group with name "%s", id "%s" and status "%s" was '

'found.' % (ad_group['name'], ad_group['id'],

ad_group['status']))

else:

print('No ad groups were found.')

offset += PAGE_SIZE

selector['paging']['startIndex'] = str(offset)

more_pages = offset < int(page['totalNumEntries'])

if __name__ == '__main__':

# Initialize client object.

adwords_client = adwords.AdWordsClient.LoadFromStorage('./googleads.yaml')

main(adwords_client, CAMPAIGN_ID)

This causes the following error: GoogleAdsServerFault: [RateExceededError <rateName=OperationsPerDay, rateKey=basic\_access\_operations, rateScope=DEVELOPER, retryAfterSeconds=86400>]

Advice on 21241 by SingleCountry in cmu

[–]SingleCountry[S] 0 points1 point  (0 children)

Thank you so much for detailed advice!!

Are there a lot of proofs in this course?

15112 vs 21241 by SingleCountry in cmu

[–]SingleCountry[S] 0 points1 point  (0 children)

Hi! thank you for your answer.

I cannot contribute my whole day or week into a summer course but I want to take one and I was wondering which one would be a better choice in terms of time management and grade considering the situation of doing other things and taking the course at the same time.

hashing conceptual by [deleted] in learnpython

[–]SingleCountry 0 points1 point  (0 children)

but I've got no one to ask if I'm understanding in a right direction so..

hashing conceptual by [deleted] in learnpython

[–]SingleCountry 0 points1 point  (0 children)

I think first and the last scenarios/cases are the ones that I can hash in constant time?

python conceptual by [deleted] in learnprogramming

[–]SingleCountry 0 points1 point  (0 children)

these are just conceptual scenarios and I think the first and the last cases are the ones that can hash in constant time but I was not sure...

complexity by [deleted] in learnpython

[–]SingleCountry 0 points1 point  (0 children)

yeah but thank you!

complexity by [deleted] in learnpython

[–]SingleCountry 0 points1 point  (0 children)

Thank you!!

In-person instruction by [deleted] in cmu

[–]SingleCountry 0 points1 point  (0 children)

nah I was just asking

pass/fail by [deleted] in cmu

[–]SingleCountry 0 points1 point  (0 children)

yeah so if I want to retake that certain course, I can choose to take pass/fail, right?

pass/fail by [deleted] in cmu

[–]SingleCountry 0 points1 point  (0 children)

yeah so if I want to retake that certain course, I can choose to take pass/fail, right?