<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Code_Jedi</title>
    <description>The latest articles on DEV Community by Code_Jedi (@code_jedi).</description>
    <link>https://dev.to/code_jedi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F663681%2F38344773-8216-4145-b01a-a2e10aab88f1.png</url>
      <title>DEV Community: Code_Jedi</title>
      <link>https://dev.to/code_jedi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/code_jedi"/>
    <language>en</language>
    <item>
      <title>12 Obscure Ethical Hacking Techniques for Bug Bounties</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Sat, 14 Oct 2023 08:24:33 +0000</pubDate>
      <link>https://dev.to/code_jedi/12-obscure-ethical-hacking-techniques-for-bug-bounties-58i</link>
      <guid>https://dev.to/code_jedi/12-obscure-ethical-hacking-techniques-for-bug-bounties-58i</guid>
      <description>&lt;p&gt;Bug bounty programs have revolutionized the way companies approach cybersecurity. These initiatives invite ethical hackers to discover and report vulnerabilities in exchange for monetary rewards. As these programs become increasingly popular, the competition among hackers to find and report bugs grows fiercer. To stand out and claim those coveted bounties, it's essential to delve into obscure ethical hacking techniques. In this article, we will explore some lesser-known strategies that can help you get ahead in the bug bounty game.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Subdomain Enumeration
&lt;/h2&gt;

&lt;p&gt;While subdomain enumeration might not be obscure to seasoned hackers, it is often overlooked by beginners. Many organizations have a complex web of subdomains that are less frequently monitored and easier to exploit. Using tools like Amass, Sublist3r, or SubFinder can help you discover these overlooked domains. By identifying subdomains and performing reconnaissance on them, you can find vulnerabilities that others might miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. API and Mobile Application Testing
&lt;/h2&gt;

&lt;p&gt;Many bug bounty hunters primarily focus on web applications, but mobile apps and APIs are equally lucrative targets. Mobile applications often have weak authentication, insecure data storage, or other vulnerabilities that are overlooked. By delving into the world of mobile app security, you can find unique bugs like insecure API endpoints, sensitive data exposure, or even server-side issues.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Fuzzing Techniques
&lt;/h2&gt;

&lt;p&gt;Fuzzing involves feeding an application with a large number of random or semi-random data in an attempt to crash it or discover vulnerabilities. This technique is commonly used, but there are obscure avenues to explore within fuzzing, such as differential fuzzing and protocol-specific fuzzing. Differential fuzzing compares the behavior of two or more similar implementations of a protocol, aiming to find inconsistencies and potential vulnerabilities. Protocol-specific fuzzing targets specific protocols like DNS, DHCP, or SMB, which are often overlooked by other hackers.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Web Caching and CDN Exploitation
&lt;/h2&gt;

&lt;p&gt;Content Delivery Networks (CDNs) and web caching systems are designed to optimize website performance, but they can also introduce security risks. By exploring how these systems interact with the origin server and handling cache-related headers, you may find cache poisoning or data leakage vulnerabilities. These issues can be obscure but have a significant impact on web application security.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Bluetooth Hacking
&lt;/h2&gt;

&lt;p&gt;With the increasing use of IoT devices, Bluetooth hacking presents an emerging area for bug hunting. Bluetooth Low Energy (BLE) devices can have vulnerabilities that range from weak encryption to device impersonation. Researchers who dive into this realm can find obscure but high-value bugs that lead to unauthorized access, data theft, or even control over IoT devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Protocol Fuzzing
&lt;/h2&gt;

&lt;p&gt;Protocol fuzzing is a technique where an attacker sends a large amount of random or unexpected data to an application to detect vulnerabilities. This method is especially useful when dealing with applications that use custom or lesser-known protocols. By injecting malformed data and analyzing the application's response, you can uncover unexpected behavior or vulnerabilities that might go unnoticed through traditional testing methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. DOM Clobbering
&lt;/h2&gt;

&lt;p&gt;DOM Clobbering is a method to manipulate the Document Object Model (DOM) of a web page by overwriting objects and properties. This technique can help you find cross-site scripting (XSS) vulnerabilities that might not be easily discoverable using traditional payloads. By carefully manipulating the DOM, you can provoke the application into executing your malicious code.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Binary Analysis
&lt;/h2&gt;

&lt;p&gt;While binary analysis is a more advanced technique, it can be incredibly valuable for bug bounty hunters who target native applications and firmware. Reverse engineering binary files allows you to uncover vulnerabilities and exploits in areas where source code isn't readily accessible. This method is particularly useful for finding security issues in embedded systems, IoT devices, and proprietary software.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Protocol-Level Attacks
&lt;/h2&gt;

&lt;p&gt;Many bug hunters focus on web application security, but protocol-level attacks can be highly rewarding. For example, by understanding and manipulating network protocols, you can find vulnerabilities in networked devices and services. Protocol-level attacks might include DNS cache poisoning, ARP spoofing, or IP fragmentation attacks, all of which can lead to critical security flaws.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Timing Attacks
&lt;/h2&gt;

&lt;p&gt;Timing attacks are subtle and powerful methods to exploit vulnerabilities by exploiting the time it takes for an application to respond to specific inputs. These attacks can reveal cryptographic vulnerabilities, password hashes, and sensitive information. Timing attacks are often overlooked, making them an obscure but effective approach to uncovering security weaknesses.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. Protocol Reverse Engineering
&lt;/h2&gt;

&lt;p&gt;Understanding and reverse engineering custom network protocols can open doors to uncovering obscure security flaws. This is especially useful in scenarios where you are dealing with non-standard communication protocols that may be unique to certain applications or services. By gaining insight into how these protocols work, you can better identify weaknesses and vulnerabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The world of ethical hacking is constantly evolving, and to stay ahead in the bug bounty game, it's crucial to explore lesser-known techniques and vulnerabilities. By delving into subdomain enumeration, mobile apps, fuzzing, web caching, Bluetooth, GraphQL, and firmware and hardware hacking, you can discover obscure but high-value bugs that set you apart from the competition. Remember that while these techniques might be less popular, they can lead to significant payouts and recognition in the bug hunting community. However, always act responsibly, adhere to the bug bounty program's rules, and obtain proper authorization before probing any system or application. Happy bug hunting!&lt;/p&gt;

</description>
      <category>security</category>
      <category>testing</category>
      <category>cybersecurity</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Machine Learning Model Deployment with FastAPI and Docker</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Sun, 24 Sep 2023 08:32:28 +0000</pubDate>
      <link>https://dev.to/code_jedi/machine-learning-model-deployment-with-fastapi-and-docker-llo</link>
      <guid>https://dev.to/code_jedi/machine-learning-model-deployment-with-fastapi-and-docker-llo</guid>
      <description>&lt;p&gt;Machine learning model deployment is a crucial step in making your ML models accessible to users and applications. FastAPI, a modern Python web framework, and Docker, a containerization platform, have gained popularity for their efficiency and simplicity in deploying machine learning models. In this tutorial, we'll walk through the process of deploying a machine learning model using FastAPI and Docker, making it accessible via a RESTful API.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before we get into this article, if you want to learn more on Machine Learning and Docker, I would recommend the tutorials over at &lt;a href="https://bit.ly/48lSwyO"&gt;Educative&lt;/a&gt;, who I chose to partner with for this tutorial.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we begin, ensure you have the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python and pip installed on your system.&lt;/li&gt;
