Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

How to shrink PDF file size using Microsoft Print to PDF






The "Microsoft Print to PDF" functionality is often used when you don't have a license of Adobe and still would like to print your PDF as another PDF, e.g., print PDF to get rid of all security/password related restrictions of the original document.

While the functionality is awesome and free, one limitation might be the output file size sometimes is less optimized, which results in oversized file to upload to some websites. For example, the Original Doc in the following is 1,852KB only while using the "Microsoft Print to PDF" default settings results in 19,390KB. I cannot upload the file to a website with an upload limit of 10MB for instance.




Microsoft Print to PDF default setting


As an alternative, I found that enabling the "Print As Image" option in the "Advanced" option reduces the file output size to some extent, as shown in the first figure above. As we can notice from the figure, with this setting, the output file size is reduced to 5,166KB compared to 19,390KB. Now I can submit this file to the website with an upload limit of 10MB.

Microsoft Print to PDF enable "Print As Image"




What is GitHub Copilot and how it works?

What is GitHub Copilot?

GitHub Copilot might be one of the most intersting AI use case from Microsoft GitHub in 2021. In this post, we look into an overview of what is GitHub Copilot and how it works with some examples.


GitHub Copilot is an artificial intelligence tool developed by GitHub and OpenAI to assist users of Visual Studio Code, Neovim, and JetBrains by autocompleting code. It was first announced by GitHub on 29 June 2021.


If you visit the GitHub Copilot official website, you will see the brief summary of Copilot as "Your AI pair programmer", and with GitHub Copilot, get suggestions for whole lines or entire functions right inside your editor.



How it works?

So based on the above description, we get an idea about what is Copilot - your pair programmer which can provide quick suggestions for completing your code (e.g., entire functions) in your editor so that you can complete your code without actually typing the content of a function for example.


To test with some examples, I applied GitHub Copilot Technical Preview and got approved, and used the following environments for the testing:


First example: Binary Search

The following video shows how we can complete binary_search function with the help of Copilot where its suggested code will be shown in gray color, and if you like the suggestion, you can use [Tab] key to accept the suggested code for your usage instead of coding from scratch - which is super awesome!


First, when I try def binary_search(, the Copilot will suggest two input parameters (i.e., arr and target) for my function based on the function name that I typed.

Secondly, when I move to the body of the function to write, as we can see from the video, Copilot will automatically suggest the entire binary search example code for us to use if we satisfied with the suggested code - which is working without any problem like a charm!








Second example: Bubble, Selection and Insertion Sort

Next, we try three basic sorting algorithm implementations with the help of Copilot in the following video. Based on the function name itself, the Copilot can automatically suggest relevant code snippet for the function when I change the function name from "bubble_sort" to "selection_sort" or "insertion_sort" - which again runs smoothly without any problem.



The first impression of the Copilot is absolutely will be very helpful for speeding up a lot of well-established functions, and the impact of it will be more clear in the next few years. It is also worth noting that the suggested code with AI technique is not perfect, and it is the programmer's responsibility to check, use, or refine it for their needs.

How does GitHub Copilot work? 


OpenAI Codex was trained on publicly available source code and natural language, so it understands both programming and human languages. The GitHub Copilot editor extension sends your comments and code to the GitHub Copilot service, which then uses OpenAI Codex to synthesize and suggest individual lines and whole functions.


Does GitHub Copilot write perfect code? 


No. GitHub Copilot tries to understand your intent and to generate the best code it can, but the code it suggests may not always work, or even make sense. While we are working hard to make GitHub Copilot better, code suggested by GitHub Copilot should be carefully tested, reviewed, and vetted, like any other code. As the developer, you are always in charge.


ACM SAC 2016 Travel Report

From the 4th to the 8th of April I had the pleasure to participate the 31st ACM Symposium on Applied Computing (ACM SAC), which was held in beautiful city Pisa, Italy. I was there to present my full paper "Measuring Semantic Distance for Linked Open Data-enabled Recommender Systems" and to participate the Student Research Competition sponsored by Microsoft.

This year, there were over 500+ registrations from 59 countries at this conference. There were 37 tracks and the overall acceptance rate for this year is 24%.

Keynotes:

There were two keynotes given by John Mylopoulos and Marco Conti, respectively. The first keynote is about the requirements problem in Software Engineering and the second keynote is about "From MANET to people-centric computing and communications.


Semantic Web Track:

There were two sessions with eight papers for Semantic Web Track where three of the participants two of the participants from our institute. Pasquale Minervini presented "Leveraging the Schema in Latent Factor Models for Knowledge Graph Completion" and another college Feng Gao presented "QoS-Aware Adaptation for Complex Event Service" in another (SOA) track.


Social Network and Media Analysis Track (SONAMA):

One of the papers in this track I'm interested in was "Inferring Semantic Interest Profiles from Twitter Followees: Does Twitter Know Better than Your Friends?" from Christoph Besel, University of Passau, Germany, which is related to my work. Although many previous works focused on using tweets for inferring user interest profiles, they used the alternative source (followees) to retrieve user interest profiles, which are based on the tendency that more and more users are consuming feeds instead of producing content on the social networks.

Student Research Competition (SRC):

I also participated in SAC SRC and went through 2nd round (top-5 list) and it was a good opportunity to compete across different disciplines. Congrats to all top-3 winners! 

Lunch

Banquet

What would make the conference better?

It would be better to have a Twitter channel to communicate and disseminate activities during the conference. Next year, it will be in Morocco and hope I could attend again:).

---------------------------------------------------------------------------------------------------------
Update after the conference:

The proceedings are available from June, 2016