teleren/devto huggingface dataset:
Developing My Developer Voice
Tags: noob, general, firstpost, softwareengineering
Published: 2024-06-10 18:32:43

Have you ever looked at seemingly unrelated technologies and wondered how they might connect? That's a feeling I get all the time. In 2023, I explored this by connecting a raspberry pi and a Billy Bass Fish puppet and then attempted to run a chat llm on that raspberry pi. While the results were, shall we say, unique, the project solidified my fascination with connections and the importance of documenting the journey.

Why am I joining the Dev.to community?

I see this platform as a way to sharpen my communication skills as a developer. Writing for a public audience will force me to be clear, concise, and well-organized in my explanations. In my opinion, technical documentation is a crucial component of being a professional developer, and I believe consistent posting here will help me refine this skill.

Beyond communication skills, Dev.to allows me to create a record of my knowledge. Documenting my journey as a continuous learner through blog posts will serve as a reference point for the future. Additionally, building a public knowledge base on Dev.to can establish me as a resourceful developer within the community.

So, feel free to comment with your thoughts, share your own experiences, or suggest topics you'd like me to explore. You can also check out my portfolio at https://david.declared.space to learn more about my background.
Best Gynecologist in Hyderabad | Dr.Himabindu Annamraju
Tags: bestgynecologistinhyderabad, drhimabinduannamraju, rainbowhospital, pcos
Published: 2024-06-10 18:29:13

Dr. Himabindu is the best Gynecologist in Hyderabad. She is an Obstetrician and laparoscopic surgeon at Rainbow Hospital, Financial District, Nanakramguda, Hyderabad. She has over 19 years of experience in all aspects of obstetrics and gynecology including her role as a consultant obstetrician & gynecologist at Buckinghamshire Healthcare NHS Trust in the UK.Make an appointment.
Keep your business code separate from the rest
Tags: cleancode, architecture, productivity, programming
Published: 2024-06-10 18:28:10

One of the best things you can do for a codebase is to keep the business logic separate from everything else.

Imagine you have an app from 20 years ago, written in an old framework no one uses anymore. Thousands of people rely on it for their jobs, because it is the only app that deeply understands how this particular industry works.

The user experience could be so much better but the app works and no competitor beat them yet. Now you're tasked with bringing this giant to the modern days by adopting current technologies to improve the overall experience.

You take a quick look at the code, and being a seasoned dev with a sharp sword, you prepare for war. You know it's going to take your team a long time and it's going to be messy. Why?

Because most of your time will be spent untangling the logic that needs to stay from the parts that need to go. And what needs to stay is the business logic. The rest is old framework code no one cares about.

Now, while you untangle this mess, are you going to leave another one for future generations? Of course not. Because you know the current framework you're using now will undoubtedly be replaced by something else in a decade or so, you will do your best to keep the business code separate from everything else.

To do so, ask yourself the following question at all times:

> ## If I were to migrate to a completely different framework tomorrow, would I be able to take the business logic with me?

