1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Those interested in learning a programming language - Google Class: Python

Discussion in 'General Programming Chat' started by SnakePliskin, Sep 30, 2013.

  1. SnakePliskin

    SnakePliskin BANNED BANNED

    Joined:
    Nov 21, 2012
    Messages:
    401
    Likes Received:
    439
    Greetings to my fellow programmers and those of who are just starting to become interested in programming. I'd first like to start this off by saying, I did a search on BlackHatWorld after seeing a thread about a programming question, and found that this was NOT posted on the forum in this fashion. So here we go, here is the first URL. It is an introduction to Python, walking you through how to install the shell, explaining it's uses, meaning of code, and functions. You can access all of the youtube videos they post there, but I am going to post them here for convenience.
    https://developers.google.com/edu/python/introduction

    1.1 Introduction & Strings: http://www.youtube.com/watch?v=tKTZoB2Vjuk

    1.2 Lists & Sorting: http://www.youtube.com/watch?v=EPYupizJYQI

    1.3 Dicts & Files: http://www.youtube.com/watch?v=haycL41dAhg

    2.1 Regular Expressionshttp://www.youtube.com/watch?v=kWyoYtvJpe4

    2.2 Utilities http://www.youtube.com/watch?v=uKZ8GBKmeDM

    2.3 Utilities:URLs and HTTP, Exceptions http://www.youtube.com/watch?v=Nn2KQmVF5Og

    2.4 Conclusions/Closing Thoughts: https://www.youtube.com/watch?v=IcteAbMC1Ok

    Within that page I originally linked is also a group of exercises that they recommend, which I also do as well. This should get anyone started and provide them with a good amount of knowledge to get into programming. If anyone has any questions, I'd be happy to answer them. If any experienced programmers have some resources they would care to share or any recommendations they may have, please feel free. Happy programming! :)
     
    • Thanks Thanks x 2
  2. kojakfull

    kojakfull Senior Member

    Joined:
    Jan 13, 2008
    Messages:
    851
    Likes Received:
    1,050
    Location:
    CustomBotSolutions.com
    Home Page:
    Nice.. Can we build cool softwares or with python?
    Im just starting to learn new language.
     
  3. SnakePliskin

    SnakePliskin BANNED BANNED

    Joined:
    Nov 21, 2012
    Messages:
    401
    Likes Received:
    439
    Normally, creating software or executables (.exe files) are done with Py2EXE. This converts the scripts that you create in python to executable programs. You can find that here http://www.py2exe.org/

    The C class (C#, C++, C) languages are where things like Senuke are created. However, python is where you should begin.
     
  4. YouFeelMeDawg?

    YouFeelMeDawg? BANNED BANNED

    Joined:
    Aug 10, 2011
    Messages:
    266
    Likes Received:
    371
    The point of making an .exe is so you could actually sell your software right. Py2EXE is good if you want to make an executable, but you still have to have the source in the folder when running the .exe. You could try obfuscating the python code, but python code is not really good for selling software with licensing. If you seriously want to make bots for IM with python you will have to do some sort of SaaS and sell a web service.


    In other words, you could literally set up some really cool things with python and I highly recommend using python on ubuntu or some linux version, or mac(I have never really used a mac before though, just windows and recently all linux)

    Now my advice for beginners once you learn the basics, classes, funcs, loops etc. then go ahead and pick up some libraries from here
    I would recommend sticking to python 2.74 for now until all those libraries have been transferred to python 3.0+
    http://python3wos.appspot.com/

    This is the wall of python superpowers, it is very important you know some of these libraries here as it will literally be 99% of what you will be using to program. I am not saying the standard library is not useful, but I will assure you that you will end up memorizing other libraries before you fully comprehend the whole STL.

    In my opinion, learn the top superpower "lxml". I use this on the DAILY, this is your html parser that you will use for your python scripts if you are going to be making bots or anything web related. You either have 2 choices to do the parsing, the 're'(regular expression) module or the 'lxml' module(or sucky BeautifulSoup4 that failed me already too many times).

    Now for your http requests, you should use python requests 1,2,3.
    Let me tell you a story, before I was coding python I was coding in Autoit3 and I didn't have such a wonderful library like python requests 1,2,3 to do my http requests, I had to code a lot of things by hand like requests.Session() , the gzip encoding, the redirects , and a bunch of other lil functions i did. However, now that I got all of this stuff included in requests I can tell you how grateful I am for this wonderful library. IT GETS SHIT DONE.

    Now if you are going to be using browsers then go with selenium webdriver
    http://pypi.python.org/pypi/selenium
    I have to tell you , selenium beats any other automation browser tool I have seen. It is so good you have a lot of behavioural driven development done, if you get really good at selenium you could use your skills with a lot of other start ups that require this skill to automate some tests on their sites.

    Note: Remember, if you automate firefox you can have a different proxy setup per firefox profile, you can only have 1 in google chrome and IE per machine.

    Another top tip that I highly recommend. LEARN TO USE THE FREAKING CLOUD and LINUX/UBUNTU!!!

    I have used amazon cloud for a lot of personal things right now and am CHEAP!

    What I do is that sometimes after I finish a lil script , bot, scraper or I need something done on a machine I usually just spin a machine and do all of my testing at night.

    Why at night? because I always go for the spot instances.Sometimes I only need to use a machine for a couple of hours that I don't want to be spending for a whole month on a vps/dedi. So what I do is that i usually get a medium or high cpu medium instance on the spot price. So I end up paying between 1.8 cents to 4.5 cents at most per hour per instance(plus those extra charges).

    Yea we are talking cents. The thing am doing right now is very minimal right now, is mostly like I bot and test shit out from the scripts I create so all together I probably spend maybe like 20-40 cents everytime I test because I would have like 10 machines running my bots for like 1 hour, finish the job fast and turn off the instances.

    I wanted to use windows instances on windows, but it really takes 15-30 mins to get your freaking password to remote desktop connect to the instance, so I just sticked with ubuntu instances.

    However, for botting purposes if you are starting small I seriously don't see how you can go wrong with gettint 750 free hours of a micro instance on amazon for a full year under the free tier.
     
    • Thanks Thanks x 4
    Last edited: Sep 30, 2013
  5. SnakePliskin

    SnakePliskin BANNED BANNED

    Joined:
    Nov 21, 2012
    Messages:
    401
    Likes Received:
    439
    On the contrary, I created a gmail bot with the knowledge I acquired from this. When I watched the tutorials I wasn't new to python, but I was no expert. The bot worked/works quite well. I have used the knowledge from this and created several bots and programs that a very useful in making internet marketing automated as well. Not fully automated, but you get what I am saying.
     
  6. seveneleven

    seveneleven Power Member

    Joined:
    Sep 25, 2012
    Messages:
    639
    Likes Received:
    380
    Gender:
    Male
    Location:
    Online
    Nice vids, Googlebot is a classic example of Python - lightweight and fast. If your interested in learning to program I would recommend it and maybe later Perl the two languages I am efficient in.
     
  7. zengetsu

    zengetsu Regular Member

    Joined:
    Dec 23, 2008
    Messages:
    222
    Likes Received:
    30
    C# is the most in demand programming language right now. I'm just throwing that out there.
     
  8. SnakePliskin

    SnakePliskin BANNED BANNED

    Joined:
    Nov 21, 2012
    Messages:
    401
    Likes Received:
    439
    Very true. C# is the language in which a lot of the SEO tools we use are developed in. Python is the easiest language to learn (in my opinion) and once you know one it's MUCH easier to learn others.
     
  9. YouFeelMeDawg?

    YouFeelMeDawg? BANNED BANNED

    Joined:
    Aug 10, 2011
    Messages:
    266
    Likes Received:
    371
    Forgot to add, you also want to keep this handy when your coding in python.

    I use it as a reference once in a while, but it was very useful when I started.

    Here is the virustotal
    https://www.virustotal.com/en/file/1b0b9b74e097ff67f8e29971b52a0e167cb0c222d7a558129bf691336a8f8d10/analysis/1381719057/

    Here is the Addison.Wesley.The.Python.Standard.Library

    http://www.xup.in/dl,12387471/Addison.Wesley.The.Python.Standard.Library.by.Example.Jun.2011.pdf/
     
    • Thanks Thanks x 1
  10. SnakePliskin

    SnakePliskin BANNED BANNED

    Joined:
    Nov 21, 2012
    Messages:
    401
    Likes Received:
    439
    I should have included this website. It is called Python Module Of The Week. It is very resourceful whether you're making a script or even a computer game. It's good to keep on hand unless you forget a piece of code (it happens, especially when you're first starting out).

    VirusTotal: https://www.virustotal.com/en/url/5da3c055a9da704413f60d894a1564479e1c2edb33828f27c1885e8632b703ee/analysis/1381719695/

    Website: http://pymotw.com/2/contents.html