From selvi.dct at gmail.com Mon Aug 1 13:40:36 2022 From: selvi.dct at gmail.com (selvi dct) Date: Mon, 1 Aug 2022 23:10:36 +0530 Subject: [Chennaipy] Chennaipy - Monday Module - 25 Jul 2022 Message-ID: Date: 25 Jul 2022 Module: pyscreenshot Installation: pip install pyscreenshot About: Pyscreenshot tries to allow to take screenshots without installing 3rd party libraries. It is cross-platform. Sample Source Code: "Grab the whole screen" import pyscreenshot as ImageGrab # grab fullscreen im = ImageGrab.grab() # save image file im.save("fullscreen.png") Execution: $ python pyscreenshot_sample.py Output: # screen shot will be created and saved in the fullscreen.png file $ ls -lrt fullscreen.png Reference: https://pypi.org/project/pyscreenshot/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From selvi.dct at gmail.com Mon Aug 1 14:05:32 2022 From: selvi.dct at gmail.com (selvi dct) Date: Mon, 1 Aug 2022 23:35:32 +0530 Subject: [Chennaipy] Chennaipy - Monday Module - 1 Augl 2022 Message-ID: Date: 1 Aug 2022 Module: scrape Installation: pip install scrape About: Scrape is a rule-based web crawler and information extraction tool capable of manipulating and merging new and existing documents. XML Path Language (XPath) and regular expressions are used to define rules for filtering content and web traversal. Output may be converted into text, csv, pdf, and/or HTML formats. Sample Source Code: from scrape import scrape, utils def call_scrape(cmd, filetype, num_files=None): if not isinstance(cmd, list): cmd = [cmd] parser = scrape.get_parser() args = vars(parser.parse_args(cmd)) args["overwrite"] = True # Avoid overwrite prompt if args["crawl"] or args["crawl_all"]: args["no_images"] = True # Avoid save image prompt when crawling args[filetype] = True if num_files is not None: args[num_files] = True return scrape.scrape(args) call_scrape(["demo.html"], "text") Input: demo.html ADMISSION TO ONLINE COLLEGE

Aplicants are considered for admission to Online College on the basis of their ISP, quality of their home pages and quantity of emails exchanged per day.

It is recommended that students prepare for enrollment in Online College by signing up for DSL service and buying a new computer.

