[Chicago] Just sharing with everyone in the group.

Lewit, Douglas d-lewit at neiu.edu
Wed Mar 4 00:53:06 CET 2015


Oh I know, I found a "hammer" that works and now I want to strike every
nail with it.  But I'm semi-new to Python and the whole object-oriented
thing is kind of interesting.  Also, it's amazing how fast the linked list
implementation works compared to using recursion for the Fibonacci series.
With recursion it takes FOREVER, especially if n is some integer larger
than let's say 40 or something like that.

On a totally different subject.... does anyone in the group know anything
about a Kali Linux installation???  PLEASE HELP!  Long story, I have (or
had) Ubuntu on my HP PC.  (I have three laptops actually, two Macs and one
PC.)  Okay, the Ubuntu installation is pretty painless and whoever wrote
the install program did an awesome job.  Someone in my data structures
class showed me Kali Linux and my first reaction was, WOW!!!!  So I thought
I would get clever and do a dual boot, Ubuntu and Kali together on the same
hard drive.  Well I managed to download and configure (after much research
via Google) a thumb drive with .iso on it.  The problem is that if you boot
off the thumb drive, sure Kali Linux works just great, but your changes
won't be saved.  You can change the date, time, create files, change the
font size in Terminal, etc, etc, but then when shut down the computer and
boot back into a Live session of Kali Linux all your changes and files are
gone.... so why bother?  So.... I tried a Graphical Install of Kali Linux
after shrinking my partition with Ubuntu on it, right?  All was fine and
copacetic, no problems.  I used GParted and the partitions were created,
okay--lovely.  THEN THINGS GOT REALLY F--KED up when I did the Graphical
Installation of Kali.  (No doubt the Hindu goddess Kali put a curse on me
or my computer!!!!)  The installer prompted me for all this technical
information about my network in order to configure the apt command.  (In
Linux you can use "apt" to install updates and programs from the nearest
repository or "mirror".)  I mean.... I know the name and password for my
wireless setup, but I don't have all this other techie info about my
"network"!  So the Installer warned me that I would have a minimal
installation.  Okay, fine.  So then when I booted up to Kali, it would not
accept my username and password!!!!  So I said screw it, I'll just erase
the partition that contains Kali.... A VERY DUMB THING TO DO!  Because the
Kali Linux partition contained Grub!!!!!  So..... I screwed myself
royally.  I just decided to insert the Ubuntu CD and do a fresh install of
Ubuntu--which of course means that all my files on the previous install got
erased!  (Yes, I have a backup on an external hard drive, but for some
reason Ubuntu's default backup program isn't reading the backup!  Very
strange since the backup is made up entirely of .tar.gz files, which should
be very easy for Ubuntu to read!!!!!)

Totally frustrated here!  Two questions:

1.  What's a good backup program/strategy for Linux (especially the Ubuntu
distro) that is on par with Apple's Time Machine backup program.  (Time
Machine rocks!  It is without question the best backup program out there,
but it only works on Macs.)

2.  Does anyone out there in Chicago Python land have any experience with
the Kali Linux installation???  It sounds like a great OS to play with....
and besides, I love their dragon logo!  (I know, how superficial of me to
choose an OS just for its logo, right?  Well I figure that any OS that uses
the dragon as its main symbol must be worth checking out, right?!  LOL!)

Well.... there's nothing like wiping your hard drive clean and NOT being
able to read your backed up files on your external hard drive!  When I
realized what I had done to my computer my stomach sank to the floor and I
had a really sick feeling, but.... I guess this inevitably happens when you
spend a lot of time messing around with computers, huh?

Am I really dumb or what?

Thanks for the feedback!  Any information would be helpful.

Kind regards,

Douglas Lewit



On Tue, Mar 3, 2015 at 11:18 AM, Japhy Bartlett <japhy at pearachute.com>
wrote:

