Complete Python semester in 4 hours

I am starting with an MIT course 6-189 which has no video, only pdf, assignments , and solutions. I start by downloading course materials, which gets it in a web directory format ( I hate ) and so I will start with what I need to clean it and layout as I like so I can just flip through it using `kate` `xpdf` `idle` and other utilities to quickly scan for something new that could be useful.


sudo apt-get install tree #shell script to get various types of files for i in `find ./ -name *.py` do echo $i done #end of shell script

After the files are split out into directories I can begin to scan through them with `kate`. echo $i in the above script is replaced with the specific action for each file type. As you can see from the output of the tree command, it has a lot of content associations generated by an automatic method, is my guess. Based on the names I am guessing that I can write and debug the programs in my head and skip most of it. I have done several games and genetic methods and trees and much more already , but I want a new perspective to solidify the common impression I have of what is really going on.

While doing this I am watching some video lectures on spectroscopic analysis and how it relates to the molecular motion. It is something I already understand, but the prof has a new take on the subject. Same goal, identify something which is new or solidify my understanding of the empirical data. If I don't do both at once and also browse the web for related information I get really bored.

If there is anything that strikes me as interesting I will post it as it happens.

function mad { if [ -d $1 ]; then echo "$1 already exists" else mkdir $1 fi } function a { if [ -e $2/$(basename $1) ]; then echo " $(basename $1) already exists in $2" else cp $1 $2/$(basename $1) fi } function fit { for i in `find ./ -name *.$1` do a $i $2 done } mad pys mad pdfs mad txts mad jpg mad zips fit py pys fit pdf pdfs fit txt txts fit jpg jpg fit zip zips

This is how a script looks in `kate` and I don't know why it highlights zip, [ probably because `whereis zip` exists ] but I am sure it has a good reason. The echo is just there to show what the script is doing and serves no purpose. It creates dirs if they don't exist, finds files with specific extensions and if they aren't there already, copies them into that dir. I use three functions "mad" (Make A Directory), "a" (All copy), "fit" ( Find IT ) which use the pass parameters $1 and $2 and "a" is a sub function of "fit". This should be easy to understand.

I indented it for readability like Python , but bash doesn't care.

So I am done and it was about 2 hours actually and most of that was just scanning. It does help as I get more familiar with syntax, but I am not going to fix their Tic-Tac-Toe game so it uses OpenGL or PyGame and has auto play which is verified. Ain't gunna happen twice. Diminishing returns on this level of analysis and I am not sure that there is anything more that is different from what all programs must implement. Since I am done early I am going to make a Python extension for gimp that explodes and completes ( things covered up) the parts of images by methods similar to how a person identifies the parts of an image. I suppose I will create vertex files I can import to blender and my software.

0 comments:

Contributors

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen