Skip to content

Instantly share code, notes, and snippets.

@aolufisayo
Last active June 7, 2020 19:56
Show Gist options
  • Save aolufisayo/0d32014f03b0709065140b81f1b80df2 to your computer and use it in GitHub Desktop.
Save aolufisayo/0d32014f03b0709065140b81f1b80df2 to your computer and use it in GitHub Desktop.
my notes to the udacity artificial intelligence foundations.

software engineering practices part 1 - lesson two

  1. python codes should be indented by 4 spaces.
  2. python doc strings are denoted by three double quotes.
  3. a module is just a file. it allows code to be reusable by encapsulating them into a file which makes it easier to import into other files.
  4. production code is software running on production servers to handle live users and data of the intended audience.
  5. a code is modular if it is logically broken up into functions and modules.
  6. limit python code lines by 79 characters ( as specified by pep guidelines )
  7. types of documentation -line level (inline comments) -function or module level -project level

software engineering practices part 2 - lesson three

  1. test driven development is writing tests before writing code that is being tested.
  2. tests can check for every edge cases and scenarios. Implementing a function in test driven development gives immediate feedback about the code being tested.
  3. when refactoring, tests help confirm that the rest of our code didn't break during the process.
  • benefits of code reviews
    1. catch errors
    2. ensure readability
    3. check standards are met.
    4. share knowledge among a team.
  • advantages of unit tests
    1. they are isolated from other parts of your code thus doesn't require access to the database or api.

software engineering practices part 3 - lesson four

install and manage python installion environments with conda:

  • conda create --name environmentname
  • source activate environmentname
  • conda install numpy Conda manages environments AND packages. Pip only manages packages.

commands used to upload projects to pypi

cd binomial_package_files python setup.py sdist pip install twine

commands to upload to the pypi test repository

twine upload --repository-url https://test.pypi.org/legacy/ dist/* pip install --index-url https://test.pypi.org/simple/ dsnd-probability

command to upload to the pypi repository

twine upload dist/* pip install dsnd-probability

software engineering practices part 4 - lesson five

generative ai lets the computer learn the underlying pattern associated with the provided input and lets the model to create new content. Examples of generative ai techniques includes transformers, auto encoders and generative adversary networks.

GANs, a generative AI technique, pit 2 networks against each other to generate new content. The algorithm consists of two competing networks: a generator and a discriminator.

A generator is a convolutional neural network (CNN) that learns to create new data resembling the source data it was trained on.

The discriminator is another convolutional neural network (CNN) that is trained to differentiate between real and synthetic data.

When the training loop has passed through the entire training dataset once, we call that one epoch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment