<?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: Gerry Aballa</title>
    <description>The latest articles on DEV Community by Gerry Aballa (@gerryaballa).</description>
    <link>https://dev.to/gerryaballa</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%2F590883%2Fe4fa5ba8-97d2-40b7-9bad-5282e6f23ff9.png</url>
      <title>DEV Community: Gerry Aballa</title>
      <link>https://dev.to/gerryaballa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gerryaballa"/>
    <language>en</language>
    <item>
      <title>The only Playwright Test Automation using Python Cheatsheet you need</title>
      <dc:creator>Gerry Aballa</dc:creator>
      <pubDate>Thu, 28 Sep 2023 09:05:16 +0000</pubDate>
      <link>https://dev.to/gerryaballa/the-only-playwright-test-automation-using-python-cheatsheet-you-need-12nd</link>
      <guid>https://dev.to/gerryaballa/the-only-playwright-test-automation-using-python-cheatsheet-you-need-12nd</guid>
      <description>&lt;p&gt;Playwright is a Python library that provides a high-level API for automating web browsers like Chromium, Firefox, and WebKit. &lt;/p&gt;

&lt;p&gt;While learning and practicing using Playwright in Python environments, I came up with this cheatsheet of the most common practices I came about.&lt;/p&gt;

&lt;p&gt;I need help updating this list periodically as code always changes! Feel free to contribute!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Gerry-Aballa/Playwright-Py-Cheatsheet"&gt;Playwright using Python Cheatsheet&lt;/a&gt;&lt;/p&gt;

</description>
      <category>playwright</category>
      <category>testing</category>
      <category>python</category>
    </item>
    <item>
      <title>Automate Your Facebook Presence with this Python Bot</title>
      <dc:creator>Gerry Aballa</dc:creator>
      <pubDate>Sun, 24 Sep 2023 06:01:17 +0000</pubDate>
      <link>https://dev.to/gerryaballa/automate-your-facebook-presence-with-this-python-bot-35me</link>
      <guid>https://dev.to/gerryaballa/automate-your-facebook-presence-with-this-python-bot-35me</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/Gerry-Aballa/Facebook-GraphAPI-Bot"&gt;Github Repo&lt;/a&gt;&lt;br&gt;
Meet me on this &lt;a href="https://www.facebook.com/profile.php?id=61551872334297"&gt;Facebook Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Are you tired of manually posting updates to your Facebook Page every day? Do you want to streamline your social media management? If so, you're in luck! In this blog post, I'll introduce you to a Python script that allows you to automate your Facebook Page posts using the Facebook Graph API.&lt;/p&gt;
&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Before using the script, you need the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Facebook Page and Developer Account:&lt;/strong&gt; You should have a Facebook Page where you want to make posts, and a Facebook Developer Account to obtain the necessary credentials.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access Tokens:&lt;/strong&gt; You need a Facebook Page Access Token, which you can get by creating a Facebook App and configuring permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Python Libraries:&lt;/strong&gt; Make sure you have the required Python libraries installed. You can install them using pip:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   pip install -r requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Configuration
&lt;/h3&gt;

&lt;p&gt;In the &lt;code&gt;keys.py&lt;/code&gt; file, replace the placeholders with your Facebook Page ID and Page Access Token.&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;# keys.py
&lt;/span&gt;
&lt;span class="n"&gt;PAGE_ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'your_page_id'&lt;/span&gt;
&lt;span class="n"&gt;PAGE_ACCESS_TOKEN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'your_access_token'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Set the message and link you want to post in the script:
&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="n"&gt;post_message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Hello Python 🐍. I bet you are awesome today!🚀🚀.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;I am a bot 🤖. Meet me on Github'&lt;/span&gt;
   &lt;span class="n"&gt;post_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;'message'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;post_message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="s"&gt;'link'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'https://github.com/Gerry-Aballa/Facebook-GraphAPI-Bot'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="s"&gt;'access_token'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PAGE_ACCESS_TOKEN&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;&lt;p&gt;Schedule the post time using the &lt;code&gt;schedule.every().day.at()&lt;/code&gt; method. By default, it's set to post at 8:00 AM every day. You can adjust the time to your preference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the script:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   python3 facebook.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script will run indefinitely, posting your message and link at the scheduled time each day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep Your Access Tokens Secure
&lt;/h2&gt;

&lt;p&gt;Remember to keep your Facebook Page Access Token and other sensitive information secure. Avoid sharing them in public repositories or exposing them to unauthorised users. Consider using secure methods like environment variables in production environments.&lt;/p&gt;

&lt;p&gt;With this Python script, you can take the hassle out of Facebook Page management and focus on creating engaging content for your audience.&lt;/p&gt;

&lt;p&gt;Automate your posts, stay connected, and watch your online presence thrive!&lt;/p&gt;

</description>
      <category>api</category>
      <category>python</category>
      <category>facebook</category>
      <category>bot</category>
    </item>
    <item>
      <title>A guide to your first open source contribution 🚀✨</title>
      <dc:creator>Gerry Aballa</dc:creator>
      <pubDate>Tue, 12 Sep 2023 14:19:38 +0000</pubDate>
      <link>https://dev.to/gerryaballa/a-guide-to-your-first-open-source-contribution-ie8</link>
      <guid>https://dev.to/gerryaballa/a-guide-to-your-first-open-source-contribution-ie8</guid>
      <description>&lt;p&gt;This project aims to simplify and guide the way beginners make their first contribution. If you are looking to make your first contribution, follow the steps below.&lt;/p&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;Get the &lt;a href="https://github.com/Gerry-Aballa/initial-contribution"&gt;Project repository&lt;/a&gt; here&lt;br&gt;
Install &lt;a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"&gt;Git&lt;/a&gt; on your machine&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Fork this repository
&lt;/h2&gt;

&lt;p&gt;Fork this repository by clicking on the fork button on the top of this page. This will create a copy of this repository in your account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VHKvbdvE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3909n45hs4xm91zqowfu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VHKvbdvE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3909n45hs4xm91zqowfu.png" alt="fork this repository" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Clone the repository
&lt;/h2&gt;

&lt;p&gt;Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the code button and then click the &lt;em&gt;copy to clipboard&lt;/em&gt; icon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GdKUE8va--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2kxrr2buf3km4uvnep4r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GdKUE8va--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2kxrr2buf3km4uvnep4r.png" alt="clone the repository" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open a terminal and run the following git command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone "url you just copied"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where "url you just copied" (without the quotation marks) is the url to this repository (your fork of this project). See the previous steps to obtain the url.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p0oRydOM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2d4sdkn3o0f0e6rd1t5a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p0oRydOM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2d4sdkn3o0f0e6rd1t5a.png" alt="copy repository url" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&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;git clone git@github.com:this-is-you/initial-contribution.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where &lt;code&gt;this-is-you&lt;/code&gt; is your GitHub username. Here you're copying the contents of the first-contributions repository on GitHub to your computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Create a branch
&lt;/h2&gt;

&lt;p&gt;Change to the repository directory on your computer (if you are not already there):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd initial-contribution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now create a branch using the &lt;code&gt;git switch&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git switch -c your-new-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&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;git switch -c add-automation-mantis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Make changes and commit the changes
&lt;/h2&gt;

&lt;p&gt;Now open &lt;code&gt;Contributions.md&lt;/code&gt; file in a text editor, add your name to it. Don't add it at the beginning or end of the file. Put it anywhere in between. Now, save the file.&lt;br&gt;
If you go to the project directory and execute the command &lt;code&gt;git status&lt;/code&gt;, you'll see there are changes.&lt;/p&gt;

&lt;p&gt;Add those changes to the branch you just created using the &lt;code&gt;git add&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add Contributions.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now commit those changes using the &lt;code&gt;git commit&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "Add your-name to Contributions list"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;replacing &lt;code&gt;your-name&lt;/code&gt; with your name.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Push changes to github
&lt;/h2&gt;

&lt;p&gt;Push your changes using the command &lt;code&gt;git push&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;git push -u origin your-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;replacing &lt;code&gt;your-branch-name&lt;/code&gt; with the name of the branch you created earlier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you get any errors while pushing, click here:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;### Authentication Error
 &lt;pre&gt;remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see &lt;a href="https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/"&gt;https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/&lt;/a&gt; for more information.
fatal: Authentication failed for '&lt;a href="https://github.com//initial-contribution.git/"&gt;https://github.com//initial-contribution.git/&lt;/a&gt;'&lt;/pre&gt;
Go to &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account"&gt;GitHub's tutorial&lt;/a&gt; on generating and configuring an SSH key to your account.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Submit your changes for review
&lt;/h2&gt;

&lt;p&gt;If you go to your repository on GitHub, you'll see a &lt;code&gt;Compare &amp;amp; pull request&lt;/code&gt; button. Click on that button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--srLBz98n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5j0d6xzs9l2e52rc1qes.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--srLBz98n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5j0d6xzs9l2e52rc1qes.png" alt="submit the changes" width="800" height="91"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now submit the pull request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ebE7vFv4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bwh6fjgq608ax4zqb9y5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ebE7vFv4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bwh6fjgq608ax4zqb9y5.png" alt="create a pull request" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What next
&lt;/h2&gt;

&lt;p&gt;Soon I'll be merging all your changes into the main branch of this project. You will get a notification email once the changes have been merged.&lt;br&gt;
You are allowed to delete the created branch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MFiQI5Yx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/89evwu9htyqyu8377yex.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MFiQI5Yx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/89evwu9htyqyu8377yex.png" alt="delete the branch" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congrats! You just completed the standard &lt;em&gt;fork -&amp;gt; clone -&amp;gt; edit -&amp;gt; pull request&lt;/em&gt; workflow that you'll often encounter as a contributor!&lt;/p&gt;

&lt;h3&gt;
  
  
  Tip!
&lt;/h3&gt;

&lt;p&gt;Complete this twice to earn your first &lt;a href="https://github.com/drknzz/GitHub-Achievements"&gt;Github badge&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>github</category>
      <category>opensource</category>
      <category>contributorswanted</category>
    </item>
    <item>
      <title>Automate Your Twitter(X) Presence: Building a Tweet Scheduler Bot in Python</title>
      <dc:creator>Gerry Aballa</dc:creator>
      <pubDate>Thu, 07 Sep 2023 18:00:21 +0000</pubDate>
      <link>https://dev.to/gerryaballa/automate-your-twitterx-presence-building-a-tweet-scheduler-bot-in-python-2al</link>
      <guid>https://dev.to/gerryaballa/automate-your-twitterx-presence-building-a-tweet-scheduler-bot-in-python-2al</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/Gerry-Aballa/twitter-Api-V2-bot"&gt;Github Repo&lt;/a&gt;&lt;br&gt;
&lt;a href="https://twitter.com/HelloPythonBot"&gt;Twitter Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Are you looking for a way to keep your Twitter followers engaged with regular updates or reminders? Perhaps you want to share daily quotes, interesting facts, or simply say "good morning" to your audience at the same time every day. With a simple Python script, you can automate your daily tweets and make your social media presence consistent and reliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Daily Tweet Bot
&lt;/h2&gt;

&lt;p&gt;I've created a Python script that acts as a Twitter bot, allowing you to schedule and automate daily tweets. This script is perfect for individuals, businesses, or organizations that want to maintain a steady and timely social media presence. Whether you're a developer, marketer, or just an avid Twitter user, this bot can save you time and ensure your messages reach your followers every day.&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;p&gt;The bot uses the following key components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tweepy Library&lt;/strong&gt;: It leverages the Tweepy library, which provides an easy way to interact with the Twitter API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scheduling&lt;/strong&gt;: The script employs the &lt;code&gt;schedule&lt;/code&gt; library, which allows you to schedule tasks to be executed at specific times. In this case, we schedule the tweet to be sent every day at 8 AM East Africa Time (EAT).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable Content&lt;/strong&gt;: You can easily customize the tweet content to include any message you desire. Whether it's a daily quote, a weather update, or just a friendly greeting, the choice is yours.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Getting Started
&lt;/h3&gt;

