What are the best Python scripts you've ever written?
I am aputer engineer with 15 years of experience. I have created multiple python scripts (similar to many scripts described already ) for daily usage tasks. However my best python script would be facebook automation. The setup includes a selenium driver on firefox. The script is triggered once every 6 hours on a dedicatedputer. The scripts opens web browser and logs in with my account. Some of thing it can do are listed Parse my full friend list and create an xml with all relevant details. (This is important as later steps take action only on feeds from people in this created xml.) Scroll the feedpage and take actions on individual feeds. By default it will like any profile pic cover pic change. If other people congratulate my friend it can parse thement like the feed andment congratulation message. I am anonymous because most likely it against facebook policies to use this kind of scripts for daily interaction. EDIT 1 This edit section is for people who are interested in knowing how the whole script works. I will try to keep it minimal so that it doesn be too technical. The script has 3 main work areas Navigation Navigate to a webpage scroll the page etc. Action Take some action on specific element based on info collected. ordered-list Navigation Selenium driver gives the direct capability to launch a browser navigate to a scroll down etc. Hence this part is pretty much straight forward. Info collection This is one of the most hard parts. On firefox you can right click any element and inspect it . Inspect Element gives details of what the html code for an element looks like Here is a snapshot of what firefox shows when i inspect a friend name in my friends list. The class of div element is very important. I now know that whenever i will parse an element of this class it will have the details of my friend (name etc ) I first statically find these elements manually and then hardcode them in my script. I can now parse necessary elements and collect the information present in those via selenium. Selenium gives the api to extract each information of an element. For e.g. I can extract the href in above picture and i can save the of my friend. This example also covers first point of my script of how i created xml of all my friends. I need to parse my friends list only once and save it for future use until i add a friend. In a similar way we can parsements count events etc . Action Once we have collected the information we can apply our own programming logic to that information. For e.g if someone hasmented Nice picture we can post a similarment. Selenium provides the api to click on element in a area etc. So for like we simply click on Like element with that specific class. That all folks.
Why do some designers prefer Adobe Illustrator over CorelDraw?
Ill try to stay on topic but note that I am answering this question with many years (3+) of experience in design and printing as well as In my opinion. AI is the more standard piece of software in the industry. CD isn. CD takes more tweaking in the color department than Illustrator too. Ive seem many inconsistencies in color using CD versus AI. Ive used both programs from the beginning. Im in CD more often especially when doing my own stuff. If I know that I have to share or hand off files (especially to those less experienced) I will think twice about the formats needed. Nine of out ten projects (and better) Ive output to PDF which I find easier with CD even though PDF are the children of Adobe. Font issues are an entirely separate matter and I won get into that except to say that Ive had less issues converting fonts to curves in CD. Quite often if someone is supplying a file it usually AI in one format or another and there is no better way to edit it then in the native program. Crossover from AI to CD (or vice versa) gets messy sometimes (often). Both programs in my opinion are excellent and have their place. What you feelfy in is where you will stay more often. Everyone has their opinion and that is just the way it should be. Both programs are extremely capable and I never put one down over another. I have had people literally fight me to defend their software of choice. To me It just a matter of different tools for different tasks. -)
Which is the best way to reduce pdf size without losing quality?
There are lot of third party solutions that offers PDFpression but if you will likely see degrading of quality one way or another. In most of instance I get question from client and when take a look at PDF files that have problems they typically created with pretty bad planning. mon causes are lot of raster s are there. Such as rasterized or graph which can be simple or vector graphics. Unnecessary heavy multimedia files or other add on that will not be printed or used anyway will be included (should be on separate files if intended for presentation services) ordered-list Good planning and execution of project is often key . Some of s can be lot smaller if rasterization was done carefully. Graphics straight out of Excel etc. can be ported out as vector graphics and it can be lot smaller than placing rasterized version. Photography try to crop as much as you can so you will not have unnecessary elements and try to apply noise filter before. Depend on how aggressively applied noise removal you can shave extra 133% of graphic size. Font can be but only uses for one that needed and try to usesmonly available fonts reduces need for fonts greatly. When planning to show some of graphics or multimedia files think very carefully if you wanted to included in actual PDF files or not. For the lot of purpose you could get away with providing external . With these careful planning you could actually create PDF documents significantly smaller and quicker to load and higher quality.
What is actually being done when converting files to other file types?
It depends. For some file s there is a lossless reversible conversion possible. GIF consists of a certain number of pixels in a rectangular array say 64x28 and each have a particular colour represented by three eight-bit numbers for each or redbluegreen. () is black (255) is pure red for instance. Conversion consists of changing one representation to another - GIF has a palette of 256 colours each stored as a 24-bit number then each pixel has an 8-bit index into that palette - maybe black is brown is 1 magenta is 2. PPM represents each pixel separately with no palette. JPEG on the other hand is a lossypression format so you won get a lossless reversible conversion. Converting JPEG to PPM is essentially just taking a screenshot and capturing all the pixel values but going back to JPEG will blur some detail. Movie formats (MPEG MP4 WMV) and audio (MP3 WMA AAC) are usually lossypression though raw video and audio (WAV) is upressed. It still sampled at a particular bitrate or frame rate. Conversion will involve a decoder-coder operation and possibly resampling at a different bit rate or interpolation. Often there data lost and the converted file is markedly inferior. Conversion to Postscript or PDF is essentially printing to a file instead of paper. If you convert an image to those there are some assumptions made about paper size.. Conversion from Postscript to PDF is essentially lossless as they are basically the same format though PDF ispressed and includes the fonts used while Postscript assumes they are available on the system. Conversion from CSV to a spreadsheet like Excel imports data and adds information like font size and colour and column . Conversion from Excel (XLS XLSX) to CSV or TSV loses all the formatting and exports only cell values not formulae. Conversion from one spreadsheet format to another such as Microsoft Excel to LibreOffice usually preserves all data and formulae and usually formatting but with some quirks around macros and colours Some conversions don make sense like JPEG to WAV.
Which is the best PDF reader?
With so many PDF viewers available on the market it not that simple to find the right one especially because it seems that all of them offer pretty similar sets of features. But the truth is that all of them are different. Some are user-friendly and easy to use some are obsolete and their learning curve isn appealing at all. Some are advanced but their modern functionalityes with a higher price and some are free fast and lightweight but can be used only for viewing PDFs with no other options available for the users. Right now during pandemic crises it already bing obvious that in a world that could be known as After-COVID-219 technology will be playing an enhanced role that will shape and reshape everything - the way we live work studymunicate with each other entertain ourselves deal with the healthcare system travel etc. Taking that into consideration and preparing yourself for living in a less-contact society where anything that can be done remotely will be done remotely we have to make sure that we get the best and most reliable software designed for distant work. Luckily the best PDF viewers out there are not designed just for viewing PDF documents but for editing them as well. With that of software you will be able to aplish such tasks like creating a PDF file from scratch converting different formats into PDFs enhancing your PDF file with interactive elementsbining multiple pages into one PDF document like Powerpoint presentation or preparing your PDF for e-Signature. All of them have free versions with basic features and paid versions for advanced operations. PDF Reader s Designed with simplicity in mind this sophisticated cross-device and cross-platform software covers all the essentials and more allowing users to create view change reading mode markup add multimedia create forms edit files password protect them rearrange pages merge different pages into one document add signatures convert files from and to PDFspress files for easier handling and even OCR PDF files for increased productivity. The right tool for those who want to be just that one step ahead. PDF-XChange Editor s This small fast and feature-rich program lets you do a lot even with a license-free version. It can be used to create PDF files from scanned documents s 1199 16 Disclaimer I am a member of the Kdan team and my answer might be a bit biased. italic