background preloader

Programming

Facebook Twitter

Free Online Computer Science and Programming Books, Textbooks, and Lecture Notes. Programming Texts/Tutorials. Tutorial - Learn Python in 10 minutes. NOTE: If you would like some Python development done, my company, Stochastic Technologies, is available for consulting. This tutorial is available as a short ebook. The e-book features extra content from follow-up posts on various Python best practices, all in a convenient, self-contained format.

All future updates are free for people who purchase it. Preliminary fluff So, you want to learn the Python programming language but can't find a concise and yet full-featured tutorial. Properties Python is strongly typed (i.e. types are enforced), dynamically, implicitly typed (i.e. you don't have to declare variables), case sensitive (i.e. var and VAR are two different variables) and object-oriented (i.e. everything is an object).

Getting help Help in Python is always available right in the interpreter. >>> help(5)Help on int object:(etc etc) >>> dir(5)['__abs__', '__add__', ...] >>> abs. Syntax Python has no mandatory statement termination characters and blocks are specified by indentation. Strings. Chat with Your Friends through ms dos Command Prompt. -: Chat with Friends through ms dos Command Prompt :- 1) All you need is your friend's IP Address and your Command Prompt. 2) Open Notepad and write this code as it is.....! @echo off :A Cls echo MESSENGER set /p n=User: set /p m=Message: net send %n% %m% Pause Goto A 3) Now save this as "Messenger.Bat". 4) Open Command Prompt. 5) Drag this file (.bat file) over to Command Prompt and press Enter. 6) You would then see something like this: 7) Now, type the IP Address of the computer you want to contact and press enter You will see something like this: 8) Now all you need to do is type your message and press Enter.