&lt;p&gt;Here's how you can start using this Twitter bot:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set Up Your Twitter Developer Account&lt;/strong&gt;: If you haven't already, create a Twitter Developer Account and set up a Twitter App. This will provide you with the API keys and access tokens needed for authentication.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Install Dependencies&lt;/strong&gt;: Ensure you have the required Python libraries installed. Use &lt;code&gt;pip&lt;/code&gt; to install &lt;code&gt;tweepy&lt;/code&gt; and &lt;code&gt;schedule&lt;/code&gt;.&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;   pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API Keys and Tokens&lt;/strong&gt;: Create a &lt;code&gt;keys.py&lt;/code&gt; file and populate it with your Twitter API keys and access tokens.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customize Your Tweet&lt;/strong&gt;: Modify the &lt;code&gt;sendPost()&lt;/code&gt; function in the script to craft the tweet you want to send daily.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Schedule the Script&lt;/strong&gt;: Use a task scheduler or cloud-based service (e.g., AWS Lambda or Google Cloud Functions) to run the script daily at 8 AM EAT.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start the Bot&lt;/strong&gt;: Launch the script, and it will automatically post your tweet at the specified time each day.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Responsible Usage
&lt;/h3&gt;

&lt;p&gt;While this bot can be a powerful tool for maintaining a consistent Twitter presence, it's essential to use it responsibly. Be mindful of Twitter's rules and guidelines, and avoid spammy behavior. Ensure that your automated tweets provide value to your followers and contribute positively to your online presence.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get the Code
&lt;/h3&gt;

&lt;p&gt;You can find the code for this Twitter bot on &lt;a href="https://github.com/Gerry-Aballa/twitter-Api-V2-bot"&gt;GitHub&lt;/a&gt;. Feel free to explore, contribute, or adapt it to suit your specific needs.&lt;/p&gt;

&lt;p&gt;With this simple Python script, you can streamline your social media management and ensure that your daily tweets go out like clockwork. Happy tweeting! 🐦🤖&lt;/p&gt;

</description>
      <category>python</category>
      <category>bot</category>
      <category>automation</category>
      <category>twitter</category>
    </item>
    <item>
      <title>A Simple Python Dice Rolling Simulator</title>
      <dc:creator>Gerry Aballa</dc:creator>
      <pubDate>Mon, 04 Sep 2023 17:08:16 +0000</pubDate>
      <link>https://dev.to/gerryaballa/a-simple-python-dice-rolling-simulator-5co6</link>
      <guid>https://dev.to/gerryaballa/a-simple-python-dice-rolling-simulator-5co6</guid>
      <description>&lt;p&gt;Dice games have been popular for centuries, and rolling dice is a fundamental part of many board games and tabletop role-playing games. In this blog, we'll explore a simple Python program that simulates rolling a 6-sided die and displays the result using ASCII art. This entertaining project can be a fun addition to your Python coding repertoire and is a great way to practice your programming skills.&lt;/p&gt;