If the answer is "yes", you're writing code that lasts. If not, you're [borrowing from the future](https://en.wikipedia.org/wiki/Technical_debt) and some refactoring is in order.
Cryptocurrecny Recovery Experts Contact A1 wizard Hackes
Tags: cryptocurrency
Published: 2024-06-10 18:27:25

Cryptocurrecny Recovery Experts Contact A1 wizard Hackes

"I had suffered a significant loss in the cryptocurrency market a few months ago and was struggling to recover." I had invested $598,500 in cryptocurrency with a company that I subsequently discovered online, which I ended up learning it's a standard Crypto scam company. A1 wizard Hackes went above and beyond to assist me in recovering my losses. Their services are superb, and the crew is fantastic, with excellent communication and results. A1 wizard Hackes is highly recommended; look no further. Incase you are a victim of such predicament Please ensure also to reach out to them for help via Contact details Below 

E-mail :  A1wizardhackes @ cyberservices . com
whatsApp : +1 678 439 9760  
Telegram : @ A1wizardhackes
Organization schemes for note taking
Tags: note, beginners, tutorial, orgnization
Published: 2024-06-10 18:22:57

Let's delve into various organization schemes for effective note-taking, along with practical examples:

1. **File and Folder Organization:**
   - **Files**: Think of each note as a separate file (e.g., "MeetingNotes.md" or "ProjectIdeas.txt").
   - **Folders (or Notebooks)**: Create folders to group related notes. For example:
     - **Inbox**: A default folder for quick notes or temporary storage.
     - **Archive**: Store completed or less frequently accessed notes.
     - **Projects**: Organize notes by specific projects or topics (e.g., "ProjectA," "Personal," "Work").
     - **Reference**: For long-term reference material (e.g., research papers, manuals).

2. **Labels and Tags:**
   - **Labels**: Assign descriptive labels to notes (e.g., "Urgent," "Important," "Review").
   - **Tags**: Use tags for cross-referencing (e.g., "Meeting," "Ideas," "Code Snippets").

3. **Metadata**:
   - **Creation Date**: Include timestamps to track when notes were created.
   - **Author**: Useful for collaborative notes (e.g., "Created by John").
   - **Location**: If relevant (e.g., "Conference Notes - Seattle").

4. **Links**:
   - **Internal Links**: Create hyperlinks within notes to connect related content.
   - **External Links**: Reference web pages, articles, or other resources.

**Example Folder Structure**:
- **Inbox**:
  - Unprocessed notes go here initially.
  - Regularly review and move them to appropriate folders.
- **Archive**:
  - Completed or historical notes.
  - Rarely accessed but still valuable.
- **Projects**:
  - Subfolders for each project or topic.
  - E.g., "ProjectA," "ProjectB," "Personal," "Work."
- **Reference**:
  - Subfolders for specific types (e.g., "Research," "Tutorials").
  - Store long-term reference material.

Remember, adapt these structures to your needs and preferences. Consistency is key! 📂📝✨
Golden chance to earn a lot of money
Published: 2024-06-10 18:12:09

I am looking for a non-technical partner to start a business on an AI platform. The ideal collaborator should have their own computer and be able to keep it running 24/7.

Candidates must be from the United States, United Kingdom, Canada, Australia, Mexico, or Argentina and have work authorization in their respective country. This opportunity ensures a passive income of $500 per week.

If interested, please leave a message here or contact me at johnfranklin.web29@gmail.com. 
I look forward to hearing from you.
Defending the Script Length Rule in vue-mess-detector
Tags: webdev, vue
Published: 2024-06-10 18:11:08

Hey everyone,

I've been receiving a lot of feedback on vue-mess-detector, particularly concerning the rule for script length. I understand this rule is a bit controversial, but I wanted to take a moment to explain why I believe it’s not just valid, but essential for writing maintainable code.

## Why Script Length Matters

**Readability**: Long scripts can be difficult to navigate. When scripts are too lengthy, it becomes harder to find specific pieces of code, understand their context, and figure out how different parts interact. Keeping scripts shorter enhances readability and makes life easier for developers, especially those who are new to the project.

**Maintainability**: A shorter script is easier to maintain. Changes are less likely to introduce bugs when the codebase is segmented into smaller, more manageable chunks. This is especially important for large projects where multiple developers might be working on different parts of the same file.

**Testing**: Smaller scripts are easier to test. When functions and components are more concise, unit tests can be more targeted and effective. This leads to more reliable code and a smoother development process.

**Separation of Concerns**: Enforcing a script length limit encourages developers to break their code into smaller, more focused modules. This aligns with the principle of separation of concerns, making the codebase more modular and reusable. For me *this* is the main reason.

## Addressing the Controversy

I understand that some developers feel restricted by this rule. It can seem like an unnecessary limitation, especially when dealing with complex features that naturally require more lines of code. However, I believe that this rule pushes us to think critically about our code structure and encourages best practices in software development.

Rather than viewing the script length rule as a constraint, I see it as a guideline that promotes better coding habits. It’s about finding the balance between flexibility and structure, ensuring that our projects remain clean, efficient, and easy to work with over time.

## Conclusion
While the script length rule in vue-mess-detector might spark debate, I stand by its validity. It's a tool designed to foster maintainable and readable code, which ultimately benefits all developers involved in a project.

I’m always open to feedback and discussions, so feel free to share your thoughts on this. Let's keep improving our code together!

Slap into the code!
Fix SHAP Multiclass Summary Plot - Downgrade to v0.44.1 from 0.45.0
Tags: shap, explainableai, machinelearning
Published: 2024-06-10 18:10:37

Here's a helpful tip for anyone using #SHAP (SHapley Additive exPlanations):

If you're trying to use `shap.summary_plot(shap_values, X_train_tfidf_dense, plot_type="bar")` for a multiclass summary, and it keeps showing a dotted interaction plot regardless of the plot type you pass; it's likely a bug in `v0.45.0`.

Downgrading to v0.44.1 fixed it for me. Hope this saves someone time! 👍 #ExplainableAI

---

For those who don't know what SHAP is, it's a framework that can explain why your #MachineLearning model made that specific prediction and what features contributed to that output.

SHAP (SHapley Additive exPlanations) is a game-theoretic approach to explaining the output of any machine learning model. It connects optimal credit allocation with local explanations using the classic Shapley values from game theory and their related extensions.

---

Below is a straightforward code to demonstrate the issue:

```python
# Create a synthetic dataset
X, y = make_classification(n_samples=100, n_features=5, n_informative=3, n_redundant=1, n_clusters_per_class=1, n_classes=3, random_state=42)
features = [f"Feature {i}" for i in range(X.shape[1])]
X = pd.DataFrame(X, columns=features)

# Train a RandomForest model
model = RandomForestClassifier(n_estimators=50, random_state=42)
model.fit(X, y)

# Create the SHAP Explainer
explainer = shap.TreeExplainer(model)
shap_values = explainer.shap_values(X)

# Plot SHAP values for each class
shap.summary_plot(shap_values, X, plot_type="bar", class_names=['Class 0', 'Class 1', 'Class 2'])
```

---

Here are the screenshots for both versions:

![SHAP Interaction Plot v0.45.0 - BUG](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f10x7vrngs3pr3ktti1l.png)

![SHAP Multiclass Summary Plot (Average impact on model output magnitude) - 0.44.1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a7hnf0gplnwb1i5a7zbm.png)
ACID Transactions
Tags: sql, acid, transactions
Published: 2024-06-10 18:07:07

Have you ever heard the phrase "ACID Transactions"?

- If yes, this post is for you 😎 
- If not, now you know it 😁 

## What are transactions?
In normal life, transactions occur when **you sell - I buy** and vice versa. It represents the process between you and me when we give something to each other with the same value, maybe money or another thing with the same price.
In SQL, it is another definition, transactions **is a unit or sequence of work that is performed on a database**. It can be made manually by the user or automatically by the software. For example:

![Unit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24l7swwpcuv2gz1ksamu.png)
<figCaption>Unit Transaction</figCaption>

![Sequence](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hzc1py2z08z2dst05tl.png)
<figCaption>Sequence Transaction</figCaption>

## What are ACID transactions?
**ACID** is an acronym that refers to the set of 4 key properties of a transaction. Each of them are:

- **Atomicity (A)**
- **Consistency (C)**
- **Isolation (I)**
- **Durability (D)**

### Atomicity
Ensures that a transaction is either fully committed or not executed at all. In other words, **if any part of the transaction fails, the entire transaction is rolled back, and no changes are applied to the database**. This property maintains the accuracy and reliability of the database by treating the transaction as an indivisible unit of work

### Consistency
**Ensures that the database remains valid both before and after a transaction**. In simpler terms, the database schema must adhere to all constraints and rules. If any transaction violates these constraints, it is rolled back, preserving the database’s integrity and ensuring accurate and reliable data.

### Isolation
**Ensures that each transaction operates independently of other transactions**, which means that a transaction’s effects should only become visible to other transactions after it has been committed.

### Durability
**Ensures that any changes made to the database during a transaction are permanent, even in the event of system failure.** Once a transaction is committed, its effects persist, even if the system is destroyed or experiences power loss

## ACID Transactions Use Case
You can apply it to systems that require high reliability and consistency like:
- Banking
- Healthcare 
- E-commerce

## Summary
This is what I know about ACID transactions. Hope you can get some extra knowledge through my post.

Happy coding 😎!
Open-Source Exploitation
Tags: watercooler, opensource, techtalks
Published: 2024-06-10 17:57:45

Hi folks,

This is not my title, but the title of a presentation I saw few days ago. I wanted to share with you as I think it is important for the open source community as a whole.

{% embed https://www.youtube.com/watch?v=9YQgNDLFYq8 %}

For my part, I agree completely to what he said. What about you?
Smart Cities: How Tech is Revolutionizing Urban Living
Tags: webdev, javascript, devops, ai
Published: 2024-06-10 17:53:27

1. **Intelligent Transportation Systems**
   - Advanced traffic management and real-time data integration reduce congestion and improve public transport efficiency.

2. **Energy Efficiency and Smart Grids**
   - Smart grids and renewable energy sources optimize energy consumption, reduce waste, and lower costs.

3. **IoT and Sensor Networks**
   - IoT devices and sensors monitor environmental conditions, infrastructure, and resources to enhance urban management.

4. **Smart Buildings**
   - Automated systems in buildings improve energy efficiency, safety, and comfort through centralized control.

5. **Sustainable Waste Management**
   - Smart waste collection systems use data to optimize routes and schedules, reducing costs and environmental impact.

6. **Public Safety and Security**
   - Surveillance systems and data analytics improve emergency response times and enhance crime prevention strategies.

7. **E-Government and Citizen Services**
   - Digital platforms streamline interactions between citizens and municipal services, increasing accessibility and transparency.

8. **Healthcare and Telemedicine**
   - Remote monitoring and telehealth services provide efficient healthcare solutions, improving access and reducing strain on urban hospitals.

9. **Smart Water Management**
   - Advanced monitoring and management systems ensure efficient use of water resources and early detection of leaks.

10. **Urban Planning and Development**
    - Data analytics and modeling tools support sustainable urban development and help city planners make informed decisions.

Happy Learning 🎉
PYTHON P-3 PROJECT
Published: 2024-06-10 17:52:15

==>Creating a URL shortener is a great project that leverages databases, ORMs, and database diagrams effectively. Here’s how you can approach building a URL shortener using Python with SQLite3 and SQLAlchemy.

**Project: URL Shortener**
**Features**
 

1. _Shorten URLs_
  - Accept long URLs and generate short URLs
  - Ensure unique short URLs
  -Optionally, allow custom short URLs

2._Redirect Short URLs_ 
   -Redirect users to the original URL when 
    they visit the short URL

3._URL Analytics_
   -Track the number of visits to each short 
   URL.

4._User Management(OPTIONAL)_
   -Allow users to register and manage their 
   short URLs .
   -Implement user authentication(login/logout)

5._Database Diagram_
   -Visual representation of the database 
   schema using tools like **dbdiagram.io** or 
   **SQLAlchemy's** build-in features


**Steps to Implement**
1._Setup the Project_

  -Create a new directory for your project
  -Set up a virtual environment
  -Install necessary dependencies: flask, 
  ** sqlalchemy**, **flask_sqlalchemy**, 
  **flask_migrate**

2._Database Design_

 -Define the database schema using SQLAlchemy 
  models
 -Create tables for URLs and Users (if user 
  management is implemented)

3._Database Diagram_

  -Use a tool like dbdiagram.io to create a 
   visual representation of your database 
   schema
  -Alternatively, use SQLAlchemy to generate 
   the schema and visualize it using a library 
   like **ERAlchemy**

4._URL Shortening Logic_

  -Implement logic to generate short URLs
  -Handle URL collisions to ensure unique short 
   URLs

5.Redirect Logic__

  -Implement route to handle redirection from 
   short URLs to original URLs

 6._Analytics_

   -Track and store analytics data such as 
    visit counts and access dates

7._User Management (Optional)_

   -Implement user registration and login using 
    Flask-Login or Flask-Security
   -Allow users to manage their short URLs

8._Testing and Deployment_

  -Write unit tests for your application
  -Deploy the application using a service like 
   Heroku or AWS
Robot input by html & css & javascript
Tags: codepen, javascript, html, css
Published: 2024-06-10 17:48:18

add me on :
Codepen:
https://codepen.io/hussein009
github :
https://github.com/hussein-009
https://heylink.me/hussein009

{% codepen https://codepen.io/hussein009/pen/mdYwRzN %}
Getting started on AWS DeepRacer🏎️
Tags: genain, ai, machinelearning, futureofwork
Published: 2024-06-10 17:48:11

At the beginning of March 2024, I had never created a machine learning model. However, by the end of April, my AWS DeepRacer model ranked in the top 50 in the Middle East & Africa Region competition, earning me a $99 Amazon gift card. Here are some of the lessons I learned along the way.

**Getting Started**
If you don't have an AWS account yet, you'll need to create one. Then, search for DeepRacer and click on "Get Started" in the left menu.

**Setting Up Your First Model and Choosing Training Algorithm**
Give your model an exciting name, like 'super fast model.' On the next page, select the time trial option.

I recommend starting with the PPO training algorithm. While SAC can provide a more optimized model, it only works with a continuous action space, an option available on the next page. 

As for hyperparameters, the default settings are typically sufficient and are designed to work well for most use cases. If your model begins to plateau after several iterations, it might be worth tweaking these settings.

**Writing a Reward Function**
Check out the provided reward function examples. I began with the "follow the center line" model and made a minor adjustment for the first training session. 

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

**Your First Training Session**
After completing the first training session, evaluate your model on a track. Take note of its strengths and, more importantly, its weaknesses. Now, the fun part begins.

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

**Rinse and Repeat**
If you're satisfied with your model's performance, clone it to build on its existing knowledge. For the remaining training sessions, setting the maximum time under stop conditions to 60 to 120 minutes should suffice. If it's too short, the model won't have sufficient learning time; if it's too long, overfitting becomes a concern.

Unless your model's performance deteriorates after a training session, keep cloning your most recent model to build on its existing learning.

**Enjoy the Experience!**
DeepRacer provides a fun and competitive way to get started with machine learning. However, it can become expensive, so be sure to monitor your AWS account billing regularly or try and get AWS credits which helped me, and delete any models you no longer need to keep costs down. See you at the finish line.
Step-by-Step Guide to Typesafe Translations in Next.js Without Third-Party Tools
Tags: nextjs, tutorial, typescript, programming
Published: 2024-06-10 17:44:10

Multilingual support is a critical feature for modern web applications. In this guide, we will walk through how to implement a typesafe translation system in a Next.js application without relying on any third-party libraries. This approach ensures that our translations are robust and maintainable.

## Step 1: Define Translation Data 
Create a directory named **locales** at the root of your project to store your translation files. Inside this directory, create JSON files for each language you want to support. For example, **en.json** for English and **es.json** for Spanish.

locales/en.json:

```json
{
  "greeting": "Hello",
  "farewell": "Goodbye"
}

```

locales/es.json:

```json
{
  "greeting": "Hola",
  "farewell": "Adiós"
}

```

## Step 2: Create Server Action getTranslation 
Define a server action named `getTranslation.ts` to fetch translation data. Here, we utilize an object called dictionaries, mapping language codes to functions that dynamically import the corresponding JSON file.

getTranslation.ts:
```typescript
"use server";

const dictionaries = {
  en: () => import("./locales/en.json").then((module) => module.default),
  es: () => import("./locales/es.json").then((module) => module.default),
};

export default async function getTranslation() {
  const { defaultLang, error } = await getPreferredLang(); // Optional: Determine user's preferred language
  const lang = await dictionaries?.[defaultLang ?? "en"]?.();
  return {
    lang,
    error,
  };
}
```

## Step 3: Create useTranslation Hook
In this example, I used React Query for managing state, but feel free to use any other state management solution of your choice. The main objective remains constant: crafting a versatile hook responsible for fetching translations, thereby enabling its use as a client-side state.

useTranslation.ts:
```typescript
"use client";

import getTranslation from "@/translation/getTranslation";
import { useQuery } from "@tanstack/react-query";

export default function useTranslation() {
  return useQuery({
    queryKey: ["lang"],
    queryFn: () => getTranslation(),
  });
}
```

## Step 4: Integrate Translation in Your Components
Now, let's use our custom hook in an Next.js client component.

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

You can also use the `getTranslation()` server action directly in your server components.

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