> Spaces and tabs both work, but if you mix them it creates a terrible
> mess.  So by convention, we all agreed to use spaces for our collective
> sanity.
>
>
> I wanted to make another very slight criticism of your code; often when
> people start learning Python they get to the part about classes and
> inheritance and start using classes for everything.  So it's good to see
> that you've figured out how that works, but it's not really helpful to your
> program.  I can see ways that all could be much simpler!
>
>
> Well done though, and thank you for posting actual Python code :)
>
> - Japhy
>
> On Tue, Mar 3, 2015 at 10:57 AM, Lewit, Douglas <d-lewit at neiu.edu> wrote:
>
>> I was thinking about that last night!  ;-)   So then I assume that "None"
>> is equivalent to Java's null, but according to what you wrote above "None"
>> evaluates to False in a truth test?  I didn't know that!  Very cool.
>>
>> What's the difference between spaces and tabs?  My favorite text editors
>> for program writing are the Unix/Linux/Mac editors *Vim* and *Emacs*.
>> Both of those have builtin tab functions.  Emacs is especially good with
>> deciding where to place tab indentations.  Vim is okay too, but Emacs is
>> really, really good.
>>
>> I repeated the same program in Python 3.  Some interesting changes!  10/3
>> gives you 3 in Python 3.  10/3 gives you 3.333333333333 in Python 3.  To
>> get 3 you need 10//3.  We all know about the print function.  And some
>> other changes too.  Do you think the language benefitted from these
>> backward INcompatible changes?  I think the Python community is still
>> wondering about that.
>>
>> On Mon, Mar 2, 2015 at 4:40 PM, Brian Ray <brianhray at gmail.com> wrote:
>>
>>>
>>> i probably meant ""while L.next.next", but you get what I mean, I hope.
>>>
>>> On Mon, Mar 2, 2015 at 4:38 PM, Brian Ray <brianhray at gmail.com> wrote:
>>>
>>>> Just some small formatting issues. Try to use spaces (4) not tabs.
>>>>
>>>> and "while not L.next.next" is preferred over "while L.next.next !=
>>>> None"
>>>>
>>>>
>>>>
>>>> On Fri, Feb 27, 2015 at 5:57 PM, Lewit, Douglas <d-lewit at neiu.edu>
>>>> wrote:
>>>>
>>>>> Hey guys--and ladies too!  It's been a while since I shared any Python
>>>>> work with this forum, so I figured hey, why not?
>>>>>
>>>>> This is my first effort at implementing a *linked list* in Python.
>>>>> Fun stuff!  I'm taking a Java data structures course right now at
>>>>> Northeastern.  Java is a nice language, and according to the online
>>>>> statistics Java is the king of all programming languages, at least for
>>>>> right now.  (The computer world is extremely fickle, so we really don't
>>>>> know which programming language will be "the king" in 5 or 10 years.)
>>>>>
>>>>> Anyhow, I purchased this book on Python data structures by Magnus Lie
>>>>> Hetland.  Great book and so helpful!  It has even helped me better
>>>>> understand the concepts in my Java course.  (The languages are
>>>>> different--sure thing--but I think the core concepts are almost exactly the
>>>>> same.)  The name of the book is PYTHON ALGORITHMS.  Magnus Lie Hetland is
>>>>> the author.  It's really good.
>>>>>
>>>>> So I'm attaching my code.  Please be kind in your criticisms!  I know
>>>>> it's not the Mona Lisa of computer programming, but hey, if I'm lucky my
>>>>> mother will tape a printed copy of the program to the refrigerator door and
>>>>> leave it there with a gold star on it for the next few days!!!  ;-)   Is
>>>>> that really asking for too much?!  LOL!!!
>>>>>
>>>>> Best,
>>>>>
>>>>> Douglas.
>>>>>
>>>>> _______________________________________________
>>>>> Chicago mailing list
>>>>> Chicago at python.org
>>>>> https://mail.python.org/mailman/listinfo/chicago
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Brian Ray
>>>> @brianray
>>>> (773) 669-7717
>>>>
>>>
>>>
>>>
>>> --
>>> Brian Ray
>>> @brianray
>>> (773) 669-7717
>>>
>>> _______________________________________________
>>> Chicago mailing list
>>> Chicago at python.org
>>> https://mail.python.org/mailman/listinfo/chicago
>>>
>>>
>>
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> https://mail.python.org/mailman/listinfo/chicago
>>
>>
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20150303/e913eb1a/attachment-0001.html>


More information about the Chicago mailing list