&lt;p&gt;Github link:&lt;br&gt;
&lt;a href="https://github.com/Gerry-Aballa/terminal-dice-roller" rel="noopener noreferrer"&gt;terminal-dice-roller&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Code:&lt;br&gt;
Let's break down the code step by step.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dice Art&lt;/strong&gt;:
```python
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;DICE_ART = {&lt;br&gt;
       1: (&lt;br&gt;
           "┌─────────┐",&lt;br&gt;
           "│         │",&lt;br&gt;
           "│    ●    │",&lt;br&gt;
           "│         │",&lt;br&gt;
           "└─────────┘",&lt;br&gt;
       ),&lt;br&gt;
       # ... (similar entries for values 2 to 6)&lt;br&gt;
   }&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   This dictionary (`DICE_ART`) contains ASCII art representations of the six faces of a standard six-sided die. Each face is represented as a tuple of strings, which will be used later to display the dice face when rolled.

2. **Constants**:
   ```python


   DIE_HEIGHT = len(DICE_ART[1])
   DIE_WIDTH = len(DICE_ART[1][0])
   DIE_FACE_SEPARATOR = " "


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;These constants define the height and width of a die face and the separator character used between multiple dice faces when displayed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;roll_dice()&lt;/code&gt; Function&lt;/strong&gt;:
```python
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;def roll_dice():&lt;br&gt;
       """Simulate rolling a 6-sided die and return the result."""&lt;br&gt;
       return random.randint(1, 6)&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   The `roll_dice()` function generates a random integer between 1 and 6 to simulate rolling a standard six-sided die.

4. **`display_dice(die_value)` Function**:
   ```python


   def display_dice(die_value):
       """Display the ASCII art for the given die value."""
       if die_value in DICE_ART:
           die_face = DICE_ART[die_value]
           for line in die_face:
               print(line)


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This function takes the result of rolling the die and displays the corresponding ASCII art representation. It checks if the provided &lt;code&gt;die_value&lt;/code&gt; exists in the &lt;code&gt;DICE_ART&lt;/code&gt; dictionary and prints the associated art line by line.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;main()&lt;/code&gt; Function&lt;/strong&gt;:
```python
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;def main():&lt;br&gt;
       print("Welcome to the Dice Rolling Simulator!")&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   while True:
       user_input = input("Press Enter to roll the dice or 'q' to quit: ").strip()

       if user_input == 'q':
           print("Goodbye!")
           break

       if user_input == '':
           die_value = roll_dice()
           display_dice(die_value)
       else:
           print("Invalid input. Press Enter to roll or 'q' to quit.")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   The `main()` function serves as the entry point of the program. It displays a welcome message and enters a loop that waits for user input. The user can press Enter to roll the dice or 'q' to quit. It handles user input validation and calls the appropriate functions.

6. **`if __name__ == "__main__":`**:
   This conditional statement ensures that the `main()` function is executed only if the script is run directly, not if it's imported as a module into another script.

**Example**
![A simple python dice rolling simulator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t2slx6qgoob16qiiv88n.png)

**Attention**
You can further enhance this project by adding features like keeping track of the roll history or integrating it into a larger game. You can contribute to this [repo](https://github.com/Gerry-Aballa/terminal-dice-roller) by implementing these. Happy coding and rolling!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>python</category>
      <category>portfolioprojects</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Get Started With Node and NVM on MacOS (M1/ M2) in 2023</title>
      <dc:creator>Gerry Aballa</dc:creator>
      <pubDate>Thu, 08 Dec 2022 06:41:01 +0000</pubDate>
      <link>https://dev.to/gerryaballa/how-to-get-started-with-node-and-nvm-on-mac-m1-m2-in-2023-4bol</link>
      <guid>https://dev.to/gerryaballa/how-to-get-started-with-node-and-nvm-on-mac-m1-m2-in-2023-4bol</guid>
      <description>&lt;h2&gt;
  
  
  What are Node and NVM?
&lt;/h2&gt;

&lt;p&gt;Node.Js, commonly known as Node, is a JavaScript runtime for building server-side or desktop applications. Node Version Manager(NVM) allows you to manage Node versions on your device. It is important because different projects on your device may be needing different versions of Node.&lt;/p&gt;

&lt;p&gt;Having NVM and Node installed is a likely requirement for software engineers in 2023. This article has steps that make it easy to install Node and NVM on the new Apple Silicon Macs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Installing NVM
&lt;/h2&gt;

&lt;p&gt;Run the following command in a new terminal window that will list all the files including hidden files in your device:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;.zshrc&lt;/code&gt; is missing from the list, you need to create it by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch .zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Insure you have the &lt;code&gt;.zshrc&lt;/code&gt; now available in the list. Use cURL command from &lt;a href="https://github.com/nvm-sh/nvm#install--update-script" rel="noopener noreferrer"&gt;this site&lt;/a&gt; to install NVM. Copy and run this command in your terminal. It will look similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will need to refresh the &lt;code&gt;.zshrc&lt;/code&gt; file by running the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source .zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can now confirm that you have NVM installed by running the following command. You should get a figure like &lt;code&gt;0.39.2&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;nvm -v 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Installing Node
&lt;/h2&gt;

&lt;p&gt;Installing Node is now easy. Run this command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm install node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To install a specific version of Node, just add the version number at the end like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm install 18.12.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use Node, you will first have to run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm use node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or run a specific version of Node:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nvm use 18.12.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember Node installation includes the Node Package Manager(NPM). You are ready to use all the resources that Node presents to you. Thank you for getting to the end of this article. You are great!&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@altumcode?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;AltumCode&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/macbook?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>a11y</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