&lt;li&gt;Basic understanding of machine learning and Python.&lt;/li&gt;
&lt;li&gt;Docker installed on your system. You can download it from the official website: &lt;a href="https://www.docker.com/get-started"&gt;https://www.docker.com/get-started&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Create a Machine Learning Model
&lt;/h2&gt;

&lt;p&gt;For this tutorial, we'll use a simple scikit-learn model to classify iris flowers. You can replace it with your own trained model.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a Python script (e.g., &lt;code&gt;model.py&lt;/code&gt;) and define your model:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;joblib&lt;/span&gt;
   &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;sklearn.datasets&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_iris&lt;/span&gt;
   &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;sklearn.ensemble&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;RandomForestClassifier&lt;/span&gt;

   &lt;span class="c1"&gt;# Load the iris dataset
&lt;/span&gt;   &lt;span class="n"&gt;iris&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;load_iris&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;iris&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;iris&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;

   &lt;span class="c1"&gt;# Train a random forest classifier
&lt;/span&gt;   &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;RandomForestClassifier&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="c1"&gt;# Save the trained model
&lt;/span&gt;   &lt;span class="n"&gt;joblib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dump&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'model.joblib'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run the script to train and save your model:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   python model.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a FastAPI App
&lt;/h2&gt;

&lt;p&gt;Now, let's create a FastAPI app that serves the machine learning model as a RESTful API.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new directory for your FastAPI app:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;mkdir &lt;/span&gt;fastapi-docker-ml
   &lt;span class="nb"&gt;cd &lt;/span&gt;fastapi-docker-ml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install FastAPI and Uvicorn:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   pip &lt;span class="nb"&gt;install &lt;/span&gt;fastapi uvicorn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create a FastAPI app script (e.g., &lt;code&gt;app.py&lt;/code&gt;) and define the API:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;   &lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;fastapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastAPI&lt;/span&gt;
   &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;joblib&lt;/span&gt;
   &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

   &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;FastAPI&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

   &lt;span class="c1"&gt;# Load the trained model
&lt;/span&gt;   &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;joblib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'model.joblib'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

   &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;read_root&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
       &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Welcome to the ML Model API"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/predict/"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
       &lt;span class="n"&gt;features&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'features'&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="n"&gt;reshape&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="n"&gt;prediction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;features&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
       &lt;span class="n"&gt;class_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;iris&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target_names&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;prediction&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
       &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"class"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;class_name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create a Dockerfile
&lt;/h2&gt;

&lt;p&gt;To containerize our FastAPI app, we'll create a Dockerfile.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a file named &lt;code&gt;Dockerfile&lt;/code&gt; (without any file extensions) in the same directory as your FastAPI app:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;   &lt;span class="c"&gt;# Use the official Python image&lt;/span&gt;
   FROM python:3.9

   &lt;span class="c"&gt;# Set the working directory in the container&lt;/span&gt;
   WORKDIR /app

   &lt;span class="c"&gt;# Copy the local code to the container&lt;/span&gt;
   COPY . .

   # Install FastAPI and Uvicorn
   RUN pip install fastapi uvicorn

   &lt;span class="c"&gt;# Expose the port the app runs on&lt;/span&gt;
   EXPOSE 8000

   &lt;span class="c"&gt;# Command to run the application&lt;/span&gt;
   CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build and Run the Docker Container
&lt;/h2&gt;

&lt;p&gt;With the Dockerfile in place, you can now build and run the Docker container.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build the Docker image:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   docker build &lt;span class="nt"&gt;-t&lt;/span&gt; fastapi-docker-ml &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Run the Docker container:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   docker run &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; 8000:8000 fastapi-docker-ml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Test the API
&lt;/h2&gt;

&lt;p&gt;Your FastAPI app is now running in a Docker container. You can test it by making POST requests to the &lt;code&gt;/predict/&lt;/code&gt; endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="s2"&gt;"http://localhost:8000/predict/"&lt;/span&gt; &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"accept: application/json"&lt;/span&gt; &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"features": [5.1, 3.5, 1.4, 0.2]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will return the predicted class for the given input features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You've successfully deployed a machine learning model using FastAPI and Docker, creating a RESTful API that can be accessed from anywhere. This approach allows you to easily scale your ML model deployment and integrate it into various applications and services. Explore further by enhancing your FastAPI app, adding authentication, and optimizing your Docker container for production use.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>docker</category>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>Building a Sentiment Analysis App with Python and Hugging Face Transformers</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Sun, 24 Sep 2023 07:51:42 +0000</pubDate>
      <link>https://dev.to/code_jedi/building-a-sentiment-analysis-app-with-python-and-hugging-face-transformers-18f7</link>
      <guid>https://dev.to/code_jedi/building-a-sentiment-analysis-app-with-python-and-hugging-face-transformers-18f7</guid>
      <description>&lt;p&gt;Sentiment analysis, also known as opinion mining, is a natural language processing (NLP) task that involves determining the sentiment or emotional tone expressed in a piece of text. With the help of Hugging Face Transformers, a popular library for NLP, we can easily create a sentiment analysis app that can classify text as positive, negative, or neutral. In this tutorial, we'll walk through the steps to build a sentiment analysis app using Python and Hugging Face Transformers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before we get into this article, if you want to learn more on NLP and Hugging face, I would recommend the tutorials over at &lt;a href="https://bit.ly/48lSwyO"&gt;Educative&lt;/a&gt;, who I chose to partner with for this tutorial.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we begin, make sure you have the following prerequisites:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python 3 installed on your system.&lt;/li&gt;
&lt;li&gt;Basic knowledge of Python programming.&lt;/li&gt;
&lt;li&gt;An understanding of natural language processing (NLP) concepts.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1: Installing the Required Libraries
&lt;/h2&gt;

&lt;p&gt;First, we need to install the necessary Python libraries, including Hugging Face Transformers and Flask, a web framework for building web applications.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;transformers
pip &lt;span class="nb"&gt;install &lt;/span&gt;flask
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Creating a Sentiment Analysis Flask App
&lt;/h2&gt;

&lt;p&gt;Now, let's create a Flask app that performs sentiment analysis using a pre-trained model from Hugging Face Transformers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# app.py
&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torch&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;transformers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pipeline&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;flask&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Flask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Load the sentiment analysis model
&lt;/span&gt;&lt;span class="n"&gt;sentiment_analysis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"sentiment-analysis"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/analyze"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;methods&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;analyze_sentiment&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;
        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

        &lt;span class="c1"&gt;# Perform sentiment analysis
&lt;/span&gt;        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sentiment_analysis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"sentiment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="s"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;]})&lt;/span&gt;

    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;jsonify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)}),&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"__main__"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;debug&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, we create a Flask app with a single route &lt;code&gt;/analyze&lt;/code&gt; that accepts a JSON payload with a "text" field and returns the sentiment analysis result as JSON.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Running the Flask App
&lt;/h2&gt;

&lt;p&gt;Now, let's run our Flask app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your Flask app should start running on &lt;code&gt;http://127.0.0.1:5000/&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Testing the Sentiment Analysis API
&lt;/h2&gt;

&lt;p&gt;You can test the sentiment analysis API using a tool like &lt;code&gt;curl&lt;/code&gt; or by creating a simple client application. Here's an example using Python's &lt;code&gt;requests&lt;/code&gt; library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# client.py
&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"http://127.0.0.1:5000/analyze"&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"I love this product! It's amazing!"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Sentiment: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'sentiment'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Sentiment Score: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'score'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Error: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the client script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python client.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see the sentiment analysis result for the provided text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Congratulations! You've built a simple sentiment analysis app using Hugging Face Transformers and Flask. This app can classify text as positive, negative, or neutral. You can extend this project by improving the user interface, integrating it with a front-end framework, or deploying it to a web server to make it accessible from anywhere. Sentiment analysis has numerous applications, including social media monitoring, customer feedback analysis, and more.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Getting Started with Flutter: Building a Cross-Platform Mobile App</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Sat, 23 Sep 2023 16:19:42 +0000</pubDate>
      <link>https://dev.to/code_jedi/getting-started-with-flutter-building-a-cross-platform-mobile-app-5caa</link>
      <guid>https://dev.to/code_jedi/getting-started-with-flutter-building-a-cross-platform-mobile-app-5caa</guid>
      <description>&lt;p&gt;Flutter, developed by Google, is a popular open-source UI framework for building natively compiled applications for mobile, web, and desktop from a single codebase. It enables developers to create beautiful and high-performance apps for iOS, Android, and the web with a single codebase. In this tutorial, we'll walk through the process of getting started with Flutter and building a simple cross-platform mobile app.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before we get into this article, if you want to learn more on Flutter, I would recommend the tutorials over at &lt;a href="https://bit.ly/3RxEVhP"&gt;Educative&lt;/a&gt;, who I chose to partner with for this tutorial.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we begin, ensure that you have the following tools and knowledge:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Flutter SDK installed on your system. You can download it from the official website: &lt;a href="https://flutter.dev/docs/get-started/install"&gt;https://flutter.dev/docs/get-started/install&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An integrated development environment (IDE) like Visual Studio Code (recommended) or Android Studio with the Flutter plugin installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Basic knowledge of Dart, the programming language used by Flutter.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1: Setting Up Flutter
&lt;/h2&gt;

&lt;p&gt;Let's start by setting up Flutter on your system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install Flutter by following the official installation guide: &lt;a href="https://flutter.dev/docs/get-started/install"&gt;https://flutter.dev/docs/get-started/install&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Verify your installation by running the following command:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   flutter doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will check for any issues with your Flutter installation and provide recommendations to resolve them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Creating a New Flutter Project
&lt;/h2&gt;

&lt;p&gt;Now that Flutter is set up, let's create a new Flutter project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal and run the following command to create a new Flutter app:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   flutter create my_first_flutter_app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;my_first_flutter_app&lt;/code&gt; with your preferred project name.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the project directory:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;cd &lt;/span&gt;my_first_flutter_app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Building the App
&lt;/h2&gt;

&lt;p&gt;Let's build a simple counter app to get started:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the &lt;code&gt;lib/main.dart&lt;/code&gt; file in your project directory. This is the entry point for your Flutter app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Replace the existing code with the following:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;   &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:flutter/material.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

   &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;runApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MyApp&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyApp&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;StatefulWidget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nd"&gt;@override&lt;/span&gt;
     &lt;span class="n"&gt;_MyAppState&lt;/span&gt; &lt;span class="n"&gt;createState&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_MyAppState&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;

   &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;_MyAppState&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;State&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;MyApp&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_counter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

     &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;_incrementCounter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="n"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
         &lt;span class="n"&gt;_counter&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="p"&gt;});&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;

     &lt;span class="nd"&gt;@override&lt;/span&gt;
     &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;MaterialApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
         &lt;span class="nl"&gt;home:&lt;/span&gt; &lt;span class="n"&gt;Scaffold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
           &lt;span class="nl"&gt;appBar:&lt;/span&gt; &lt;span class="n"&gt;AppBar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
             &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Flutter Counter App'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
           &lt;span class="p"&gt;),&lt;/span&gt;
           &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="n"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
             &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Column&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
               &lt;span class="nl"&gt;mainAxisAlignment:&lt;/span&gt; &lt;span class="n"&gt;MainAxisAlignment&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;center&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
               &lt;span class="nl"&gt;children:&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Widget&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;[&lt;/span&gt;
                 &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                   &lt;span class="s"&gt;'Counter:'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;fontSize:&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                 &lt;span class="p"&gt;),&lt;/span&gt;
                 &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                   &lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="si"&gt;$_counter&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;fontSize:&lt;/span&gt; &lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;fontWeight:&lt;/span&gt; &lt;span class="n"&gt;FontWeight&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                 &lt;span class="p"&gt;),&lt;/span&gt;
                 &lt;span class="n"&gt;SizedBox&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                 &lt;span class="n"&gt;ElevatedButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                   &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="n"&gt;_incrementCounter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Increment Counter'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                 &lt;span class="p"&gt;),&lt;/span&gt;
               &lt;span class="p"&gt;],&lt;/span&gt;
             &lt;span class="p"&gt;),&lt;/span&gt;
           &lt;span class="p"&gt;),&lt;/span&gt;
         &lt;span class="p"&gt;),&lt;/span&gt;
       &lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
   &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code defines a simple Flutter app with a counter that increments when a button is pressed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Running the App
&lt;/h2&gt;

&lt;p&gt;You can run your Flutter app on an emulator or a physical device:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Ensure you have an emulator or a physical device connected and recognized by Flutter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the following command to start the app:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   flutter run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will build and run the app on the selected device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Congratulations! You've successfully created a basic Flutter app. Flutter's extensive widget library and cross-platform capabilities make it a powerful choice for developing mobile applications. You can expand on this tutorial by exploring more Flutter widgets, adding navigation, integrating APIs, and building more complex and feature-rich apps. Happy coding!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>programming</category>
      <category>android</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Text Classification with Natural Language Processing (NLP) in Python using Scikit-Learn</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Thu, 21 Sep 2023 18:01:22 +0000</pubDate>
      <link>https://dev.to/code_jedi/text-classification-with-natural-language-processing-nlp-in-python-using-scikit-learn-31od</link>
      <guid>https://dev.to/code_jedi/text-classification-with-natural-language-processing-nlp-in-python-using-scikit-learn-31od</guid>
      <description>&lt;p&gt;Text classification is a fundamental task in natural language processing (NLP) that involves assigning predefined categories or labels to textual data. This technique has a wide range of applications, from sentiment analysis and spam detection to topic categorization. In this article, we'll explore how to perform text classification using Python and the Scikit-Learn library. We'll walk through the process step by step, including data preprocessing, feature extraction, model training, and evaluation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before we get into this article, if you really want to learn NLP and other new technologies, I would recommend tutorials and courses over at &lt;a href="https://bit.ly/48lSwyO"&gt;Educative&lt;/a&gt;, who I am affiliated with.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we get started, make sure you have Python and Scikit-Learn installed on your system. You can install Scikit-Learn using pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;scikit-learn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dataset
&lt;/h2&gt;

&lt;p&gt;For this example, we'll use the "20 Newsgroups" dataset, a collection of newsgroup documents organized into 20 different categories. We'll perform binary text classification to distinguish between two categories: "sci.space" and "comp.graphics."&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Data Preprocessing
&lt;/h2&gt;

&lt;p&gt;Let's begin by loading and preprocessing the dataset. We'll use Scikit-Learn's built-in function to fetch the data and perform some basic text cleaning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;sklearn.datasets&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;fetch_20newsgroups&lt;/span&gt;

&lt;span class="c1"&gt;# Define the categories we want to classify
&lt;/span&gt;&lt;span class="n"&gt;categories&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'sci.space'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'comp.graphics'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# Fetch the training dataset
&lt;/span&gt;&lt;span class="n"&gt;newsgroups_train&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fetch_20newsgroups&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'train'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;categories&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;remove&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'headers'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'footers'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'quotes'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="c1"&gt;# Fetch the testing dataset
&lt;/span&gt;&lt;span class="n"&gt;newsgroups_test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fetch_20newsgroups&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'test'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;categories&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;remove&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'headers'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'footers'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'quotes'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Feature Extraction
&lt;/h2&gt;

&lt;p&gt;To perform text classification, we need to convert the text data into numerical features that machine learning models can understand. We'll use the TF-IDF (Term Frequency-Inverse Document Frequency) vectorizer to do this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;sklearn.feature_extraction.text&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TfidfVectorizer&lt;/span&gt;

&lt;span class="c1"&gt;# Create a TF-IDF vectorizer
&lt;/span&gt;&lt;span class="n"&gt;tfidf_vectorizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;TfidfVectorizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_features&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Fit and transform the training data
&lt;/span&gt;&lt;span class="n"&gt;X_train_tfidf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tfidf_vectorizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fit_transform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newsgroups_train&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Transform the testing data
&lt;/span&gt;&lt;span class="n"&gt;X_test_tfidf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tfidf_vectorizer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newsgroups_test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Model Training
&lt;/h2&gt;

&lt;p&gt;Now, let's train a text classification model. We'll use a simple logistic regression classifier for this example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;sklearn.linear_model&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;LogisticRegression&lt;/span&gt;

&lt;span class="c1"&gt;# Create a logistic regression classifier
&lt;/span&gt;&lt;span class="n"&gt;clf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;LogisticRegression&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Train the model
&lt;/span&gt;&lt;span class="n"&gt;clf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_train_tfidf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;newsgroups_train&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Model Evaluation
&lt;/h2&gt;

&lt;p&gt;Finally, let's evaluate the performance of our text classification model on the test data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;sklearn.metrics&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;accuracy_score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;classification_report&lt;/span&gt;

&lt;span class="c1"&gt;# Make predictions on the test data
&lt;/span&gt;&lt;span class="n"&gt;predicted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;clf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_test_tfidf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Calculate accuracy
&lt;/span&gt;&lt;span class="n"&gt;accuracy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;accuracy_score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newsgroups_test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;predicted&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Accuracy: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;accuracy&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Display classification report
&lt;/span&gt;&lt;span class="n"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;classification_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;newsgroups_test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;predicted&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_names&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;newsgroups_test&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target_names&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Classification Report:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;Text classification is a foundational NLP task with numerous practical applications. By mastering these techniques and exploring more advanced models and datasets, you can leverage the power of NLP for tasks such as sentiment analysis, document categorization, and more. Experiment with different algorithms and feature extraction methods to further improve the accuracy of your text classification models.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>nlp</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How to Edit Images in Bulk With Python( In &lt; 20 Lines of Code )</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Tue, 28 Jun 2022 09:48:31 +0000</pubDate>
      <link>https://dev.to/code_jedi/how-to-edit-images-in-bulk-with-python-in-20-lines-of-code--4b66</link>
      <guid>https://dev.to/code_jedi/how-to-edit-images-in-bulk-with-python-in-20-lines-of-code--4b66</guid>
      <description>&lt;p&gt;Whether it's adding captions, resizing or enhancing, I will demonstrate how you can edit images in bulk using Python in under 20 lines of code.&lt;/p&gt;

&lt;p&gt;First, install &lt;a href="https://pillow.readthedocs.io/en/stable/" rel="noopener noreferrer"&gt;Pillow&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip3 &lt;span class="nb"&gt;install &lt;/span&gt;Pillow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new Python file and place it where it can access your image folder. You can do this by either moving the image folder into your Python file's directory or moving the Python file into your image folder's parent directory.&lt;/p&gt;

&lt;p&gt;You will also have to create a new folder next to your image folder for saving the edited images. I will call the folder "edited" but you can call it whatever you want.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh87m0pn702rm4j9timze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh87m0pn702rm4j9timze.png" alt="Directory"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open your Python file and make the following imports:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;PIL&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;PIL&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ImageFont&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;PIL&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ImageDraw&lt;/span&gt; 
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once that's done, add the following to your Python file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photos&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))):&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using this for loop, you'll be able to automatically edit every image in your folder.&lt;/p&gt;

&lt;p&gt;Now, add the following code into your for loop in order to load the images.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;imgstr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photos&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photos/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;imgstr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add the following code to enhance your images.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;converter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ImageEnhance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;img2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;converter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enhance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will give your images the black/white effect. This is just an example. You can edit your images in other ways such as &lt;a href="https://stackoverflow.com/questions/16373425/add-text-on-image-using-pil" rel="noopener noreferrer"&gt;adding captions&lt;/a&gt; or &lt;a href="https://stackoverflow.com/questions/273946/how-do-i-resize-an-image-using-pil-and-maintain-its-aspect-ratio" rel="noopener noreferrer"&gt;changing size&lt;/a&gt;.&lt;br&gt;
You can refer to the &lt;a href="https://pillow.readthedocs.io/en/stable/" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt; for more methods.&lt;/p&gt;

&lt;p&gt;Finally, you should add the following into your for loop to save the edited versions of your images into your "edited" folder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;img2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;converter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enhance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;img2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;edited/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;imgstr&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="n"&gt;imgstr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You probably noticed that I made the &lt;code&gt;img2.save()&lt;/code&gt; function save the edited images in the &lt;code&gt;.png&lt;/code&gt; format. This is because color enhancements are only compatible with &lt;code&gt;.gif&lt;/code&gt; and &lt;code&gt;.png&lt;/code&gt; images. As far as I'm aware, you only need to convert the images into &lt;code&gt;.png&lt;/code&gt; or &lt;code&gt;.gif&lt;/code&gt; when you're enhancing its color, but if you see the following error when editing your images in other ways, just know that you need to convert them either into &lt;code&gt;.png&lt;/code&gt; or &lt;code&gt;.gif&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OSError: cannot write mode RGBA as JPEG
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Original&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcawhqv98r79iqytjatc8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcawhqv98r79iqytjatc8.jpeg" alt="Original image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edited&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbfw2ort8bdmexpfq8tn4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbfw2ort8bdmexpfq8tn4.png" alt="Edited image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Full Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;PIL&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;ImageEnhance&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;PIL&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ImageFont&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;PIL&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ImageDraw&lt;/span&gt; 
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photos&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))):&lt;/span&gt;
    &lt;span class="n"&gt;imgstr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photos&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;photos/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;imgstr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;converter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ImageEnhance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Color&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;img2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;converter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enhance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;img2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;edited/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;imgstr&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="n"&gt;imgstr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>programming</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Speed Up Your Javascript With These Simple Methods</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Wed, 15 Jun 2022 12:45:23 +0000</pubDate>
      <link>https://dev.to/code_jedi/speed-up-your-javascript-with-these-simple-methods-1509</link>
      <guid>https://dev.to/code_jedi/speed-up-your-javascript-with-these-simple-methods-1509</guid>
      <description>&lt;p&gt;If your Javascript code is running slower than you'd like, or if you just want to know how to make your code faster regardless, stick around for some easy to implement ways of making your Javascript run faster&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom of Webpage
&lt;/h2&gt;

&lt;p&gt;To make your webpage's loading faster, make sure your Javascript code is at the bottom of your HTML webpage's &lt;code&gt;body&lt;/code&gt; tag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Web Workers
&lt;/h2&gt;

&lt;p&gt;If your webpage uses time-intensive Javascript operations, web workers can save you a lot of time. Using web workers can mean the difference between an unresponsive and slow webpage, and a smooth running and fast webpage.&lt;/p&gt;

&lt;p&gt;Web workers are separate threads created by your main Javascript code to work in parallel with the main process. &lt;br&gt;
You can read about web workers and their JS implementation &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Saving DOM Elements
&lt;/h2&gt;

&lt;p&gt;When manipulating the same DOM element multiple times, to speed up your code, you should define it once and then keep referencing it.&lt;br&gt;
&lt;strong&gt;No&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;el1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;green&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;el1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;el1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pink&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;el1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;el1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;green&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;el1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;blue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;el1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pink&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Reduce Library Dependancies
&lt;/h2&gt;

&lt;p&gt;Loading libraries in JS can take up a lot of time, make sure to remove any unneeded library dependancies in your Javascript code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reduce Loop Activity
&lt;/h2&gt;

&lt;p&gt;In Javascript, loops can take quite a lot of time to finish running. A simple way to make your JS loops run faster is by defining the loop parameters before the loop itself.&lt;br&gt;
&lt;strong&gt;No&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;arrlen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;arrlen&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will speed up your for loop because now, instead of getting the length of the "arr" array every single iteration, it will get that value once and reuse it throughout every iteration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid Global Variables
&lt;/h2&gt;

&lt;p&gt;Global variables can slow down your JS code. When defining a variable for the first time, make sure to add the &lt;code&gt;var&lt;/code&gt; prefix to make it a local variable instead of a global one.&lt;br&gt;
&lt;strong&gt;No&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;v1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Yes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;v1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;I hope that these were helpful.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to Convert Unix Time to Datetime and Vice Versa in Python</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Mon, 30 May 2022 10:50:38 +0000</pubDate>
      <link>https://dev.to/code_jedi/how-to-convert-unix-time-to-datetime-and-vice-versa-in-python-1nee</link>
      <guid>https://dev.to/code_jedi/how-to-convert-unix-time-to-datetime-and-vice-versa-in-python-1nee</guid>
      <description>&lt;p&gt;Unix timestamps are unreadable to humans, Datetimes are unreadable to machines. Time often needs to converted between Unix and Datetime. I'll demonstrate how you can do that in Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unix to Datetime
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;
&lt;span class="c1"&gt;#convert unix to datetime
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utcfromtimestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="n"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'%Y-%m-%d %H:%M:%S'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Datetime to Unix
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;
&lt;span class="c1"&gt;#convert unix to datetime
&lt;/span&gt;&lt;span class="n"&gt;dtm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utcfromtimestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="n"&gt;strftime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'%Y-%m-%d %H:%M:%S'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;#convert datetime back to unix
&lt;/span&gt;&lt;span class="n"&gt;dtt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strptime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dtm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'%Y-%m-%d %H:%M:%S'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;timestamp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dtt&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>⚡️20 Easy Ways to Be More Productive as a Developer⚡️</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Mon, 18 Apr 2022 08:07:20 +0000</pubDate>
      <link>https://dev.to/code_jedi/20-easy-ways-to-be-more-productive-as-a-developer-5f99</link>
      <guid>https://dev.to/code_jedi/20-easy-ways-to-be-more-productive-as-a-developer-5f99</guid>
      <description>&lt;p&gt;Everyone wants to be more productive, but how do you become more productive? Well, hopefully you'll find some answers in this article where I've compiled 20 easy, tried and tested methods for becoming more productive as a developer!&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Time boxing
&lt;/h3&gt;

&lt;p&gt;Divide your time into boxes like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;9:30 --&amp;gt; 10:00
Emails

10:00 --&amp;gt; 12:00
Plan new landing page design and functionality

12:00 --&amp;gt; 13:00
Lunch and break

13:00 --&amp;gt; 15:00
Editing Documentation

15:00 --&amp;gt; 17:30
Work on redesigning landing page
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Deep work
&lt;/h3&gt;

&lt;p&gt;Deep work is a productivity method that's all about getting into the zone. The idea is that you try working non-stop for long periods of time(2 to 3 hours) so that you get into a sort of flow. Then, when you're in that flow, it's going to be hard to break out and start procrastinating again.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The 80/20 Rule
&lt;/h3&gt;

&lt;p&gt;Also called the Pareto Principle, the 80/20 Rule encourages you to do more of your highest value work. It suggests that 80% of your output tends to come from only 20% of your efforts. This method is about identifying which of your tasks provide the biggest return and prioritizing them. It is about spending your energy on the “right work” instead of wasting time on the minor details.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The Rule of Three
&lt;/h3&gt;

&lt;p&gt;The Rule of Three is a great technique for people who are overly ambitious, or write to-do lists that they rarely ever complete. It’s about prioritizing what’s most important and focusing on having a meaningful outcome for your day. This technique simply entails writing down three things you want to achieve each day. Crucially, they shouldn’t be tasks – they should be results, like “Application deployed to AWS”. By kicking off your day with three meaningful intentions, you’re continually reminding yourself of what’s important and what you should be focusing on. This seemingly small action can have a big outcome.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Do Something
&lt;/h3&gt;

&lt;p&gt;We've all been in a rut (really unproductive time-period) where we don't seem to have any motivation or energy, and we just generally feel unable to get any work done. When this happens, the best thing to do is to do something. Do some chores around the house/apartment, write some code(doesn't have to relevant to your job/projects), write a blog post. Just doing &lt;strong&gt;something&lt;/strong&gt; productive is often the best way to get out of a rut and getting back on track!&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Eat the Frog
&lt;/h3&gt;

&lt;p&gt;Think of that thing that you've been procrastinating on for a long time. This can be a hard project, or learning something that's intimidating. Now, start on it with no hesitation. Just start. You might be afraid of making mistakes or not quite getting it the first time, but once you start, you'll gradually become more and more comfortable with that task!&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Don’t Repeat Yourself
&lt;/h3&gt;

&lt;p&gt;The Don’t Repeat Yourself method (or DRY Principle) is about saving time by reusing and recycling work you’ve already done. Repetition is by its nature inefficient and needless, so the DRY Principle encourages you to create workflows and templates to minimize it. You can apply this principle to code, emails, blog posts and much more!&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Don’t Repeat Yourself
&lt;/h3&gt;

&lt;p&gt;Just kidding ;)&lt;/p&gt;

&lt;h3&gt;
  
  
  8. The two-minute rule
&lt;/h3&gt;

&lt;p&gt;The two-minute rule suggests that if you have any tasks on your to-do list that will take two minutes or less to complete, you should just do them now. The purpose of this method is to overcome procrastination by taking immediate action – so if you have an email to respond to and it’s weighing on your mind, reply to it now if it will only take two minutes to do so. This will make you feel you’ve accomplished something, which in turn boosts your motivation and builds momentum. Plus, it helps clear your mind and stops you from worrying about all those tiny tasks you still have to do.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Single-tasking
&lt;/h3&gt;

