teleren/devto huggingface dataset:
My Favorite FREE Resources for Learning Technical Skills
Tags: datascience, codenewbie, webdev, programming
Published: 2023-07-19 18:20:23

Finding quality, **free**, online resources for learning technical skills can be hard.

Here's some of my personal favorite **✨ FREE ✨** resources for learning technical topics across disciplines including **Data Science**, **Machine Learning**, **Programming**, and even **Generative AI**!

1️⃣ [Freecodecamp.org](https://www.freecodecamp.org/) : With access to over 9000+ tutorials and tons of technical certifications, I can't recommend this one enough.

2️⃣ [Kaggle Learn](https://www.kaggle.com/learn) : You might be familiar with Kaggle as a place for getting good datasets, but they also have lots of Data Science tutorials you can go through for free with a built-in coding environment!

3️⃣ [Career Essentials in Generative AI by Microsoft and LinkedIn](https://www.linkedin.com/learning/paths/career-essentials-in-generative-ai-by-microsoft-and-linkedin?lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3BURtdda3LRvqQD%2FMybXD%2BPw%3D%3D) : This free LinkedIn Learning course will teach you all you need to know about the fundamentals of Generative AI and the ethics of artificial intelligence.

4️⃣ [The Data Science Interview Book](https://book.thedatascienceinterviewproject.com/) : Need a refresher on data science fundamentals or statistics? This free site will break down everything you need to know to ace a typical data science interview.

5️⃣ [Stratascratch](https://platform.stratascratch.com/) : This site is a great place to practice Data Science and SQL coding problems. The free tier has 600+ data science coding questions, 500+ data science machine learning, product sense, statistics, probability, system design questions, and 50+ data science projects.

**⭐ Like + Follow if you found this valuable! ⭐**
Low Level Design fundamentals
Published: 2023-07-19 18:14:16


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

Prerequisites — OOPs fundamentals

**Solid Principles:**

S — Single Responsibility Principle

O — Open/Closed Principle

L — Liskov Substitution Principle

I — Interface Segmented Principle

D — Dependency Inversion Principle

**Single Responsibility Principle** : A Class should have only one reason to change.

**Open/Closed Principle** : Open for extension but closed for modification.

**Liskov Substitution Principle** : If Class B is the subtype of Class A , then we should be able to replace object of A with B without breaking the behaviour of the program.

**Interface Segmented Principle** : Interfaces should be such , that client should not implement unnecessary functions they do not need.

**Dependency Inversion Principle** : Class should not depend on interfaces , rather than concrete classes.

Advantages of following these principles:

Avoid Duplicate Code.
Easy to maintain.
Easy to understand.
Flexible software.
Reduces complexity.
Automate WhatsApp Messaging with Python using PyWhatKit
Tags: automation, python, beginners
Published: 2023-07-19 18:13:40

WhatsApp has become an integral part of our daily communication, and automating WhatsApp messaging can be a powerful tool for streamlining repetitive tasks. In this article, we'll explore how to leverage Python's PyWhatKit library to send WhatsApp messages programmatically. Whether you want to send reminders, notifications, or personalized messages, PyWhatKit makes the process seamless. By the end of this article, you'll be equipped to automate WhatsApp messaging with ease.


## Prerequisites:

To follow along with this guide, ensure you have the following prerequisites:
- Python installed on your system.
- Access to a working internet connection.
- A smartphone with WhatsApp installed and logged in.

## Installing PyWhatKit:

Before we dive into the code, we need to install the PyWhatKit library. Open your terminal or command prompt and run the following command:

```bash
pip install pywhatkit
```



##Sending WhatsApp Messages:

Let's get started by writing Python code to send a WhatsApp message:

```python
import pywhatkit as pwk

message = "Hello, this is a test message sent using PyWhatKit!"
phone_number = "+1234567890"

try:
    pwk.sendwhatmsg(phone_number, message)
    print(f"Message sent to {phone_number} successfully!")
except Exception as e:
    print(f"An error occurred: {e}")
```


In this example, we imported `pywhatkit` as `pwk`, defined the message content in the `message` variable, and specified the recipient's phone number in the `phone_number` variable. The `pwk.sendwhatmsg()` function is then used to send the WhatsApp message.


## Scheduling Messages:

PyWhatKit allows us to schedule messages for a specific time:

```python
import pywhatkit as pwk

message = "Hello, this is a scheduled message using PyWhatKit!"
phone_number = "+1234567890"
hour = 13
minute = 30

try:
    pwk.sendwhatmsg(phone_number, message, hour, minute)
    print(f"Message scheduled to be sent to {phone_number} at {hour}:{minute} successfully!")
except Exception as e:
    print(f"An error occurred: {e}")
```

In this code, we added `hour` and `minute` parameters to the `pwk.sendwhatmsg()` function to schedule the message for a specific time.


## Best Practices and Considerations:

While automating WhatsApp messaging, keep the following best practices in mind:
- Use automation responsibly and avoid spamming.
- Respect WhatsApp's terms of service to avoid any restrictions on your WhatsApp account.
- Double-check the recipient's phone number before sending messages to avoid unintended recipients.


Automating WhatsApp messaging using Python with PyWhatKit opens up opportunities for enhanced communication and productivity. In this article, we covered how to send messages and schedule them for a specific time. By following best practices and considering ethical usage, you can leverage this automation to simplify tasks and improve communication.

Happy automating and happy coding!
CSS tricks - Resolving Size and Background Challenges with CSS Properties
Tags: css, web, image, frontend
Published: 2023-07-19 16:52:36

As a frontend developer, one common issue we encounter is when clients provide logos with different sizes and backgrounds for placement on websites. This can lead to inconsistencies in appearance. An example of this issue is shown below:


![Image with different size and background ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p7lzf8atg2eks6jyfdyg.png)

To address the problem of varying image sizes, we can utilize the following CSS property to ensure the logos fit properly within their containers while maintaining their aspect ratios:

```javascript
  img {
  object-fit: contain;
  aspect-ratio: 3/2;
}
```
By applying object-fit: contain;, the image size will adjust to fit within the container, and the aspect ratio will be preserved. This results in a more visually pleasing display:

![Image with fixed width](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ugnlhipfbuyyxd2zdl5m.png)

However, even with fixed image sizes, we may still encounter situations where the logo backgrounds do not blend well with the container. To address this, we can use the following CSS properties:

```javascript
   background-blend-mode: soft-light;
   mix-blend-mode: darken;
```

By applying background-blend-mode: soft-light; and mix-blend-mode: darken;, we can blend the logo image with the background color, ensuring a harmonious appearance:

![Logos with matching background and size](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9u2gdyipld28cz5mp2ua.png)

It's important to note that these CSS properties, `background-blend-mode` and `mix-blend-mode`, may not be suitable for all image types or use cases. You can experiment with different property values to achieve the desired results.

By exploring the potential of these CSS properties, we can enhance the visual consistency of logos with various sizes and backgrounds on websites.
[Sample Repo](https://github.com/sureshkannanm/css-solution/tree/main/logo)
kubernets cluster on amazon eks
Published: 2023-07-19 17:55:05

1. create an iam role (eks-cluster)
2. create stack for eks cluster(vpc,subnets,etc...)
3. for creating cluster stack use CloudFormation  templates availabe in amazon documentation [click here](https://docs.aws.amazon.com/eks/latest/userguide/creating-a-vpc.html)
4. after creating  the stack create eks cluster from amazon console and update the required details  and create cluster
6. to communicate local system to the cluster run the below command (run this on your local computer)
 **aws eks update-kubeconfig --name** **your cluster-name**

7. Create Role for **NodeGroup**  and attach the given policies 
       **1. AmazonEC2ContainerRegistryReadOnly** 
       **2. AmazonEKS_CNI_Policy**
       **3. AmazonEKSWorkerNodePolicy**
8. Then Add Node Group goto amazon eks console and create nodegroup under compute tab in your cluster - given a Name and attach the **NodeGroup** role under **Node IAM Role**
New React Course Announcement
Published: 2023-07-19 17:50:31

We have some exciting news for you today!

We are launching a brand new React course that we have been working hard on for a long time. It has some of the existing content, but most of the lessons are completely new. It covers more React concepts and uses the most up-to-date tools in the industry.

The old lessons have been labeled as "OLD" so you can easily tell them apart; they will be gone by 24th July 2023. You can still find the old lessons in our [curriculum repository on GitHub](https://github.com/TheOdinProject/curriculum/tree/main/archive). If you were doing the current React lessons or had finished them, we strongly suggest you start over with the new course. We promise it will be worth it. You don't have to redo the projects.

The Odin Project is a community project, and this course would not have been possible without its contributors. They deserve a big round of applause. The work is not over yet, the course needs to be updated and improved regularly, and this is where you can help. From fixing a typo to adding a new lesson, every contribution matters!

[React course on the Full Stack JavaScript path] (https://www.theodinproject.com/paths/full-stack-javascript/courses/react-new)
[React course on the Ruby on Rails path](https://www.theodinproject.com/paths/full-stack-ruby-on-rails/courses/react-new)

Happy Reactin'!
Reset Sequence in Postgres
Tags: postgres
Published: 2023-07-19 17:26:22

A simple command to update Sequence in your Postgres table:

```sql
SELECT concat('SELECT setval(''', pg_get_serial_sequence(tc.table_name, kcu.column_name), '''::regclass, (SELECT COUNT(id) + 1 FROM ', tc.table_name, '), false);') AS query
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu
  ON kcu.constraint_name = tc.constraint_name
WHERE tc.constraint_type = 'PRIMARY KEY' AND kcu.column_name = 'id' and pg_get_serial_sequence(tc.table_name, kcu.column_name) != '';
```

Copy all the output and run each of it. That's all you need.

Update: 29-07-2023

In case you need to be based on value of last id instead of total record, you can update the above query as following:

```sql
SELECT concat('SELECT setval(''', pg_get_serial_sequence(tc.table_name, kcu.column_name), '''::regclass, (SELECT id + 1 FROM ', tc.table_name, ' ORDER BY id desc limit 1), false);') AS query
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu
  ON kcu.constraint_name = tc.constraint_name
WHERE tc.constraint_type = 'PRIMARY KEY' AND kcu.column_name = 'id' and pg_get_serial_sequence(tc.table_name, kcu.column_name) != '';
```
First python program
Tags: python, vscode
Published: 2023-07-19 17:25:52

This is my first python program ever. I wrote this program as part of a portfolio project required in the codecademy course.

This is a basic Hangman game (without graphics, unfortunately). I am proud I made this by myself. Did not even used ChatGPT.

A nice review would be great !!!

[https://github.com/absoluteheero/Hangman]
Agregar y eliminar elementos de un array en Javascript
Tags: javascript
Published: 2023-07-19 17:15:24

```js
let array = ["primero", "segundo"];
```
## push()
Sirve para agregar un nuevo elemento, al final del array

```js
array.push("tercero");
// ["primero", "segundo", "tercero"]
```

## shift()
Sirve para eliminar el primer elemento [0]

```js
array.shift();
// ["segundo"]
```

## pop()
Sirve para eliminar el último elemento

```js
array.pop();
// ["primero"]
```
How to install font on window operating system
Published: 2023-07-19 17:10:49

To install a font on Windows, we can follow the below steps:

1. **Download the font file:** Find a trusted source online and download the font file (usually in .ttf or .otf format) to your computer.

If you looking for a font who fit to your art [download here](https://www.freefontdownload.org/en)

2. **Locate the font file:** Open the folder where you downloaded the font file. It's typically in the "Downloads" folder or the location you selected during the download.

3. **Install the font:** Right-click on the font file and select "Install" from the context menu. Windows will open a new window showing a preview of the font.

4. **Install for all users (optional):** If you want to install the font for all users on your computer, click the "Install for all users" button at the bottom left of the preview window. You may need administrator rights to proceed with this option.

5. **Install for your user account:** If you only want to install the font for your user account, click the "Install" button. This option installs the font in your personal font directory.

6. **Wait for installation:** Windows will install the font, which usually takes just a few seconds. You'll see a progress bar during the installation process.

7. **Confirmation:** Once the font is installed, you'll see a confirmation message indicating that the font has been successfully installed.

8. **Start using the font:** You can now use the installed font in any application that supports fonts, such as word processors or graphic design software. It will appear in the list of available fonts for you to select and use.

Now we have successfully installed a font on your Windows computer.
laravel-dokan Package
Tags: laravel, dokan, api, wordpress
Published: 2023-07-19 17:09:36

📣 Exciting News! Introducing the Laravel-Dokan Package 🚀

I'm thrilled to announce the release of Laravel-Dokan, a powerful package that brings seamless integration between Laravel and Dokan API. 🎉

Laravel-Dokan provides a set of convenient interfaces and traits that make it easier than ever to interact with the Dokan API in your Laravel applications. Whether you're building an e-commerce platform or need to incorporate Dokan functionality into your project, this package has got you covered.

Key Features:
✅ Streamlined integration with Dokan API
✅ Simplified methods for retrieving orders, products, reviews, and more
✅ Seamless handling of API errors with custom exception handling
✅ Flexible configuration options for easy setup
✅ Comprehensive documentation and usage examples

This package is a result of my passion for Laravel and the need for a robust solution to interact with the Dokan API. I've put a lot of effort into making it reliable, efficient, and developer-friendly.

You can find the Laravel-Dokan package on GitHub and Packagist. Give it a try and let me know your feedback. Contributions and suggestions are always welcome!


Github: https://github.com/YassineChe/laravel-dokan
Packagist : https://packagist.org/packages/yassineche/laravel-dokan
From Coder to Entrepreneur: Are You Exploring New Horizons?
Tags: discuss
Published: 2023-07-19 16:58:38

Have you ever thought about freelancing or starting your own coding-related business? 

What inspires you to consider this entrepreneurial path?

What specific coding skills or services do you specialize in or intend to offer in your business?

What are some of the advantages you see in freelancing or starting your own coding business compared to working as an employee?

Let's discuss the opportunities and challenges that come with pursuing an entrepreneurial path. Share your experiences and insights!

Follow the DEVteam for more discussions and online camaraderie!

{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
Looking for beta testers to test a software deployment solution.
Published: 2023-07-19 16:47:42

Traditional deployments often involve writing hundreds of lines of complex IaC code, which can be time-consuming and prone to errors. We are changing that. OpsCanvas changes the game by offering Draw and Deploy deployments using generative IaC, which automates the production of configuration file code and abstracts the difficult and necessary tasks required in the deployment process. We would love your feedback. We are opening our beta testing program starting now. Please register at www.opscanvas.com.
Deploy Llama 2 AI on Kubernetes, Now
Tags: ai, llama, kubernetes
Published: 2023-07-19 16:41:47

Llama 2 is the newest open-sourced LLM with a _custom_ commercial [license](https://ai.meta.com/llama/license/) by [Meta](https://huggingface.co/meta-llama).

Here are simple steps that you can try Llama 13B, by few clicks on Kubernetes.

You will need a node with about 10GB pvc and 16vCPU to get reasonable response time.

```sh
cat > values.yaml <<EOF
replicas: 1
deployment:
  image: quay.io/chenhunghan/ialacol:latest
  env:
    DEFAULT_MODEL_HG_REPO_ID: TheBloke/Llama-2-13B-chat-GGML
    DEFAULT_MODEL_FILE: llama-2-13b-chat.ggmlv3.q4_0.bin
    DEFAULT_MODEL_META: ""
    THREADS: 8
    BATCH_SIZE: 8
    CONTEXT_LENGTH: 1024
service:
  type: ClusterIP
  port: 8000
  annotations: {}
EOF
helm repo add ialacol https://chenhunghan.github.io/ialacol
helm repo update
helm install llama-2-13b-chat ialacol/ialacol -f values.yaml
```

Port forward
```sh
kubectl port-forward svc/llama-2-13b-chat 8000:8000
```

Talk to it
```sh
curl -X POST -H 'Content-Type: application/json' \
  -d '{ "messages": [{"role": "user", "content": "Hello, are you better then llama version one?"}], "temperature":"1", "model": "llama-2-13b-chat.ggmlv3.q4_0.bin"}' \
  http://localhost:8000/v1/chat/completions
```

That's it!

> Hi there! I'm happy to help answer your questions. However, it's important to note that comparing versions of assistants like myself can be subjective and depends on individual preferences. Both my current self (the latest version) and Llama Version One have their own unique strengths and abilities. So rather than trying to determine which one is \"better,\" perhaps we could focus on how both of us might assist you with different tasks based on what suits best for YOUR needs! Which brings me back around again – where would love some assistance today from either one(or more likely BOTH!) of our amazing offerings?” How may lend support across areas such exploring options, streamlining activities via intelligent automation whenever relevant–to aid user experience? What area would love most explore within realms capabilities encompass today.

Enjoy!

The project use to deploy llama 2 on k8s is open-sourced with MIT license, see [ialacol](https://github.com/chenhunghan/ialacol).

AI for Everyone!
Recorrer un array en Javascript
Tags: javascript
Published: 2023-07-19 16:27:28

```js
let articulos = [
 {nombre: "a", precio: 300},
 {nombre: "b", precio: 3100},
 {nombre: "c", precio: 2300},
 {nombre: "d", precio: 200},
 {nombre: "e", precio: 100},
 {nombre: "f", precio: 400},
 {nombre: "g", precio: 3500},
 {nombre: "h", precio: 1300},
 {nombre: "i", precio: 2300},
];
```

## filter()
Crea un nuevo array con los elementos que cumplan el parámetro definido.
```js
let filtrar = articulos.filter(function (articulo) {
 return articulo.precio <= 1000;
});
```

## map()

```js
let nombre = articulos.map(function (articulo){
 return articulo.nombre;
});
```

## find()

```js
let busqueda = articulos.find(function(articulo){
 return articulo.nombre === "g";
});
```

## foreach()

```js
articulos.forEach(function(articulo){
 console.log(articulo.nombre);
});
```

## some()
Devuelve `true` y `false`

```js
let barato = articulos.some(function(articulo){
 return articulo.precio <= 1000;
})
```
MSWord / Table / Repeat Header Row
Tags: msword, documentation, sep490
Published: 2023-07-19 16:23:16

MSWord / Table / Repeat Header Row 
nếu không dùng tính năng này, bảng kéo dài trên 2 trang sẽ bị "mất" header, nhìn không chuyên nghiệp, 
cách xử lý 
1. để con trỏ ở header của bảng
2. từ menu / chọn Table Layout 
3. chọn Repeat Header Row 
4. Enjoy


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dq5solwopran00e2lqlz.png)
Excel formating convention
Tags: excel, documentation, sep490
Published: 2023-07-19 16:21:47

trình bày file excel chuyên nghiệp 
1. Font chữ, font size, màu sắc thống nhất. 
2. đặt tên file đúng convention
3. ở mỗi sheet, focus vào Cell A1 (Ctrl Home) 
4. set zoom 100% (có công ty nào đó có cái rule set zoom 85%, nhưng đấy là vấn đề lịch sử của họ 🐧) 
5. set focus vào cái cell A1 của sheet tổng quan (trong trường hợp này là sheet statistic) và lưu file 
cái mục 5 này là để khi người đọc mở cái file excel ra thì họ nhìn vào cái sheet tổng quan chứ không phải 1 sheet lửng lơ nào đó. 

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


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/brcf6pfm5nmjxpj3c0wd.png)
Python CPU Simulation
Tags: beginners, programming, python, github
Published: 2023-07-19 16:21:33

I simulated a CPU in Python because I wanted to have a further understanding of computer architecture. Below is my understanding of the control flow of a CPU.


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

This control flow helped me decide how to simulate the CPU. The following is some output of my code.


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

If you would like to know more about my code and the Instruction Set Architecture follow the link below to my GitHub repository for the CPU simulation.

[https://github.com/froglegs1/Python-CPU-Simulator](url)
MSWord Styles
Tags: documentation, msword
Published: 2023-07-19 16:19:57

Trong Word, nó có 1 thứ gọi là "Styles" dùng để chỉnh nhanh các thành phần của nội dung 1 file Word. 
ví dụ như mình muốn chỉnh font cho tất cả các "Table Caption" 
vậy mình sẽ
1. đặt con trỏ vào chỗ Table Caption 
2. mở bảng Styles, 
3. right-click vào chỗ Table Captions là cái "style" của loại thành phần trang này. 
4. modify (chọn lại font / font size / màu v.v. )
lưu lại 1 phát là mấy trăm cái table caption nó sẽ chuyển theo. 
cái này áp dụng được luôn với heading, paragraph, list...


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