Back to Online College home page Execution: $ python scrape_sample.py Output: demo.txt ADMISSION TO ONLINE COLLEGEAplicants are considered for admission to Online College on the basis of their ISP, quality of their home pages and quantity of emails exchanged per day.It is recommended that students prepare for enrollment in Online College by signing up for DSL service and buying a new computer. Back to Online College home page Reference: https://pypi.org/project/scrape/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From selvi.dct at gmail.com Mon Aug 8 15:26:41 2022 From: selvi.dct at gmail.com (selvi dct) Date: Tue, 9 Aug 2022 00:56:41 +0530 Subject: [Chennaipy] Chennaipy - Monday Module - 08 Aug 2022 Message-ID: Date: 08 Aug 2022 Module : Pillow Installation : pip install Pillow About: The Python Imaging Library adds image processing capabilities to the Python interpreter. This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities. The core image library is designed for fast access to data stored in a few basic pixel formats. It provides a solid foundation for a general image processing tool. Source: from PIL import Image # Location of the image img = Image.open("image.jpg") # Show the image img.show() # Size of the image print(img.size) # Format of the image print(img.format) # Rotating a image 90 deg counter clockwise img = img.rotate(90, PIL.Image.NEAREST, expand = 1) # Flip the original image vertically img = img.transpose(method=Image.FLIP_TOP_BOTTOM) # Setting the points for cropped image left = 4 top = height / 5 right = 154 bottom = 3 * height / 5 # Cropped image of the given dimension img = img.crop((left, top, right, bottom)) # Resize the image newsize = (300, 300) img = img.resize(newsize) Reference: https://pypi.org/project/Pillow/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From selvi.dct at gmail.com Mon Aug 15 00:40:19 2022 From: selvi.dct at gmail.com (selvi dct) Date: Mon, 15 Aug 2022 10:10:19 +0530 Subject: [Chennaipy] Chennaipy - Monday Module - 15 Aug 2022 Message-ID: Date: 15 Aug 2022 Module : wikipedia Installation : pip install wikipedia About: Wikipedia is a Python library that makes it easy to access and parse data from Wikipedia. Search Wikipedia, get article summaries, get data like links and images from a page, and more. Wikipedia wraps the MediaWiki API so you can focus on using Wikipedia data, not getting it. Sample: import wikipedia print("Wikipedia: ", wikipedia.summary("Wikipedia")) print("Python: ", wikipedia.search("Python")) wikipedia.set_lang("fr") print("Threads: ", wikipedia.summary("Threads", sentences=1)) data = wikipedia.page("India") print("India Title: ", data.title) print("India URL: ", data.url) print("India content: ", data.content) print("India links: ", data.links[0]) Reference: https://pypi.org/project/wikipedia/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From selvi.dct at gmail.com Mon Aug 22 13:58:54 2022 From: selvi.dct at gmail.com (selvi dct) Date: Mon, 22 Aug 2022 23:28:54 +0530 Subject: [Chennaipy] Chennaipy - Monday Module - 22 Aug 2022 Message-ID: Date: 22 Aug 2022 Module : prettyprinter Installation : pip install prettyprinter About: Write pretty printers for your standard type list, dict, etc and own types with a dead simple, declarative interface. Sample Code: from datetime import datetime from prettyprinter import pprint, register_pretty, pretty_call class MyClass: def __init__(self, one, two): self.one = one self.two = two @register_pretty(MyClass) def pretty_myclass(value, ctx): return pretty_call(ctx, MyClass, one=value.one, two=value.two) ## print the output of the date in pretty format pprint({'beautiful output': datetime.now()}) ## print class object in pretty format pprint({'beautiful MyClass instance': MyClass((1, 2, 3), {'a': 1, 'b': 2})}) Output: % python pprint_sample.py { 'beautiful output': datetime.datetime( year=2022, month=8, day=22, hour=23, minute=26, second=40, microsecond=188629 ) } { 'beautiful MyClass instance': MyClass( one=(1, 2, 3), two={'a': 1, 'b': 2} ) } Reference: https://pypi.org/project/prettyprinter/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sakthirengaraj at gmail.com Fri Aug 26 06:52:48 2022 From: sakthirengaraj at gmail.com (Rengaraj D) Date: Fri, 26 Aug 2022 16:22:48 +0530 Subject: [Chennaipy] August meetup RSVP required Message-ID: Hi Everyone, Welcome to the August month meetup. # Schedule * Dictionary Tricks * First few milliseconds of https connection * ML Pipeline using TFX * Lightning talks # Venue * Online * RSVP to get the meeting link https://www.meetup.com/chennaipy/events/287543994/ # Date & Time * 27/08/2022 * 3:00 PM to 5:00 PM # New to Python ? * Learn Python in 30 minutes https://learnxinyminutes.com/docs/python/ * How to think like a computer Scientist? http://openbookproject.net/thinkcs/python/english3e/ Regards Rengaraj -------------- next part -------------- An HTML attachment was scrubbed... URL: From mm_nmc at yahoo.com Sat Aug 27 23:28:33 2022 From: mm_nmc at yahoo.com (MURALIDHARAN MURUGESAN) Date: Sun, 28 Aug 2022 03:28:33 +0000 (UTC) Subject: [Chennaipy] ChennaiPy August meet 27-08-2022 References: <2072312760.431854.1661657313073.ref@mail.yahoo.com> Message-ID: <2072312760.431854.1661657313073@mail.yahoo.com> Dear members pl find herewith the minutes of the August 22 meeting held on 27-08-2022 thanking you Minutes of the meeting dated 27-08-2022 Chennaipy August 2022 meet up ? was convened on 27-08-2022? at 3:00 p.m. through online.(jitsi platform)? Mr Rangaraj and Mr.Vijayakumar? chaired the meeting. Around 25? members attended the meeting. After the introduction of members the talks followed in order. [3.15] Mr Vijaya Kumar - Introduction - He briefed the members about the meetup? and its objectives.? [3.20] Dictionary Tricks -? Speaker: Dr.Muralidharan Certain special and craziest way of using dictionary - handling default value while lookup in a dictionary - EAFP coding style - Sorting the dictionary either using key or value - Emulating switch/case statements using dictionary - Effect of boolean value as integer in a dictionary [3.45]? Python background task monitoring tools - Ibrahim, decathlon, Bangalore - Wireshark tool - a packet sniffer analyser to monitor the packet received in an networked environment - ngrok is a globally distributed reverse proxy fronting your web services running in any cloud or private network, or your machine.? ? ?[4.10] Machine Learning Pipeline using TFX - Speaker: Dipak ? - Bring Software Engineering Concepts into Machine Learning Application Development - TFX - TensorFlow Extended Model used in developing ML Applications - How to manage ML Workflows in production environment ? [4.40] Lightning Talks - Environment for Deveopment and Production in Python App Development -? Speaker: Mr.D.Rengaraj - Senior Software Engineer at Intelsat - How to balance between Code development between development mode and production mode - Using Python-dotenv ? [5.00] Mr.Vijay proposed the vote of thanks? The meeting ended at 5.00 PM Dr.M.MURALIDHARANHEADDEPARTMENT OF COMPUTER SCIENCENEHRU MEMORIAL COLLEGE[AUTONOMOUS]PUTHANAMPATTI - 621 007TIRUCHIRAPPALLI DISTRICTPHONE : 04327 234 8100431 2712247[RES]94866 46708mm_nmc @yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From selvi.dct at gmail.com Mon Aug 29 13:32:12 2022 From: selvi.dct at gmail.com (selvi dct) Date: Mon, 29 Aug 2022 23:02:12 +0530 Subject: [Chennaipy] Chennaipy - Monday Module - 29 Aug 2022 Message-ID: Date: 29 Aug 2022 Module : art Installation : pip install art About: ASCII art is also known as "computer text art". It involves the smart placement of typed special characters or letters to make a visual shape that is spread over multiple lines of text. ART is a Python lib for text converting to ASCII art fancy. Source: from art import * print("Coffee", art("coffee")) # return art as str in normal mode print("") print("Random", art("random")) # random 1-line art mode print("") print("Woman", art("woman",number=2)) # return multiple art as str print("") print("Butterfly") aprint("butterfly") # print art print("") print("Happy") aprint("happy") # print art print("") print("Text2Art") print(text2art("art")) # Return ASCII text (default font) and default chr_ignore=True Output: Coffee c[_] Random |==|iiii|>----- Woman ??_?? ??_?? Butterfly ???????? Happy ?\(??????` )/? Text2Art _ __ _ _ __ | |_ / _` || '__|| __| | (_| || | | |_ \__,_||_| \__| Reference: https://pypi.org/project/art/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason at janusworx.com Mon Aug 29 21:39:58 2022 From: jason at janusworx.com (Jason Braganza) Date: Tue, 30 Aug 2022 07:09:58 +0530 Subject: [Chennaipy] Chennaipy - Monday Module - 29 Aug 2022 In-Reply-To: References: Message-ID: <995a716d-a03c-45ba-8182-61cd50d160ab@www.fastmail.com> On Mon, 29 Aug 2022, at 23:02, selvi dct wrote: > > > Module : art > > > > Installation : pip install art > Thank you! Thank you! Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: