<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omkar Deshpande on Medium]]></title>
        <description><![CDATA[Stories by Omkar Deshpande on Medium]]></description>
        <link>https://medium.com/@omkar_dsd?source=rss-5f7f435960fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_yy-3u7QqG8Qxy4nOdomTg.jpeg</url>
            <title>Stories by Omkar Deshpande on Medium</title>
            <link>https://medium.com/@omkar_dsd?source=rss-5f7f435960fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:11:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omkar_dsd/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Security: Verifying integrity of package/file in Linux]]></title>
            <link>https://medium.com/developer-pod/verifying-genuineness-of-downloaded-package-or-file-in-linux-1a0ffd100216?source=rss-5f7f435960fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a0ffd100216</guid>
            <category><![CDATA[shasum]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[checksums]]></category>
            <category><![CDATA[verify]]></category>
            <category><![CDATA[life]]></category>
            <dc:creator><![CDATA[Omkar Deshpande]]></dc:creator>
            <pubDate>Sun, 23 May 2021 11:43:06 GMT</pubDate>
            <atom:updated>2021-05-23T18:36:18.715Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why</h3><p>Checking the genuineness of downloaded package and file has become crucial now more than ever. There are many reasons to check that before you actually actually open / install / execute it in your system or server. Unknowingly, one might end up installing malicious version of the package that might have been introduced during the transfer of file from website to one’s local, or local to development system or development to production system because of the compromised network, that you aren’t aware of OR someone was successful in getting access to your file system and replaced that piece of package with his own version.</p><p>It is thus necessary to be cautious for such scenarios where the original file is tampered with.</p><h3>How</h3><p>Let’s take an example of downloading Elasticsearch package from the official page: <a href="https://www.elastic.co/downloads/elasticsearch">https://www.elastic.co/downloads/elasticsearch</a></p><ol><li>Download the Elasticsearch package.</li></ol><pre>wget <a href="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.12.1-arm64.deb">https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.12.1-arm64.deb</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vdSBZR1RSSMmOVECGkTIBQ.png" /></figure><p>2. On the same link, corresponding to the download link, there’s a <strong>sha</strong> provided by the organisation. On hovering on it, we see that it is SHA512. Click on it to download and view the SHA Hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_zFDUB-wEDx2bwQEOilzw.jpeg" /></figure><p>OR download using wget</p><pre>wget <a href="https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.12.1-arm64.deb.sha512">https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.12.1-arm64.deb.sha512</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3iulU6kWlv2nsrxGFEC-A.png" /></figure><p>3. Now, generate SHA512 for the downloaded package and compare it with the one in .sha512 file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aIdquTRhTYkqZ6uCJCd2Pw.png" /></figure><p>Generate File SHA512:</p><pre>shasum -a 512 elasticsearch-7.12.1-arm64.deb</pre><p>Read SHA512 from the file:</p><pre>cat elasticsearch-7.12.1-arm64.deb.sha512</pre><p>To check for any difference in output:</p><pre>diff &lt;(shasum -a 512 elasticsearch-7.12.1-arm64.deb) &lt;(cat elasticsearch-7.12.1-arm64.deb.sha512)</pre><p>If there’s NO difference, the above command will return NO output.</p><p>The checksum will differ if there’s even a bit difference in the file content, which will confirm that the current file is not the one that is expected to be, possible red flag.</p><p>Other prominent hashing mechanism that can be used are:</p><ul><li>md5sum</li><li>SHA-256</li></ul><p>Reference and Resources:</p><ul><li><a href="https://www.commandlinux.com/man-page/man1/shasum.1.html">shasum</a></li><li><a href="https://www.elastic.co/downloads/elasticsearch">Elasticsearch</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a0ffd100216" width="1" height="1" alt=""><hr><p><a href="https://medium.com/developer-pod/verifying-genuineness-of-downloaded-package-or-file-in-linux-1a0ffd100216">Security: Verifying integrity of package/file in Linux</a> was originally published in <a href="https://medium.com/developer-pod">Developer Pod</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A simple Word Sense Disambiguation application]]></title>
            <link>https://medium.com/data-science/a-simple-word-sense-disambiguation-application-3ca645c56357?source=rss-5f7f435960fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ca645c56357</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[word-sense-disambiguation]]></category>
            <dc:creator><![CDATA[Omkar Deshpande]]></dc:creator>
            <pubDate>Fri, 05 May 2017 08:07:11 GMT</pubDate>
            <atom:updated>2017-05-06T01:03:06.721Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://en.wikipedia.org/wiki/Word-sense_disambiguation">Word Sense Disambiguation</a> (WSD), has been a trending area of research in Natural Language Processing and Machine Learning. WSD is basically solution to the ambiguity which arises due to different meaning of words in different context.</p><p>For example, consider the two sentences.</p><p>“The <strong><em>bank</em></strong> will not be accepting cash on Saturdays. ”</p><p>“The river overflowed the <strong><em>bank.</em></strong>”</p><p>The word<strong><em> bank </em></strong>in the first sentence refers to the commercial (finance) banks, while in second sentence, it refers to the river bank. The ambiguity that arises due to this, is tough for a machine to detect and resolve. Detection of ambiguity is the first issue and resolving it and displaying the correct output is the second issue. <a href="https://github.com/omkar-dsd/mini_projects/blob/master/word_sense_disambiuation/wsd1.py">Here</a>, the code presented is for solving the second issue. Feel free to contribute to it.</p><p><strong><em>Show me the code…</em></strong></p><p>The imports we will be using are,</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a887ee1480f07388efa526bc542a4d19/href">https://medium.com/media/a887ee1480f07388efa526bc542a4d19/href</a></iframe><blockquote><a href="http://www.nltk.org/">Natural Language Toolkit</a> (NLTK) library, is free, open source tool developed by Princeton University. This library does the core functioning for our application. It provides training data sets, Wordnet corpus, various tokenizers , lemmatizers, stemmers and taggers.</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/32920f612d2c066882e8b4e46cfbcc55/href">https://medium.com/media/32920f612d2c066882e8b4e46cfbcc55/href</a></iframe><p>The <em>simpleFilter</em> function takes the given query/sentence as an input and returns list of tokens which are lemmatized. <em>Lemmatization</em> refers to deriving the root word which is morphologically correct. There rises a slight confusion between <strong><em>lemmatization</em></strong> and <strong><em>stemming. </em></strong>However, the two words differ in their flavor. <em>Stemming</em> usually refers to a crude heuristic process that chops off the ends of words in the hope of achieving this goal correctly most of the time, and often includes the removal of derivational affixes. <em>Lemmatization</em> usually refers to doing things properly with the use of a vocabulary and morphological analysis of words, normally aiming to remove inflectional endings only and to return the base or dictionary form of a word, which is known as the <strong><em>lemma</em></strong>.</p><p><em>Stopwords</em>, are the high frequency words in a language which do not contribute much to the topic of the sentence. In English, such words include, ‘a’ , ‘an’ , ‘the’, ‘of’ , ‘to’ , etc.. We remove these words and focus on our main subject/topic, to solve ambiguity. The function is applied to the training data sets as well as user input.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba8bd139debdc10b0d270248412c8d76/href">https://medium.com/media/ba8bd139debdc10b0d270248412c8d76/href</a></iframe><p>Next we perform similarity check, function : <em>similarityCheck</em>, for the filtered sentence tokens that are returned by the first function. Similarity is checked between the given query/sentence tokens and the training data set tokens. For this, the synonym set is loaded for each token word from <em>wordnet</em> corpus. The depth and closeness of a word is calculated and returned on scale of 0–1 . This is the main data that will resolve the ambiguity. The more data you provide, the more accurate it gets. The normalised similarity between sentences is stored.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d13c47ce4989150082bffdd8de3a4dd9/href">https://medium.com/media/d13c47ce4989150082bffdd8de3a4dd9/href</a></iframe><p><em>synonymsCreator </em>is a simplistic function to store the synonyms of the given input word. This will be used is storing the synonyms of the given data set and query tokens. The synonyms will also be taken into consideration while performing similarity check for the sentences.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c4f4df8caa276561cbde5ffdef723eab/href">https://medium.com/media/c4f4df8caa276561cbde5ffdef723eab/href</a></iframe><p>Once the similarity is stored, we apply the next level filter, function: <em>filteredSentence </em>, to apply lemmatization over stemmed tokens and again removing stop words. In the filtered sentence list, we now store the token word along with its synonyms for more precised matching / similarity check. Next, we put all these together.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/81105445a1f5e99ada47cc584c1288ac/href">https://medium.com/media/81105445a1f5e99ada47cc584c1288ac/href</a></iframe><p>What done here, is, the application has been fed with two data set files, first <strong><em>cricketbat.txt </em></strong>, which contains few sentences referring to bat used in cricket sport, and second, <strong><em>vampirebat.txt</em></strong>, which contains few sentences referring to the mammal bird bat. <em>sent1 </em>stores the lowered case string data from the vampirebat.txt file and sent2 does for cricketbat.txt, sent3 stores user query. Next, the sentences are filtered and similarity is checked using the functions explained above. The comparison is normalised, and output is given accordingly whether the query refers to <strong><em>Cricket bat </em></strong>or <strong><em>Mammal bat .</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*u3juK_9WEbLtQSJVLWMbAA.jpeg" /></figure><p>The program gives quiet accurate answers. The only thing it cannot handle are the negation sentences, like “<em>which bat is </em><strong><em>not</em></strong><em> used to play cricket</em>” , “<em>which bat does </em><strong><em>not </em></strong><em>fly” , etc. </em>Feel free to contribute modules to it <a href="https://github.com/omkar-dsd/mini_projects/tree/master/word_sense_disambiuation">HERE</a>.</p><p>The data set and code has been included in the <a href="https://github.com/omkar-dsd/mini_projects/tree/master/word_sense_disambiuation">repository</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ca645c56357" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/a-simple-word-sense-disambiguation-application-3ca645c56357">A simple Word Sense Disambiguation application</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>