Search This Blog

Saturday, September 30, 2017

Regular expression matching operations in programming

In programming to select and extract necessary information from website you can use regex or regular expression - symbolic logic to select or exclude information. In Python there is library Regular Expression Syntax, which explains syntax and present samples. Though it is complicated to understand and to write by himself even after searching Stackoverflow. So use search regex tutorial on Google. Search show to use website RegexOne Learn Regular Expressions with simple, interactive exercises. Interactive Tutorial and Regular expressions 101 Interactive website to read to understand and to practice regex. With regex you can write complex commands in Scrapy spider to extract only necessary information or you can process text file with regex also. Today I program integration of automatic solution for Facebook groups matching with their members number, which I have already developed. I found that Chrome Extension LinkKlipper has option to select text file for download with regex option. So I put /groups/ in regex field and LinkKlipper will download only those links which contain word 'groups' in it. Unecssary links with 'permalink' word will deleted automatically by python code, so for sake of simplity I avoid more complex regex syntax.

Interactive python code shell for testing

From  Python Tutor website I wrote simple codes with names and generated code to embed with HTML code. Live programming mode  is available via Link but is not visualized. By click Live programming mode  you can go to Python Tutor website  to see how it works. This interactive code visualization is helpful to understand code structure. The simple code naming values is useful in more complex programmings when you can not repeat same name. Press forward to see how program assigns values to created new variables.

Sources to program with python language and for self education

I have been learning for almost one year. Still far calling myself programmers, though I found many numerous applications and coded solutions which were helpful to productive and to earn. Personally I have passed Online digital marketing institute digital marketing expert tests and I find python programming especially beneficial. Google is programmed with Python, Python language inventor from Holland is employee of Google Inc. Actually you can build state-to-art your own home made small business. Research online, find necessary code and integrate. How to start programming?
I started from two books. First book -  "Automate boring stuff";  the second - "Learn python hardway".  And the third - so far most helpful interactive book with coding skills was "How to Think Like a Computer Scientist: Interactive Edition". I do not read and practice all lesson in books from A to Z, but only which are necessary. I write this post after protracted period of time when I could not designate time to program and to learn. So this post is helpful how to remind myself and prepare for programming stuff. Try not to invent bicycle, do research. The first source to use Python official. Secondly,  search Stackoverflow.com or ask questions. Remember to ask questions on Stackoverflow.com you need some skills, read carefully instructions. Extremely helpful is watch and learn form Youtube videos. But the most important is to learn how to ask correct programmers questions. After general solutions and used more specific five six words and include python command and library names to make searches. Google index, I think, everything from Stackoverflow so it is to find. Depending on Python libraries codes it is sometimes hard to find necessary method to export result to text file, but you need to read functions libraries and test various methods. Look for answers dated with one year if possible, newest the better. Apart, Stackoverflow you can Code search engines, like searchcode.com, are helpful to find find necessary or similar code for adaption, and to find libraries or solutions popularities. I extensively use pypi project library (pypi.python)  and github to find ready project and use found definitions and codes for programming. Github has page Awesome python where can find list of most important libraries. Today I found pypi statistics sites, which can be helpful to find latest version. Extremely helpful to quickly find pypi libraries was Pypi Ranking site, currently down, but other helpful site is Python wheels . There are many python tutorial, blogs and e-books which are very helpful and will present them in list what are benefits of reading them. Another extremely useful source is university tutorials - site with edu extension and many program solutions you can find, like Harvard Engineering School and Applied Scientists or Massachusetts Institute of Technology (for snobbish guys). I still have not learned all Python 80 build-in functions and still in process of learning and programming is not main my activity in life. But it is worth to be of full time programmer's skills. I extensively researched python libraries, projects and brought me ideas to learn while integrating and programming and applying or integrating ready projects. And here is page of How to become a successful well Self-Taught Software Developer   , same site brings systemized list of best Python learning resources  and best Python Videos (talks not coding). I prefer coding videos, also many business coding professionals  since our brain 60 thousand times read visual information with eyes than understanding. And  certainly base Python tutorial. I like to you interactive Python tutorials, you can also use while blogging python shell yourself for testing, which I use in future. Another very useful and motivating source are professional blogs with practical solutions with written codes and functions list as well as application areas. So start coding and while using extensive search combination often you will find useful learning and practical application python language codes. For simplicity reasons many IT professionals advocate extensive libraries functions usages to make codes reliable and short.