&lt;p&gt;Multi-tasking can be a killer of productivity. Single-tasking is a method that encourages you to focus on one thing at a time. This way, you will spend less time and energy on going back and forth between tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Must, Should, Want
&lt;/h3&gt;

&lt;p&gt;Before starting your day, create a list based on these criteria:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I must ...
I need to ...
I want to ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will help you prioritize your tasks and set your intention for the day.&lt;/p&gt;

&lt;h3&gt;
  
  
  11. The Eisenhower Matrix
&lt;/h3&gt;

&lt;p&gt;I know this sounds very fancy but this method is just about making a list of all of the tasks you need to do, then put them into four different categories.&lt;/p&gt;

&lt;p&gt;These four categories are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Urgent and important tasks
Important but not urgent tasks
Urgent but not important tasks
Not urgent or important tasks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will help you prioritize your time for different tasks based on where they are within the categories.&lt;/p&gt;

&lt;h3&gt;
  
  
  12. Biological Prime Time
&lt;/h3&gt;

&lt;p&gt;Start by discovering your natural energy levels throughout the day.&lt;/p&gt;

&lt;p&gt;To do so, take a few weeks to document how energetic you're feeling throughout the day.&lt;/p&gt;

&lt;p&gt;For each hour of the day – give it a grade between 1-10 (10 being high energy). Based on what you’ve discovered – plan your day accordingly. If you naturally have high energy levels in the morning – do the tasks you’ll need the most focus and energy for in the morning.&lt;br&gt;
If you have low energy levels in the afternoon – save your low energy tasks for that time. These tasks can be going through emails or writing a blog post for dev.to.&lt;/p&gt;
&lt;h3&gt;
  
  
  13. The Weekly Review
&lt;/h3&gt;

&lt;p&gt;Once a week, you’ll want to sit down in a quiet place where you can think and reflect. You could also use a notebook and pen if you wanted to keep physical track of the information.&lt;/p&gt;

&lt;p&gt;You’ll want to review your past week in terms of productivity, energy levels, what worked for you, and what didn’t&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Having a cold shower in the morning made a great productivity change for me.&lt;/li&gt;
&lt;li&gt;Eating too little in the morning made me feel low for the next couple of hours.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition to thinking about how the week went, you’ll want to look at what decisions you made and which ones you wanted to change. You can come up with ideas to improve your results and you can catch up with anything you didn’t get done.&lt;/p&gt;
&lt;h3&gt;
  
  
  14. Pomodoro
&lt;/h3&gt;

&lt;p&gt;This is probably the most famous productivity method out there. The Pomodoro method works like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You work for 20-30 minutes&lt;/li&gt;
&lt;li&gt;You rest for 5-10 minutes&lt;/li&gt;
&lt;li&gt;Repeat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This method encourages the opposite of the deep work method, so if you know that the deep work method works for you, don't bother with this one, and vice versa.&lt;/p&gt;
&lt;h3&gt;
  
  
  15. The Not-to-do list
&lt;/h3&gt;

&lt;p&gt;Lots of productivity methods encourage you to make some sort of to-do list. But not-to-do lists are often overlooked, yet can be very useful for productivity!&lt;br&gt;
At the beginning of your day, make a not-to-do list. This list will contain unproductive things that you want to avoid doing like using Reddit or Twitter, chatting with friends during your working hours or listening to podcasts that distract you.&lt;/p&gt;

&lt;p&gt;This way, you will have a clear idea of the unproductive things you want to avoid doing during your day.&lt;/p&gt;
&lt;h3&gt;
  
  
  16. Organize Tomorrow Today
&lt;/h3&gt;

&lt;p&gt;Organize and plan tomorrow's tasks before you go to sleep. This way, you'd be able to start on those tasks the next day without hesitation or planning.&lt;/p&gt;
&lt;h3&gt;
  
  
  17. The Checklist Manifesto
&lt;/h3&gt;

&lt;p&gt;For everything you do more than once, or simply a complex task you want to complete – start by creating a detailed checklist of what you need to do to complete it the right way.&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Writing a blog post
* Write the outline
* Write the rough content
* Review and edit
* Read through it
* Final review and edit
* Publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  18. Don’t Break the Chain
&lt;/h3&gt;

&lt;p&gt;This method revolves around you completing a daily task over an extended period of time. For each day you’ve completed your task – you simply go to your calendar and mark that day as done. This task can be something like writing a blog post, learning something new or reading a book for 30 minutes.&lt;/p&gt;

&lt;p&gt;The first few days of commitment are usually the hardest – but your motivation to make a change pulls you through.&lt;/p&gt;

&lt;p&gt;As the chain grows longer, not breaking your streak becomes a renewal of its own and motivates you to keep going.&lt;/p&gt;

&lt;h3&gt;
  
  
  19. The SMART goals method
&lt;/h3&gt;

&lt;p&gt;SMART is a goal-setting formula that encourages you to be as detailed and concrete about what it is you are trying to achieve. SMART stands for Specific, Measurable, Assignable, Realistic, Time-related. This means that when you set a goal it should be well defined in a clear way.&lt;/p&gt;

&lt;p&gt;It should include: What it is you are trying to achieve, how you will measure success, who’s in-charge, grounded, and doable, and what’s the time frame in which it needs to be achieved.&lt;/p&gt;

&lt;h3&gt;
  
  
  20. The Recharge method
&lt;/h3&gt;

&lt;p&gt;When you feel that you're tired and can't work anymore, instead of trying to push yourself, acknowledge that you need a break and take it. It's often better to take breaks when you are mentally drained than to push yourself for 3 reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You will make less mistakes &lt;/li&gt;
&lt;li&gt;You will be less stressed&lt;/li&gt;
&lt;li&gt;You will have more mental clarity&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope you found some productivity methods that you think will help you!&lt;/p&gt;

&lt;p&gt;Oh and also, I learned a lot of these methods from the following articles so it would be weird if I didn't reference them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.any.do/blog/productivity-methods-list"&gt;This one&lt;/a&gt; from any.do&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://memory.ai/timely-blog/productivity-techniques"&gt;This one&lt;/a&gt; from memory.ai&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Be sure to check out their articles if you enjoyed this one.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>How to Find Your WiFi Password and Share It With Others Through a QR Code in Bash!</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Thu, 14 Apr 2022 13:50:37 +0000</pubDate>
      <link>https://dev.to/code_jedi/how-to-find-your-wifi-password-and-share-it-with-others-through-a-qr-code-in-bash-260b</link>
      <guid>https://dev.to/code_jedi/how-to-find-your-wifi-password-and-share-it-with-others-through-a-qr-code-in-bash-260b</guid>
      <description>&lt;p&gt;Did you ever forget your WiFi password? Or did you ever have guests over and needed an easy way to share your WiFi? &lt;br&gt;
Well in this mini-tutorial, I'll show how you can easily find your WiFi password and share it with others through a QR code using a command-line tool.&lt;/p&gt;
&lt;h2&gt;
  
  
  Installing the Tool
&lt;/h2&gt;

