<?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 Syed Asad Abbas on Medium]]></title>
        <description><![CDATA[Stories by Syed Asad Abbas on Medium]]></description>
        <link>https://medium.com/@asadbukharee?source=rss-9154542cbfad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1XfxqXGCEkIh-_AodXVxjw.jpeg</url>
            <title>Stories by Syed Asad Abbas on Medium</title>
            <link>https://medium.com/@asadbukharee?source=rss-9154542cbfad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 22:06:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asadbukharee/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[How you can upload a file greater than 25 MB on GitHub]]></title>
            <link>https://medium.com/@asadbukharee/how-you-can-upload-a-file-greater-than-25-mb-on-github-21dbba82860a?source=rss-9154542cbfad------2</link>
            <guid isPermaLink="false">https://medium.com/p/21dbba82860a</guid>
            <category><![CDATA[zip-file]]></category>
            <category><![CDATA[bigfile]]></category>
            <category><![CDATA[large-file]]></category>
            <category><![CDATA[greater-than-25-mb]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Syed Asad Abbas]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 15:28:08 GMT</pubDate>
            <atom:updated>2023-02-24T15:29:23.449Z</atom:updated>
            <content:encoded><![CDATA[<p>👨‍💻 Learn how to upload files larger than 25 MB to GitHub using Git Large File Storage (LFS) in this step-by-step tutorial. Git LFS allows you to store large files in a separate location and only store a pointer to the file in your repository. By following these simple steps, you’ll be able to upload large files to GitHub without exceeding the 📏 size limit. 🚀</p><p><strong>Problem:</strong></p><blockquote>Uploading files to GitHub is a common task for developers, but what happens when the file you want to upload is larger than the 25 MB file size limit? GitHub has a few options to help you with this, including Git Large File Storage (LFS) and cloud storage services.</blockquote><blockquote>In this tutorial, we’ll walk you through the steps to upload a file greater than 25 MB to GitHub using Git LFS.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*bwpLYCnHDryw72Z6IgQ_hQ.jpeg" /><figcaption>upload file larger that 25 MB on github</figcaption></figure><h3>Step 1: Install Git LFS</h3><p>Git LFS is an extension to Git that allows you to store large files in a separate location and only store a pointer to the file in your repository. This means that you can store large files on a separate server, but still have them accessible from your repository.</p><p>To install Git LFS, you need to download and install it on your computer. You can find instructions for your operating system on the <a href="https://git-lfs.github.com/">Git LFS website</a>.</p><h3>Step 2: Initialize Git LFS</h3><p>Once Git LFS is installed, you need to initialize it in your repository. This is a one-time setup step that tells Git LFS to track large files in your repository.</p><p>To initialize Git LFS, run the following command in your repository:</p><pre>git lfs install</pre><h3>Step 3: Track the large file</h3><p>To track the large file in your repository, you need to tell Git LFS which file(s) to track. This is done using the git lfs track command.</p><p>For example, if you have a large file named large-file.zip in a folder named data, you can track it using the following command:</p><pre>git lfs track &quot;data/large-file.zip&quot;</pre><p>This command tells Git LFS to track the large-file.zip file in the data folder.</p><h3>Step 4: Commit and push the changes</h3><p>After you’ve tracked the large file, you can add, commit, and push the changes to your repository as usual.</p><pre>git add .<br>git commit -m &quot;Add large file&quot;<br>git push origin master</pre><p>When you push your changes to GitHub, Git LFS will upload the large file to the Git LFS server and store a pointer to the file in your repository.</p><h3>Conclusion:</h3><p>Uploading large files to GitHub can be a challenge, but with Git LFS, you can easily store large files in a separate location and only store a pointer to the file in your repository. This allows you to keep your repository size small while still having access to large files when you need them.</p><p>By following the steps outlined in this tutorial, you should be able to upload large files to GitHub without any issues. If you run into any problems, make sure to check the Git LFS documentation or reach out to the Git LFS community for help.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21dbba82860a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python Decorators]]></title>
            <link>https://medium.com/@asadbukharee/python-decorators-2a69179a3a29?source=rss-9154542cbfad------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a69179a3a29</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python-decorators]]></category>
            <category><![CDATA[python-code]]></category>
            <dc:creator><![CDATA[Syed Asad Abbas]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 20:21:52 GMT</pubDate>
            <atom:updated>2023-01-20T20:21:52.437Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>Python decorators are a powerful tool that can be used to modify or enhance the functionality of existing functions. These decorators are used to add extra functionality to functions, such as adding logging or caching. In this blog post, we will be exploring the various applications of Python decorators, the motivations behind using them, and some useful examples of their implementation.</p><p><strong>What are Python Decorators?</strong></p><p>Python decorators are a type of function that takes another function as an argument and returns a modified version of that function. They are a way of adding extra functionality to existing functions without having to modify the original code. This is particularly useful for adding dynamic behavior to functions, such as logging, caching, or validation.</p><p>Decorators are defined using the “@” symbol, followed by the name of the decorator function.</p><p>For example, if we wanted to add logging to a function, we could use the following decorator:</p><pre><br>@logging_decorator<br>def my_function():<br>    ...</pre><p>In this example, the function “my_function” will now have logging enabled whenever it is called.</p><p><strong>Motivation for Using Decorators</strong></p><p>The primary motivation for using decorators is to avoid having to modify existing code when additional functionality is needed. This is particularly useful when there are multiple functions that need to be modified in the same way, as it can be time consuming and error prone to modify each function one by one.</p><p>Another benefit of decorators is that they are reusable. This means that the same decorator can be used across multiple functions, and even across different modules or classes. This reduces the amount of code that needs to be written and helps to keep the codebase more organized.</p><p>Finally, decorators can help to make code more readable. By using a descriptive name for the decorator, it can be immediately clear what additional functionality is being added to the function.</p><p><strong>Applications of Python Decorators</strong></p><p>Python decorators can be used in a variety of ways, and are particularly useful for adding logging, caching, validation, and authorization. We will now explore each of these applications in more detail.</p><h3>Logging</h3><p>One of the most common uses of decorators is to add logging to functions. This can be used to track the execution of a function, such as how long it takes to run, or which parameters were used. This can make it easier to debug any issues that may arise.</p><p>For example, the following decorator can be used to log the execution time of a function:</p><pre>import time <br><br>def log_execution_time(func):<br>    def wrapper(*args, **kwargs):<br>        start_time = time.time()<br>        result = func(*args, **kwargs)<br>        end_time = time.time()<br>        print(f&quot;Function {func.__name__} took {end_time - start_time} seconds&quot;)<br>        return result <br>    return wrapper</pre><p>This decorator will log the execution time of the function it is applied to and can be used as follows:</p><pre>@log_execution_time<br>def my_function(a, b):<br>    ...</pre><h3>Caching</h3><p>Decorators can also be used to implement caching. This can be useful for functions that return the same result for the same inputs, as it can significantly improve the performance of the function.</p><p>For example, the following decorator can be used to cache the results of a function:</p><pre>cache = {}<br><br>def cache_results(func):<br>    def wrapper(*args, **kwargs):<br>        key = str(args) + str(kwargs)<br>        if key not in cache:<br>            result = func(*args, **kwargs)<br>            cache[key] = result<br>        return cache[key]<br>    return wrapper</pre><p>This decorator will cache the results of the function it is applied to and can be used as follows:</p><pre>@cache_results<br>def my_function(a, b):<br>    ...</pre><h3>Validation</h3><p>Decorators can also be used to validate the inputs to a function. This can be useful to ensure that only valid arguments are passed to a function, and can help to avoid errors later in the code.</p><p>For example, the following decorator can be used to validate the arguments of a function:</p><pre>def validate_args(func):<br>    def wrapper(*args, **kwargs):<br>        for arg in args:<br>            if not isinstance(arg, int):<br>                raise ValueError(&quot;All arguments must be integers&quot;)<br>        return func(*args, **kwargs)<br>    return wrapper</pre><p>This decorator will validate the arguments of the function it is applied to and can be used as follows:</p><pre>@validate_args<br>def my_function(a, b):<br>    ...</pre><h3>Authorization</h3><p>Finally, decorators can also be used to implement authorization. This can be useful to restrict access to certain functions or resources and can help to keep data protected.</p><p>For example, the following decorator can be used to restrict access to a function:</p><pre>def require_auth(func):<br>    def wrapper(*args, **kwargs):<br>        if not is_authenticated():<br>            raise PermissionError(&quot;Unauthorized&quot;)<br>        return func(*args, **kwargs)<br>    return wrapper</pre><p>This decorator will restrict access to the function it is applied to, and can be used as follows:</p><pre>@require_auth<br>def my_function(a, b):<br>    ...</pre><p><strong>Conclusion</strong></p><p>In this blog post, we have explored the various applications of Python decorators, the motivations behind using them, and some useful examples of their implementation. Decorators are a powerful tool that can be used to modify or enhance the functionality of existing functions without having to modify the original code. They can be used to add logging, caching, validation, and authorization, and can help to make code more readable, maintainable, and secure.</p><p><em>Originally published at </em><a href="https://github.com/AsadBukharee/blogs/blob/main/decorators.md"><em>https://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a69179a3a29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Copy past python virtual environment from one machine to another.]]></title>
            <link>https://medium.com/mover-your-python-virtual-environment-from-one-pc/copy-past-python-virtual-environment-from-one-machine-to-another-b283800213c4?source=rss-9154542cbfad------2</link>
            <guid isPermaLink="false">https://medium.com/p/b283800213c4</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[offline]]></category>
            <category><![CDATA[virtualenv]]></category>
            <dc:creator><![CDATA[Syed Asad Abbas]]></dc:creator>
            <pubDate>Fri, 19 Nov 2021 20:48:54 GMT</pubDate>
            <atom:updated>2021-11-19T20:48:54.962Z</atom:updated>
            <content:encoded><![CDATA[<p>So let&#39;s start.</p><p>The workaround is easy, just move your virtual environment anywhere then edit activate.bat inside scripts\:</p><ol><li>Move to the virtual environment to the desired directory</li><li>Right-click and edit activate.bat located at venv_folder\scripts.</li><li>Change VIRTUAL_ENV variable from:</li></ol><ul><li>set VIRTUAL_ENV=C:\old_directory\venv_name</li></ul><p>into</p><ul><li>set VIRTUAL_ENV=C:\new_directory\venv_name</li></ul><p>Save the edited batch file, and that&#39;s it!</p><p>For Linux</p><p>After doing virtualenv --relocatable yourenv you&#39;ll need to change your VIRTUAL_ENV variable every time you move the directory, so if you don&#39;t want to change it manually, use this.</p><pre>#!/bin/bash \n <br>DIR=&quot;$( cd &quot;$( dirname &quot;${BASH_SOURCE[0]}&quot; )&quot; &gt;/dev/null 2&gt;&amp;1 &amp;&amp; pwd )&quot;<br>EXISTING=$(grep &#39;VIRTUAL_ENV=&#39; bin/activate)  <br>NEWDIR=VIRTUAL_ENV=\&quot;$DIR\&quot;<br>sed -i -e &quot;s|$EXISTING|$NEWDIR|&quot; bin/activate<br>source bin/activate</pre><p>I hope it helps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b283800213c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mover-your-python-virtual-environment-from-one-pc/copy-past-python-virtual-environment-from-one-machine-to-another-b283800213c4">Copy past python virtual environment from one machine to another.</a> was originally published in <a href="https://medium.com/mover-your-python-virtual-environment-from-one-pc">Mover Your Python Virtual Environment from One PC to Another</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host Django Web App Free]]></title>
            <link>https://medium.com/djangofreehosting/host-django-web-app-free-fae1446dc969?source=rss-9154542cbfad------2</link>
            <guid isPermaLink="false">https://medium.com/p/fae1446dc969</guid>
            <dc:creator><![CDATA[Syed Asad Abbas]]></dc:creator>
            <pubDate>Thu, 20 Aug 2020 07:35:08 GMT</pubDate>
            <atom:updated>2020-08-20T07:35:08.600Z</atom:updated>
            <content:encoded><![CDATA[<p>django is an open source, secure and highly scalable python web framework. It is highly recommended for secure web sites. As the framework is based on python, therefor you can easily host your Deep Learning, Machine Learning and AI based projects easily. Without wasting time lets move to django web hosting.</p><p><a href="https://www.pythonanywhere.com/"><strong>Python Any Where</strong></a></p><figure><img alt="Asad bukharee" src="https://cdn-images-1.medium.com/max/349/1*ijlk5WnYdeNHiVmC0br87A.png" /></figure><p>pythonanywhere is on the go code editor. you can access your hosted website along with code editor . There is a good news that it allows to host a single django web site. so let’s see how can we do this</p><ol><li>Start Bash terminal</li><li>Clone your code from github</li><li>get into the code directory</li><li>create virtual environment</li></ol><pre>mkvirtualenv --python=/usr/bin/python3.7  mysite-virtualenv</pre><p>5. install Requirements</p><p><a href="https://www.heliohost.org/signup/"><strong>heliohost.org</strong></a></p><p>HelioHost is a nonprofit organization powered by a community of hobbyists that offer full-featured web hosting services for free. They won’t try to upsell you to any paid plans but if you appreciate their service, you can make a donation.They own their own hardware having professional datacenter in Silicon Valley . Having full-stack access enables them to offer features like unmetered bandwidth and unlimited domains.</p><p>HelioHost is offering free web hosting services to the community for over 12 years.</p><figure><img alt="asad abbas" src="https://cdn-images-1.medium.com/max/595/1*ZZpY8YQ8xS4zdRE_nRm19Q.png" /></figure><p>further explanation <a href="https://www.heliohost.org/">here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fae1446dc969" width="1" height="1" alt=""><hr><p><a href="https://medium.com/djangofreehosting/host-django-web-app-free-fae1446dc969">Host Django Web App Free</a> was originally published in <a href="https://medium.com/djangofreehosting">djangofreehosting</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>