So Python is picky about indentation?

I’m trying to figure out where best to learn about Python (short of years’-outdated online videos), so where better to begin than by eliminating any old habits I picked up from other languages?, like arbitrary indentation >>>

Is there a fast.ai cheat sheet of common Python commands used in Deep Learning?

Woah. This is definitely a cool idea to have all the python commands for fast.ai in one place. Would definitely like to contribute.

Just a few things. PEP8 is a coding style for python. There are quite a few things which are included in pep8 but are not required by python, nonetheless it is a good habit to use pep8 coding style. Most editors have pep8 extensions which can point you out if there is any problems with the code indentation or style.

For starters I would definitely look at any python basic tutorials, mainly simple string indexing, understanding basic structures like list, tuples, dict. Once this is done, I would look at numpy tutorial. After that matplotlib library for plotting. After this, only pytorch would remain which one can pickup while fiddling with the course.

The best link I know is http://cs231n.github.io/python-numpy-tutorial/. It more or less provides a very nice tutorial for most things that you would require for starters. While it is not a cheat sheet, it indeed contains everything that is essential for python beginners.

Cheers

2 Likes

Reading deeper into the fast.ai course material, my 48-year-old pickled brain is berating me for not being taught logarithms when learning the digital signal processing equation A*e^(i*n*t) = A*cos(n*t) + A*i*sin(n*t) in school—not that the fast.ai curriculum requires DSP—where:

  • A = amplitude. On a compact disc, 16 bits.
  • e = Euler’s number 2.718281828459
  • t = sample rate. On a compact disc 44,100K samples (n) per second to account for twice the highest human auditory frequency. Half the sampling rate is called the Nyquist frequency.
  • n = sample index
  • cos = cosine. 0 degree = 1, 90 degree = 0
  • sin = sine. 0 degree = 0, 90 degree = 1
  • i = the imaginary √-1

I’m at a complete loss when it comes to dealing with imaginary numbers anymore, but solving the DSP equation by hand resembles butterflies. “Nobody ever suspects the butterfly.”

In the USA, businesses discourage teens from loitering by playing opera music from storefront speakers. In the UK they’d play an annoyingly high-pitched shrill to shoo away the kids. Eventually the “mosquito ringtone” (19 kHz) was born which kids in class can hear, but not their adult teachers experiencing natural age-related hearing loss.

Flicker Fusion Frequency - Have you ever seen one bird chasing another through the air at breakneck speed, and wondered how it keeps from colliding with branches?

For the ROTC crew…