&lt;p&gt;The tool that is going to allow you to do this needs to be installed through &lt;a href="https://www.npmjs.com/"&gt;NPM&lt;/a&gt; so make sure you have NPM installed. You can use this guide for &lt;a href="https://docs.npmjs.com/downloading-and-installing-node-js-and-npm"&gt;installing NPM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you have NPM installed, install the &lt;strong&gt;wifi-password-cli&lt;/strong&gt; module using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--global&lt;/span&gt; wifi-password-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using the Tool
&lt;/h2&gt;

&lt;p&gt;Now that you have the module installed, use the following to see its usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wifi-password &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will see the following output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;usage: wifi-password &lt;span class="o"&gt;[&lt;/span&gt;options]

optional arguments:
  &lt;span class="nt"&gt;-h&lt;/span&gt;, &lt;span class="nt"&gt;--help&lt;/span&gt;            show this &lt;span class="nb"&gt;help &lt;/span&gt;message and &lt;span class="nb"&gt;exit&lt;/span&gt;
  &lt;span class="nt"&gt;--show-qr&lt;/span&gt;, &lt;span class="nt"&gt;-show&lt;/span&gt;      Show a ASCII QR code onto the terminal/console
  &lt;span class="nt"&gt;--save-qr&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;PATH], &lt;span class="nt"&gt;-save&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;PATH]
                        Create the QR code and save it as an image
  &lt;span class="nt"&gt;--ssid&lt;/span&gt; SSID, &lt;span class="nt"&gt;-s&lt;/span&gt; SSID  Specify a SSID that you have previously connected to
  &lt;span class="nt"&gt;--version&lt;/span&gt;             Show version number
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can simply display your WiFi password through the terminal using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wifi-password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will prompt you with a security sudo user confirmation window:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i9Ck2ukL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dw5xgi2b1vvx96fr6hki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i9Ck2ukL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dw5xgi2b1vvx96fr6hki.png" alt="Security prompt" width="879" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have a macOS, but you will see a different prompt depending on your OS. Enter the required information and your WiFi password will be displayed in terminal!&lt;/p&gt;

&lt;p&gt;You can use the following command to generate and display a QR code of your WiFi password for guests to scan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wifi-password &lt;span class="nt"&gt;--show-qr&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can save this QR code as an image using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wifi-password &lt;span class="nt"&gt;--save-qr&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;PATH]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can choose where to save the image by varying the path argument at the end, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;wifi-password &lt;span class="nt"&gt;--save-qr&lt;/span&gt; /usr/local/images
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope this will come in helpful ;)&lt;/p&gt;

</description>
      <category>bash</category>
      <category>npm</category>
      <category>tutorial</category>
      <category>linux</category>
    </item>
    <item>
      <title>Don't Memorize What You Can Google!</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Sat, 09 Apr 2022 13:51:09 +0000</pubDate>
      <link>https://dev.to/code_jedi/dont-memorize-what-you-can-google-30i</link>
      <guid>https://dev.to/code_jedi/dont-memorize-what-you-can-google-30i</guid>
      <description>&lt;p&gt;This is something that might seem weird for beginners, yet is something that every beginner should know if they want to save their time and frustration.&lt;/p&gt;

&lt;p&gt;What do I mean by "Don't Memorize What You Can Google"?&lt;br&gt;
Simply: Memorize core concepts and functions that are essential for working with your programming language or framework, but don't memorize random functions, code snippets and concepts that you will rarely use! Instead, take advantage of external resources(forums, blogs, notes, books, documentations...) for those things when they are needed.&lt;/p&gt;

&lt;p&gt;Don't memorize things that take 1 minute to find through google like:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxehm1mu6bc6rkgg7wp6r.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxehm1mu6bc6rkgg7wp6r.gif" alt="Googling"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This is Important for Beginners
&lt;/h2&gt;

&lt;p&gt;I've seen beginner programmers memorize random things about a language or framework because they thought that memorizing more will make them more competent since they will be faster since they'd be able to code without using google often.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9w0m10nvmf58e7eryx3b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9w0m10nvmf58e7eryx3b.png" alt="Yes but no"&gt;&lt;/a&gt; &lt;br&gt;
Yes you will code a bit faster, but this approach will backfire sooner or later. See, this approach might make you faster for a bit of time, but it will bring 3 major downsides in the long run:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The first downside is &lt;strong&gt;brain cluttering&lt;/strong&gt;. Trying to clutter your brain with random info that is rarely used is as dumb as it sounds. Instead, you should memorize core concepts, functions and code snippets that you use often.&lt;/li&gt;
&lt;li&gt;The second downside is a &lt;strong&gt;steeper learning curve&lt;/strong&gt;. If the way you learn a new language or framework is by memorizing a ton of different, mostly irrelevant things, you will have a hard time every time you try to learn something new.&lt;/li&gt;
&lt;li&gt;The last downside is &lt;strong&gt;frustration&lt;/strong&gt;. You will likely get frustrated if you can't remember something and when this happens too much, you can turn your programming life into a living hell.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Instead, you should memorize only what is essential for working with your language or framework. For example, if you're working with PHP, you should memorize how to use "GET" and "POST". Or, if you're working with data science in Python, you should memorize how to load a dataset through pandas. You get the idea. Don't worry about the non-essentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;Your brain's "storage" is precious and limited. Don't fill it with random code snippets, functions and concepts.&lt;/p&gt;

&lt;p&gt;See you next time👋&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>discuss</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>15 Creative Web Dev Project Ideas for Your Portfolio (That You Can Finish in a Weekend)</title>
      <dc:creator>Code_Jedi</dc:creator>
      <pubDate>Wed, 06 Apr 2022 14:15:16 +0000</pubDate>
      <link>https://dev.to/code_jedi/15-creative-web-dev-project-ideas-for-your-portfolio-that-you-can-finish-in-a-weekend-3bi2</link>
      <guid>https://dev.to/code_jedi/15-creative-web-dev-project-ideas-for-your-portfolio-that-you-can-finish-in-a-weekend-3bi2</guid>
      <description>&lt;p&gt;Are you tired of blogs telling you to make a to-do app, weather app or personal blog? They're great beginner Web Dev projects, but they've been made a million times.&lt;br&gt;
In this article, I will compile 15 creative, Web Dev project ideas that you can finish in 1 or 2 weekends, and that haven't been made and talked about on literally every Web Dev blog already. Now of course, some of these projects will require a bit of backend 'cause you can't go very far in terms of Web Dev without using a bit of backend.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. An r/place Inspired Platform
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7nortrg0m46gk7z33u0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7nortrg0m46gk7z33u0.png" alt="r/place"&gt;&lt;/a&gt;&lt;br&gt;
This is one that I want to make in the near future myself. Basically, for those of you unfamiliar with r/place, it was basically a sort of game on reddit where users would have a shared canvas and they would try to draw things on the canvas. What made the game challenging is that, since it was played by 10,000s of players at any given time, it was hard to take a chunk of the canvas and draw something significant without it getting destroyed like some people's vain attempt at drawing and maintaining the Canadien flag.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftip9plaub9ut6hxv7f4p.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftip9plaub9ut6hxv7f4p.jpeg" alt="Canadien flag"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can make a Web App that works similar to r/place that will give users the ability to place tiles on a large canvas, as well as limiting their power over the canvas by allowing them to place a tile once every, say, 5 or 10 mins. r/place is very general and has no particular theme. I mean, users could draw flags but most users chose to draw random shit lmao😂.&lt;br&gt;
Unlike r/place, you can make your game themed around programming, music, movies, video games and just about anything else!&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;UI/UX&lt;/li&gt;
&lt;li&gt;Handling user generated content&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2. A Smart Music Player
&lt;/h2&gt;

