teleren/devto huggingface dataset:
2024 Resolutions and how to achieve them
Tags: webdev, programming, productivity, news
Published: 2024-01-20 07:03:11

Another year another list of resolutions of things to improve and things to let go of.

There is no time like right now. You certainly don’t need to wait for the beginning of a new year to better yourself. Or get the things done you have been putting of. It’s January so we might as well use the extra motivation to get things moving.

What I want to change this year and how I am planning to implement it:

**1. Boost my productivity and procrastinate less**
To keep myself on track I started using [Wise Dash](wisedash.app).
Wise Dash is a browser extension that allows me to see my to do lists, calendar events, Jira, Trello and every other app I can think of all in one spot. The best thing is that it’s not on a website I have to open but on my new tab. If I am clicking a new tab to procrastinate watching YouTube I will get reminded instantly of what I told myself I would be doing instead.

**2. Cycle 3 times per week**
I really love cycling but struggle to make time for it. This year I will go for a ride at least three times every week and track these on Strava. The cool thing with Wise Dash is that I can see my activity right on the dashboard as well so that little nifty extension is gonna help me with two of my resolutions!

**3. Make the bed every morning**
My desk is in the bedroom and a clean and tidy workspace and space around me helps me to stay focused, be productive and get tasks done. I have set up a to do list on Todoist that I can tick off every morning to ensure I stick to this task and get reminded. Wise Dash let’s me integrate my Todoist lists right on my dashboard as well so once again: Wise Dash is my recommendation to stick to your resolutions in 2024.

Happy 2024 — Cheers!
Decoding Unity: The Liskov Substitution Principle (LSP) Uncovered 🎶
Published: 2024-01-20 06:55:35

**🌟 Introduction:**
Greeting, coding maestros! Today, we look in the world of SOLID principles, with our spotlight on the third star: the Liskov Substitution Principle (LSP). 🚀 Picture a Flutter or any other project where subclasses seamlessly replace their base classes, maintaining the balance of functionality — that’s the magic LSP brings to our coding organize.

**🦄 Embracing the Refinement of LSP:**

**Why LSP? 🌈**
In the practice of software development, LSP plays the role of ensuring that subclasses can step into the shoes of their base classes without missing a beat. Imagine your project where new classes easily slide into the codebase, maintaining harmony and functionality.

**What is LSP? 🔮**
LSP dictates that objects of a superclass should be replaceable with objects of a subclass without affecting the correctness of the program. It’s like having a set of magical musical instruments — each unique, yet interchangeable to maintain the balance.

**How LSP Elevates Our Codebase: 🎻**
Let’s look through a Dart code example to witness LSP in action:

```
// Incorrect Approach
class Bird {
  // Violates LSP by implying that all birds can fly, including those that can't, like penguins.
  void fly() {
    print("Bird is flying");
  }
}

class Penguin extends Bird {
  // Penguins can't fly, but they are forced to implement the fly method.
}

// Corrected Approach
abstract class Bird {
  void fly();
}

class Sparrow extends Bird {
  // Implementation for a flying sparrow.
}

class Penguin extends Bird {
  // Penguins might not implement the fly method since they can't fly.
}

```
🚨 Why it Was Wrong:

The initial approach violated LSP by forcing all subclasses to implement the fly method, implying that all birds can fly, even those that can't. This led to incorrect behavior for certain subclasses.

✨ What We Should Do Instead:

The corrected approach introduces an abstract Bird class and allows subclasses to implement methods suitable for their types. Penguins, for instance, aren't forced to implement the fly method.

🌈 Reasons Behind the Approach:

By respecting the uniqueness of each subclass, LSP ensures that replacing objects maintains program correctness. Sparrows can gracefully fly, and penguins are free from unnecessary obligations.

**🚀 Conclusion:**
As our journey through SOLID principles continues, imagine your code as a musical masterpiece where each class plays its unique tune. LSP ensures that replacing instruments doesn’t disrupt the symphony, making your your project an elegant instrument. Stay tuned for our next SOLID lyric: the Interface Segregation Principle! 🎼💻
How to Delete Pinterest Account
Tags: pinterest, account, delete
Published: 2024-01-20 06:55:33

In the digital era, managing online presence is crucial, and sometimes, you may decide it’s time to bid farewell to a particular platform. If you’ve found yourself contemplating the deletion of your Pinterest account, you’re not alone.
Read more: https://viralsocialtrends.com/how-to-delete-pinterest-account/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/97v0iazf1g7nwsxaqut0.jpg)
13 Ways To Speedup Python Loops | Nirmalya Ghosh
Tags: webdev, python, programming, beginners
Published: 2024-01-20 06:54:12

This week pip Trends [newsletter](https://newsletter.piptrends.com/p/13-ways-to-speedup-python-loops-nirmalya) is out. Interesting articles by Nirmalya Ghosh, Fareed Khan, Nuno Bispo, Alexander Obidiegwu, Aman Clement and Ihor Lukianov are covered this week
Online MCA In Artificial Intelligence and Machine Learning
Published: 2024-01-20 06:48:25

**Introduction:** In the rapidly evolving landscape of technology, the integration of **#ArtificialIntelligence** (AI) and **#MachineLearning** (ML) has become instrumental in shaping the future. As industries across the globe embrace these cutting-edge technologies, the demand for skilled professionals has surged. **#OnlineMasterofComputerApplications** (MCA) programs specializing in AI and ML have emerged as a beacon for those aspiring to navigate the complex realms of intelligent systems and data analytics.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lodx35q60zjqm7d467e5.jpeg)

Here we are providing a **OnlineMCADegree** , To know more more about us kindly explore our more blogs : [Online MCA in Artificial Intelligence and Machine Learning ](https://onlinemca.in/online-mca-in-artificial-intelligence/)

#onlinemca #onlinemcadegree #onlinemcadegreeprogram #mcaonline #mcaonlinedegree #mcaonlinedegreeprogram #onlinemcainartificialintelligence #onlinemcainmachinelearning #onlineeducation #onlinedegree #onlinecourse
AI Playground you can run from your laptop 🚀
Tags: productivity, python, ai, beginners
Published: 2024-01-20 06:41:36


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rz3zcxuerbyh4mmamoy1.png)

Every developer building with AI has felt like this. 

Wrangling APIs for different models and moving from one-off playgrounds to production code has become one of the biggest pains of generative AI development. 

But what if there was a way to streamline all this complexity?

Introducing **AIConfig Editor - an AI Playground that you can run directly from your laptop.**

https://github.com/lastmile-ai/aiconfig 

This playground is a one-stop solution to manage multiple AI models, effortlessly compare their results, and smoothly transition your hard work from the prototype stage to production.

All your work is backed to a config JSON that can then be used in code with the AIConfig SDK.

Open the editor whenever you want to edit your prompts in the config - without having to touch ur code or config!

## Try it now!
1. `pip3 install python-aiconfig` 
2. `export OPENAI_API_KEY='your-key'`
3. `aiconfig edit`

Please star our repo: https://github.com/lastmile-ai/aiconfig 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zcpwcpz44l36f9blqj3o.png)

## Features 

- Use any from OpenAI, HuggingFace, Anyscale, and more.
- Supports text, image, and audio models (local or remote)
- Run models on same prompt
- Create prompt templates
- Chain models in UI
- All prompts/settings from UI are saved to config which can be used with an SDK in code

## Github 
Please give us a star on Github to support our open-source project: https://github.com/lastmile-ai/aiconfig 

Happy coding!!
The Open/Closed Principle (OCP): A Balance of Extensibility 🎻
Tags: softwaredevelopment, ocp, cleancode, flutter
Published: 2024-01-20 06:39:47

**🌟 Introduction:**
Greetings, fellow developers! Today, we dive further into the attractive domain of SOLID principles, setting our sights on the second star: the Open/Closed Principle (OCP). 🚀 Imagine a codebase that welcomes change without breaking existing functionality — that’s the magic OCP brings to our Flutter development journey.

**🔄 Unleashing the Power of OCP:**

**Why OCP? 🌌**
In the ever-evolving world of software development, change is the only constant. OCP empowers us to extend our codebase without modifying existing, working code. Think of OCP as the guardian of your code, ensuring it’s open to new features but closed to unnecessary alterations.

**What is OCP? 🔍**
At its core, OCP encourages us to design software entities that are open for extension but closed for modification. Picture your code as a treasure chest, where adding new gems (features) doesn’t require rearranging the existing treasures (code).

**How OCP Transforms Our Codebase: 🧙‍♂️**
Let’s take a look in a Dart code example to witness OCP in action:

```
// Incorrect Approach
class Shape {
  // Violates OCP by using a single method for calculating the area of different shapes.
  double calculateArea(dynamic shape) {
    if (shape is Circle) {
      return 3.14 * shape.radius * shape.radius;
    } else if (shape is Square) {
      return shape.side * shape.side;
    }
  }
}

// Corrected Approach
abstract class Shape {
  double area();
}

class Circle implements Shape {
  // Implementation for calculating the area of a circle.
}

class Square implements Shape {
  // Implementation for calculating the area of a square.
}

```
🚨 Why it Was Wrong:

The initial approach violated OCP by using a single method for calculating the area of different shapes, requiring modification for each new shape.

✨ What We Should Do Instead:

The corrected approach introduces an abstract Shape class and allows each shape to implement its own area method, conforming to OCP.

🌈 Reasons Behind the Approach:

By embracing abstraction, the code becomes open for extension. Adding new shapes is as simple as creating a new class that implements the Shape interface. OCP transforms our codebase into a flexible, extensible masterpiece.

**🎭 Conclusion:**
As we good-bye to the exploration of OCP, visualize your code as an ever-expanding canvas ready to accepet new features. OCP covers the way for a codebase that evolves gracefully, adapting to the changing needs of your Flutter or any other project. Stay tuned for our next SOLID principality: the Liskov Substitution Principle! 🚀💻
Latest Newsletter: Quite Quiet (Issue #150)
Tags: javascript, tech, webdev, discuss
Published: 2024-01-20 06:29:26

---
title: Latest Newsletter: Quite Quiet (Issue #150)
published: true
description: Sort of a quiet week but still a few interesting and important topics: Bitcoin scaling, HTMX, regulation in the EU and open source AI.
tags: javascript, tech, webdev, discuss
---
Latest Newsletter: Quite Quiet (Issue #150)

Sort of a quiet week but still a few interesting and important topics: Bitcoin scaling, HTMX, regulation in the EU and open source AI.

https://markjgsmith.substack.com/p/saturday-20th-january-2024-quite-3d6

Would love to hear any comments and feedback you have.

[@markjgsmith](https://twitter.com/markjgsmith)

#javascript #tech #webdev
Single Responsibility Principle (SRP) Exposed: Crafting Code with a Purpose 🎯
Tags: development, cleancode, srp, dartflutter
Published: 2024-01-20 06:20:35

**🌟 Introduction:**
Welcome back, coding aficionados! Today, we begin on a journey into the heart of SOLID principles, starting with the groundbreaker: the Single Responsibility Principle (SRP). 🚀 Imagine writing code that’s not just functional but also elegant, like a well-crafted piece of art. SRP is here to guide us on this creative path✨.

**🕵️‍♂️ Discovering the Mystery of SRP:**

**Why SRP? 🤔**
The idea is simple: one class, one responsibility. As our Flutter or any other project grows, SRP becomes our compass, guiding us away from the chaos that emerges when one class tries to do it all. Think of SRP as the genius setup, a symphony of well-defined responsibilities.

**What is SRP? 🧐**
In a nutshell, SRP advises for a class to have a single reason to change. A class should be like a superhero, excelling in one specific power. For example, our Task class should focus either on saving data or printing details, but not both.

**How SRP Rescues Us: 🦸‍♀️**
Let’s dive into the Dart code to see SRP in action:

```
// Incorrect Approach
class Task {
  // ... properties ...

  // Violates SRP by handling both saving and printing details.
  void saveAndPrintDetails() {
    // Save task to database
    // Handle printing details here
  }
}

// Corrected Approach
class Task {
  // ... properties ...

  // Separate methods for saving and printing details.
  void saveToDatabase() {
    // Save task to database
  }

  void printDetails() {
    // Print task details
  }
```
🚨 Why it Was Wrong:

The initial approach violated SRP by combining two distinct responsibilities into one method. This led to confusion, increased complexity, and reduced flexibility.

✨ What We Should Do Instead:

The corrected approach separates responsibilities. saveToDatabase focuses on saving, while printDetails handles printing. Each method has a clear purpose, adhering to SRP.

🌈 Reasons Behind the Approach:

By breaking down responsibilities, the code becomes more modular, easier to understand, and adaptable to changes. This sticks to SRP ensures that our Task class excels in its defined roles without unnecessary entanglements.

**🎨 Conclusion:**
As we wrap up our exploration of SRP, imagine your code as a masterpiece. SRP empowers you to craft classes with a clear purpose, making your Flutter or any other project an smart balance of well-arranged responsibilities. Stay tuned for our next SOLID adventure: the Open/Closed Principle! 🎭💻
Unlock the Power of Clean Code: A Journey through SOLID Principles 🚀
Published: 2024-01-20 06:15:07

**Introduction:**
🎉 Welcome to the world of SOLID principles! If you’re a coding enthusiast or a budding developer, this article is your guide to writing cleaner, more maintainable code. Imagine building a house; you’d want a sturdy foundation, right? Similarly, SOLID principles provide the robust foundation for creating software that’s scalable, flexible, and easy to understand.

**🌟 The Need for SOLID Principles :**

**Why SOLID?**
Picture this: You’re working on a Flutter project, and your codebase is growing. Suddenly, making changes becomes a tangled mess, bugs emerge like uninvited guests, and adding new features feels like a puzzle. That’s where SOLID principles come to the rescue!

**What is SOLID?**
SOLID is an acronym representing five principles of object-oriented design: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion. 🏗️ These principles act as guiding lights, steering us away from code chaos towards clarity and maintainability.

**How SOLID Helps:**

Let’s break it down:

**1. Single Responsibility Principle (SRP): 🕵️‍♂️**

- **Why:** Prevents code chaos by ensuring each class has one reason to change.
- **What:** A class should have a single responsibility.
- **How:** Separating concerns enhances readability, simplifies debugging, and promotes flexibility.

**2. Open/Closed Principle (OCP): 🔄**

- **Why:** Enables code extension without modification.
- **What:** Software entities should be open for extension but closed for modification.
- **How:** Introducing new features without altering existing code makes your software more adaptable.

**3. Liskov Substitution Principle (LSP): 🦄**

- **Why:** Promotes interoperability between objects of a base class and its derived classes.
- **What:** Objects of a superclass should be replaceable with objects of a subclass.
- **How:** Ensures derived classes don’t break functionality when used in place of their base classes.

**4. Interface Segregation Principle (ISP): 🧩**

- **Why:** Ensures clients are not forced to depend on interfaces they don’t use.
- **What:** No client should be forced to implement methods it does not use.
- **How:** Breaking interfaces into smaller, specific ones results in cleaner, more manageable code.

**5. Dependency Inversion Principle (DIP): 🔄**

- **Why:** Reduces code coupling and enhances flexibility.
- **What:** High-level modules should not depend on low-level modules; both should depend on abstractions.
- **How:** Abstractions allow for interchangeable implementations, making your code less rigid.

_Let’s understand each one with easy story explanation and code illustration in the next articles_
Personal Economic Resilience
Tags: finance
Published: 2024-01-20 06:10:01

While older generations may have prioritized "living within your means," today's credit-driven culture and the expansion of virtual money can create a sense of abundance that masks underlying limitations. This inflated economy, where banks lend more than they hold, is inherently fragile and prone to sudden crashes, as we've seen with companies and even entire countries buckling under debt burdens. So, what can we do as individuals to navigate this uncertain landscape?

The key lies in making conscious choices and building financial resilience. This doesn't necessarily mean rejecting all credit or living like a hermit. Instead, it's about:

- **Understanding our relationship with money:** Examining our spending habits, values, and goals to develop a healthy financial mindset.

- **Prioritizing essential spending:** Avoiding impulsive purchases and focusing on basic needs like housing, food, and healthcare.

- **Building an emergency fund:** Having a safety net to cushion unexpected expenses and avoid getting trapped in debt cycles.

- **Planning for the future:** Investing in retirement savings and other long-term goals, even if it starts with small, consistent contributions.

- **Borrowing responsibly:** Understanding the terms and risks of credit, only borrowing for essential needs with clear repayment plans.

- **Supporting sustainable businesses:** Choosing companies that prioritize responsible financial practices and long-term value creation.

By taking these steps, we can become financially empowered individuals, less susceptible to the whims of an inflated economy. We can contribute to a healthier financial ecosystem where responsible choices, not excessive debt, drive growth and create a more secure future for ourselves and future generations.

Remember, financial resilience is a journey, not a destination. It's about making informed choices, building knowledge, and adapting to changing circumstances. By taking control of your finances, you can weather any storm and build a stronger foundation for your future.
SOPS, and Rendering Latex
Published: 2024-01-20 06:05:14

This blog post will address the remaining questions from the previous one: understanding the encryption and decryption processes of SOPS, and introducing new developments regarding math rendering.

## SOPS
SOPS (Secrets OPerationS) is a tool for safely encrypting, decrypting, and managing secrets in files. It plays a crucial role in ensuring the protection of sensitive information within configuration files.

I have created a [Wiki](https://github.com/humphd/osd700-winter-2024/wiki/Tech-Stack-%E2%80%90-SOPS-(Secrets-OPerationS)) page, providing an overview of the encryption and decryption processes of SOPS. Check this out!

## Rendering Latex in ChatCraft
In this week, I have also implemented([PR349](https://github.com/tarasglek/chatcraft.org/pull/349),[PR353](https://github.com/tarasglek/chatcraft.org/pull/353)) rendering Latex by using remark-math and Katex Plugins.

Here are the rendering results:

![equation1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0u00vhbqr5isjboe5k81.png)

![equation2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rkqsiiqubt60nim63pd.png)



Here is how to use those plugins:

```ts
import ReactMarkdown from "react-markdown";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import "katex/dist/katex.min.css";

//...
    <ReactMarkdown
      remarkPlugins={[remarkMath, { singleDollarTextMath: false }]}
      rehypePlugins={[rehypeKatex]}
      //...
    />
//...
```

Note that the `singleDollarTextMath: false` in above is force the syntax only use double dollar as the delimiter. So

$$ This equation will be rendered $$
$ This equation will NOT be rendered $

If we don't set this (like the first PR [PR349](https://github.com/tarasglek/chatcraft.org/pull/349) does), we will have conflict with coding in some situation, a good example is sending message related to bash scripts that has $ for the variables:

![conflict2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qoiz3kpkgz713h0hpmj1.png)

![conflict1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mvv1luvb3i78emp134wx.png)

After adding `singleDollarTextMath: false`, this kind of issue will be resolved.

That's it, thanks for reading!
Deploying Apps to AWS with Terraform - Create S3
Tags: tutorial, aws, terraform
Published: 2024-01-20 05:56:32

## 5. Create an S3 bucket with Terraform

**Introduction**

Amazon Web Services (AWS) offers Simple Storage Service (S3) for scalable object storage. Managing AWS infrastructure can be streamlined using Terraform, an Infrastructure as Code (IaC) tool. This article provides a step-by-step guide to creating an S3 bucket in AWS using Terraform.

**Prerequisites**

- Basic knowledge of AWS services, particularly S3.
- Terraform installed on your machine.
- AWS CLI installed and configured with appropriate credentials.

**Step 01: Initialize Terraform**

Create a new directory for your Terraform project and initialize it: In my scenario, I have a directory called `s3_bucket_codes` and created the below Terraform code. 

`terraform-bucket.tf`

```
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.16"
    }
  }

  required_version = ">= 1.2.0"
}

provider "aws" {
  region = "eu-west-2"
}

resource "aws_s3_bucket" "terraformbucket1995" {
  bucket = "terraform-bucket1995"

  tags = {
    Name        = "terraform-bucket1995"
    Environment = "Dev"
  }
}
```

**Step 02: Init, Plan, and Apply**

Run the following command to init your configuration:

```
terraform init
```

Run the following command to plan and apply your configuration:

```
terraform plan
terraform apply
```

**Step 03: Verify the Bucket Creation**

Once Terraform successfully applies the configuration, verify the creation of the S3 bucket in the AWS Management Console or using the AWS CLI.

**Step 04: Clean Up Resources**

To delete the created S3 bucket, simply run:

```
terraform destroy
```

This will remove the S3 bucket and any other resources defined in your Terraform configuration.
Reddy Anna - Unlocking the Secrets of the Online Book and Club
Tags: sports
Published: 2024-01-20 05:49:07

The online platform for cricket betting and trading, Reddy Anna Book, was launched in 2010. Following the publication of Mahadev's book, this service has gained recognition as the largest online platform for exchanging books related to cricket betting. The simplicity with which customers may deposit and withdraw from their accounts sets it apart from competing exchange platforms. This website is under the ownership or management of Reddy anna id Our sole means of contact is through WhatsApp. Reddy Anna Cricket ID online has just introduced a novel method for earning money through betting. Users have access to fast online delivery of cricket IDs and the ability to withdraw funds at any time of the day. This website has a dominant position in the book exchange industry, with a customer base of over 50,000 very contented individuals. Currently, there exist over 200 physical sites.