ShareThis. CJkR9.png (PNG Image, 2561x1601 pixels) - Scaled (41. Dual Boot Ubuntu and Windows. This page describes how to set up your computer in order to dual boot Ubuntu and Windows. Although this may seem obvious, it is important to back up your files to an external backup medium before attempting a dual-boot installation (or any other hard drive manipulation), in case your hard drive becomes corrupted during the process. External hard drives, USB flash drives, and multiple DVDs or CDs are all useful for this purpose. Some computer manufacturers that pre-install Windows provide a Windows recovery/re-installation CD or DVD with the computer.

However, many companies no longer ship a physical disc but instead create a hidden partition on the hard drive in which the recovery-disk information is stored. You may need to request a physical recovery/re-installation CD or DVD directly from your computer manufacturer. Once you have created a physical backup disc from a restore-image partition on the hard-drive, the restore-image partition can either be removed or left in place. 4 Reasons Every Windows User Should Have An Ubuntu Live CD. For this reason, I suggest every Windows user keeps a copy of Ubuntu on hand, even if they never intend to switch from Windows. Happily, Ubuntu is completely free to aquire. You can download Ubuntu and burn it yourself, but if that sounds like too much work you can request Ubuntu send you a Ubuntu Live CD for free. That’s right: you’ll get a CD in the mail, completely free of charge. There’s seriously no reason to not look into this, so let’s see some of the uses Ubuntu has for those who never intend to install it.

Recover Data From Unbootable System When your Windows system won’t start – not even in safe mode – it’s easy to feel helpless. If you want more information on this particular use for an Ubuntu Live CD, including information on how to burn one, check out Varun’s excellent article How To Back Up Data On Your Computer That Won’t Boot. Run Memtest If your computer crashes from time to time it’s easy to suspect your problem is software related. Find Out About Your Hard Drive.

Use Ubuntu Live CD to Backup Files from Your Dead Windows Computer. If you’ve ever asked for help with your Windows computer that won’t boot anymore, you’ve probably been told to “Backup all your data and then reinstall”… but if you can’t boot, how can you get to your data? That’s the question we’ll be answering today. One of the easiest methods to access your data is to simply boot off an Ubuntu Live CD… and it’s completely free (except for the cost of a blank cd).

Burn an Ubuntu Live CD If you have another computer, you can download and burn the Ubuntu Live CD using a very simple application called ImgBurn. Otherwise, you can bug one of your friends to help you burn a copy. Just open up ImgBurn, and click the icon to “Write image file to disc” Then click on the icon next to “Source”, pick the downloaded ISO file, stick a recordable CD into the drive, and click burn. Now that you have the boot cd (which you should keep in a safe place, as it’s very useful), just stick it in the drive of the computer and boot from it. Sudo /bin/bash mkdir /media/disk fdisk -l. Python Introduction - Google's Python Class - Google Code. Python is a dynamic, interpreted language. Source code does not declare the types of variables or parameters or methods. This makes the code short and flexible, and you lose the compile-time type checking in the source code. Python tracks the types of all values at runtime and flags code that does not make sense as it runs.

(todo: link here to the companion video segment for this section) An excellent way to see how Python code works is to run the Python interpreter and type code right into it. Python Program Python source files use the ".py" extension. Here's a very simple Python hello.py program (notice that blocks of code are delimited strictly using indentation rather than curly braces -- more on this later!) #! # import modules used here -- sys is a very standard oneimport sys # Gather our code in a main() functiondef main(): print 'Hello there', sys.argv[1] # Command line args are in sys.argv[1], sys.argv[2] ... # sys.argv[0] is the script name itself and can be ignored Python Module. Linux is NOT Windows. In the following article, I refer to the GNU/Linux OS and various Free & Open-Source Software (FOSS) projects under the catch-all name of "Linux". It scans better. If you've been pointed at this page, then the chances are you're a relatively new Linux user who's having some problems making the switch from Windows to Linux.

This causes many problems for many people, hence this article was written. Many individual issues arise from this single problem, so the page is broken down into multiple problem areas. Problem #1: Linux isn't exactly the same as Windows. You'd be amazed how many people make this complaint. The specific reasons why people try Linux vary wildly, but the overall reason boils down to one thing: They hope Linux will be better than Windows. Therein lies the problem. It is logically impossible for any thing to be better than any other thing whilst remaining completely identical to it. No. Problem #2: Linux is too different from Windows Quite true. Problem #3: Culture shock d5w. 3. An Informal Introduction to Python — Python v2.7.1 documentation. In the following examples, input and output are distinguished by the presence or absence of prompts (>>> and …): to repeat the example, you must type everything after the prompt, when the prompt appears; lines that do not begin with a prompt are output from the interpreter.

Note that a secondary prompt on a line by itself in an example means you must type a blank line; this is used to end a multi-line command. Many of the examples in this manual, even those entered at the interactive prompt, include comments. Comments in Python start with the hash character, #, and extend to the end of the physical line. A comment may appear at the start of a line or following whitespace or code, but not within a string literal. A hash character within a string literal is just a hash character. Let’s try some simple Python commands. 3.1.1.

The interpreter acts as a simple calculator: you can type an expression at it and it will write the value. >>> 5 ** 2 # 5 squared25>>> 2 ** 7 # 2 to the power of 7128. Tips for Linux Explorers. Why Python? My first look at Python was an accident, and I didn't much like what I saw at the time.

It was early 1997, and Mark Lutz's book Programming Python from O'Reilly & Associates had recently come out. O'Reilly books occasionally land on my doorstep, selected from among the new releases by some mysterious benefactor inside the organization using a random process I've given up trying to understand. One of them was Programming Python. I found this somewhat interesting, as I collect computer languages. I know over two dozen general-purpose languages, write compilers and interpreters for fun, and have designed any number of special-purpose languages and markup formalisms myself. My most recently completed project, as I write this, is a special-purpose language called SNG for manipulating PNG (Portable Network Graphics) images. Interested readers can surf to the SNG home page at Perl, of course, is the 800-pound gorilla of modern scripting languages.

Listing 1. Linux Shell Scripting Tutorial - A Beginner's handbook. The Art of Unix Programming. You can browse my newest book here. If you like it, please order a paper copy. You can get it from Amazon or Barnes & Noble, or direct from Addison-Wesley. The Art of Unix Programming attempts to capture the engineering wisdom and philosophy of the Unix community as it's applied today — not merely as it has been written down in the past, but as a living "special transmission, outside the scriptures" passed from guru to guru. Accordingly, the book doesn't focus so much on "what" as on "why", showing the connection between Unix philosophy and practice through case studies in widely available open-source software. If you're using Opera 5, be aware that it has problems rendering some of the HTML in the browseable version linked above.

The symptom is occasional missing spaces between words. Revisions for the first print edition are now closed. Instructions for reviewers are here. I have written some notes for translators. Raves: 123456789 Friendly: 12345678910 Pans: 12. How To Become A Hacker. Copyright © 2001 Eric S. Raymond As editor of the Jargon File and author of a few other well-known documents of similar nature, I often get email requests from enthusiastic network newbies asking (in effect) "how can I learn to be a wizardly hacker?

". Back in 1996 I noticed that there didn't seem to be any other FAQs or web documents that addressed this vital question, so I started this one. A lot of hackers now consider it definitive, and I suppose that means it is. Still, I don't claim to be the exclusive authority on this topic; if you don't like what you read here, write your own. If you are reading a snapshot of this document offline, the current version lives at Note: there is a list of Frequently Asked Questions at the end of this document. Numerous translations of this document are available: ArabicBelorussianBulgarianChinese, Czech. The five-dots-in-nine-squares diagram that decorates this document is called a glider. 1. 2. 3. 5. 2.