&lt;p&gt;What if you tried making a music player that doesn't just let you play tracks, but also makes personalized mixes like Spotify? In addition to this you can make it have unique features like for example, making a "bangers" mix that compiles the tracks that you've cranked up your volume for.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;UI/UX&lt;/li&gt;
&lt;li&gt;User data analysis&lt;/li&gt;
&lt;li&gt;Audio event handling(pause, rewind, skip, e.t.c)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  3. A Tweet Agregator
&lt;/h2&gt;

&lt;p&gt;This is one that I've made as a weekend project myself. The idea is that you make a Web App that curates tweets and displays them on a daily basis using the twitter API. You can make one that, say, curates the latest programming tweets from big accounts in the niche.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Working with APIs&lt;/li&gt;
&lt;li&gt;Organizing and displaying data fetched from the API&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  4. A Live Data Visualization Web App
&lt;/h2&gt;

&lt;p&gt;This is one of the easier projects on this list, yet one that is very versatile. You can make a Web App that visualizes live data fetched from an API. This can be, for example, a financial data API where you would visualize the most traded stocks by volume.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Working with APIs&lt;/li&gt;
&lt;li&gt;Organizing and displaying data fetched from API&lt;/li&gt;
&lt;li&gt;Visualizing data on a web page&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  5. A Multi-Functional Unit Converter
&lt;/h2&gt;

&lt;p&gt;There's a lot of units out there. Temperature, Energy, Distance... you name it. A simple yet useful Web Dev project would be a multi-functional unit converter that would be able to convert units from any category like temperature or energy.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Processing user input&lt;/li&gt;
&lt;li&gt;Converting user input through functions and mathematical operations&lt;/li&gt;
&lt;li&gt;Conditional element rendering&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  6. A Platformer Game
&lt;/h2&gt;

&lt;p&gt;While the ability to make games is not something most recruiters look for in a Web Dev. It's fun, and it's nevertheless a good demonstration of what you can do with some HTML and Javascript. &lt;a href="https://codepen.io/takaneichinose/pen/jOYPjgz" rel="noopener noreferrer"&gt;here&lt;/a&gt; is a good example of a web based platformer game. And &lt;a href="https://codepen.io/dissimulate/pen/AGYEby" rel="noopener noreferrer"&gt;here&lt;/a&gt;'s another.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detecting user interactions&lt;/li&gt;
&lt;li&gt;Manipulating web elements&lt;/li&gt;
&lt;li&gt;Game development&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  7. A User Generated Blog
&lt;/h2&gt;

&lt;p&gt;Blogs are much appreciated across the internet. Blogs can be very valuable for businesses. Personal blogs have been made like a million times by Web Devs already, but user-generated blogs like dev.to that have a built-in markdown editor, review algorithm and everything else needed to have a self-sustaining blog is something not many have made, yet is something that is a lot more valuable to businesses that want their blog to grow organically and bring in traffic. This project can be a fine addition to your Web Dev portfolio.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Handling user generated content&lt;/li&gt;
&lt;li&gt;Creating blog recommendation and review algorithms&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  8. A Web Store Landing Page
&lt;/h2&gt;

&lt;p&gt;Upload some designs to &lt;a href="https://www.redbubble.com/" rel="noopener noreferrer"&gt;redbubble&lt;/a&gt;, it takes like 10 mins to setup and like an hour to upload some designs(they don't have to be great). Then, a great Web Dev project idea would be to make your own landing page for your products. Web Devs that can make great product landing pages are more valuable than ever. If you can show that you can make a unique, good looking product/online store landing page, your portfolio won't need much more.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;UI/UX&lt;/li&gt;
&lt;li&gt;Creating landing pages&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  9. A Newsletter Landing Page
&lt;/h2&gt;

&lt;p&gt;Just like with product landing pages, knowing how to make great newsletter landing pages is a valuable Web Dev skill. So if you're trying to grow your newsletter, taking the time to make a great landing page for it will be worthwhile for your portfolio.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;UI/UX&lt;/li&gt;
&lt;li&gt;Creating landing pages&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  10. An Image Editing Web App
&lt;/h2&gt;

&lt;p&gt;I often use online image editing Web Apps such as &lt;a href="https://vectr.com/" rel="noopener noreferrer"&gt;vectr&lt;/a&gt; to make things like cover images. You can make a similar Web App that has a simple UI yet versatile functionality.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Processing user file uploads&lt;/li&gt;
&lt;li&gt;Editing image properties&lt;/li&gt;
&lt;li&gt;Adding/Removing effects and elements&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  11. A Documentation for Your Library or API
&lt;/h2&gt;

&lt;p&gt;If you've ever made something like a library or API, take the time to make a comprehensive, good looking documentation for it. When working with companies that make their own APIs or libraries, knowing how to make a great documentation will make you stand out.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;UI/UX&lt;/li&gt;
&lt;li&gt;Building a well-put together documentation&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  12. A Browser Extension SaaS
&lt;/h2&gt;

&lt;p&gt;Browser extensions are pretty cool and can be used for a variety of things to make your browsing experience better. Many SaaS businesses are implementing their services in a browser extension. You can make your own browser-extension-as-a-Service. Maybe one that solves a problem you've faced while browsing or just a fun add-on for procrastinators ;)&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Browser Extension development&lt;/li&gt;
&lt;li&gt;Knowing your way around the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model" rel="noopener noreferrer"&gt;DOM&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;SaaS development&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  13. Your Own NFT Web Store
&lt;/h2&gt;

&lt;p&gt;I'm not a big fan of NFTs, but the truth is, hate it or love it, businesses from a variety of different industries are expanding into the NFT space. You can make your own NFT web store where you will implement web3 and crypto transaction frameworks. This project is a sure-fire way to get recognized for your web3 development skills and can be a great addition to your portfolio.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Web3 development&lt;/li&gt;
&lt;li&gt;Web3 authentication&lt;/li&gt;
&lt;li&gt;Crypto transaction management&lt;/li&gt;
&lt;li&gt;Encryption/Decryption&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  14. A CSS or JS Library
&lt;/h2&gt;

&lt;p&gt;You don't always have to make your own Web App or website to put on your portfolio. You can just make some useful CSS or JS libraries meant to be integrated with others code.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Writing integratabtle CSS or JS code&lt;/li&gt;
&lt;li&gt;Web Design and/or Javascript Development&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  15. An Image Gallery
&lt;/h2&gt;

&lt;p&gt;This is a project that won't involve much functionality, but is one that can be fun and will show case your web design skills. You can make an image gallery about your favorite cars, plants, west-coast rappers... you name it. &lt;a href="https://codepen.io/ramenhog/pen/MpORPa" rel="noopener noreferrer"&gt;Here&lt;/a&gt;'s a great example, but be sure to be original with your design.&lt;/p&gt;

&lt;p&gt;Skillset demonstrated:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;UI/UX&lt;/li&gt;
&lt;li&gt;Web Design&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;I hope that you found some of these ideas innovative and worthwhile! If this article does well, I'll post a part 2.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>react</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
