Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC309 Lecture 10

CSC309 Lecture 10

Software Engineering II
Connecting Services II
(202304)

Javier Gonzalez-Sanchez

January 31, 2023
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs CSC 309 Software Engineering II Lecture 10: Connecting Services

    II Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
  2. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    4 Bing Maps Box Name 1 Name 2 Cat Car What is a Flowchart diagram? _
  3. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    8 Let’s Work Code I will pay soon
  4. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    10 What if …? Box Name 1 Name 2 Cat Car What is a Flowchart diagram? _
  5. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    11 1.Go to the AccuWeather Developer website at https://developer.accuweather.com/ 1.Sign up for a free account by filling out the registration form or sign in using your existing account credentials. 2.Once you're signed in, select the "My Apps" dropdown from the top-right corner of the page and click on "Add New App". 3.Fill out the required information about your application and agree to the terms of service. Then click on "Create App". 4.Your new app will appear on the "My Apps" page. Click on your app to view your API key and copy it to use in your code. AccuWeather
  6. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    12 { "LocalObservationDateTime": "2023-04-23T00:04:0007:00", "EpochTime":1682233440, "WeatherText":"Clear", "WeatherIcon":33, "HasPrecipitation":false, "PrecipitationType":null, "IsDayTime":false, "Temperature":{ "Metric":{ "Value":11.1, "Unit":"C", "UnitType":17 }, "Imperial":{ "Value":52.0, "Unit":"F", "UnitType":18 } }, "Link":"http://www.accuweather.com/en/us/san-luis-obispo-ca/93401/current- weather/331999 } Response
  7. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    13 Java Script Object Notation (JSON) •Data is in name/value pairs •Commas separate data •Curly braces hold objects •Square brackets hold arrays JSON XML
  8. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    19 What if …? Box Name 1 Name 2 Cat Car What is a Flowchart diagram? _
  9. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    20 1.Go to the OpenAI website at https://openai.com/ and click on the "Sign Up" button in the top-right corner of the page. 2.Follow the prompts to create an account and verify your email address. 3.Once you're logged in, click on your username in the top-right corner of the page and select "Dashboard" from the drop-down menu. 4.Click on the "API Keys" tab in the dashboard menu. 5.Click on the "New API Key" button. 6.Enter a name for your API key and select the API permissions you want to grant to the key. 7.Click the "Create" button to generate your new API key. Open AI
  10. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    21 {"id":"cmpl78QWL0xfnaEHWzTuCJZhpBK3OshrR", "object":"text_completion", "created":1682242925, "model":"text-davinci-003", "choices":[{ "text":"ANSWER TEXT HERE", "index":0, "logprobs":null, "finish_reason":"stop" }], "usage":{ "prompt_tokens":1, "completion_tokens":76, "total_tokens":77 } } Response
  11. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    28 Office Hours Tuesday and Thursday 3 - 5 pm But an appointment required Sent me an email – [email protected]
  12. jgs

  13. jgs CSC 309 Software Engineering II Lab 10: Work in

    your Sprint Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
  14. jgs CSC 309 Software Engineering II Javier Gonzalez-Sanchez, Ph.D. [email protected]

    Winter 2023 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.