teleren/devto huggingface dataset:
How to schedule new blog posts
Tags: githubactions, hugo, tutorial, beginners
Published: 2024-06-11 13:01:51


Some of you may be looking for a way to prepare Hugo-blog content, and post it automatically on a specific day without having any further action to do.

Here is a very simple way to handle this, using both Hugo and GitHub Action functionalities.

# Step 1 : Hugo side

A Hugo-based blog content is basically a `Markdown` file, which contains at its beginning a `front matter` bloc (using `yaml` or `toml` syntax).  
This `front matter` let us set several properties.  

For example, here is one from a post of mine :  
```toml
+++
title = "How to plan your blog posts in advance"
date = 2024-06-10
draft = false
tags = ["tuto","blogging"]
categories = ["tech"]
+++
```

One can notice the presence of a `date` field, allowing not only to set up post's writing date, but will be used by `Hugo` while building the site.  
Indeed, `Hugo` default behavior is to [not build future contents](https://gohugo.io/getting-started/configuration/#buildfuture).  

That's exactly what we need here. Just write the desired publish date instead, and then build periodically the site !  

# Step 2 : GitHub side

`GitHub Actions` manages build of the site through a `.github\workflows\hugo.yml` file, created by `GitHub` while the workflow is configured the first time (note by the way that it looks like a `Jenkinsfile` a lot).  

My first usage was to build on every `push` on the main branch :  
```yml
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages

on:
  # Runs on pushes targeting the default branch
  push:
    branches: ["main"]

# Deploying actions
```

So I simply added a scheduled trigger (see documentation [here](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)) every friday morning.  
Notice that time is UTC-based, and it is not possible for now to use timezone (see [this discussion](https://github.com/orgs/community/discussions/13454)).  

Let's add the scheduled trigger in `hugo.yml` file :  
```yml
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages

on:
  # Runs on pushes targeting the default branch
  push:
    branches: ["main"]
  
  # Runs every friday at 5 o'clock AM UTC to publish "music friday" posts
  schedule:
    - cron: '00 05 * * 5'
```

Here we are !  
From now on, the site will be also build once a week to generate contents that was in the future.
Facebook Marketing in Gandhinagar: Top Agencies to Watch in 2024
Published: 2024-06-11 12:55:15

In today's digital age, a robust Facebook presence is essential for any Gandhinagar business. With billions of active users, Facebook offers unparalleled reach and engagement potential. But crafting a winning Facebook marketing strategy can be a challenge. That's where Gandhinagar's Facebook marketing agencies come in!

Expert Digital India Is One Of The <a href="https://expertdigitalindia.com/facebook-marketing-agency-gandhinagar.php">Facebook Marketing Agency In Gandhi Nagar</a>, India. We Offer Stunning And Mobile Friendly Facebook Marketing Agency to Our Clients. Contact Now``

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7m2ri3gvxxxqtt40f88a.jpg)

**The Power of Local [Facebook Marketing Agencies](https://expertdigitalindia.com/facebook-marketing-agency-gandhinagar.php)**

Gandhinagar-based Facebook marketing agencies understand the unique needs and demographics of your target audience. They can tailor campaigns that resonate with local sensibilities, maximizing impact and return on investment (ROI). Here's what these agencies bring to the table:

**In-depth knowledge of the Facebook platform: ** They stay updated on the latest algorithm changes and advertising features to ensure your campaigns leverage the platform's full potential.
**Targeted audience expertise:** Gandhinagar agencies understand the local market and can create laser-focused campaigns that reach the right people.
**Content creation that captivates:** Eye-catching visuals and engaging content are crucial for grabbing attention on Facebook. Local agencies can craft content that resonates with your Gandhinagar audience.
**Data-driven optimization:** They'll track campaign performance and make adjustments to maximize results.
**Finding the Perfect Fit:**

With several Facebook marketing agencies in Gandhinagar, choosing the right partner is crucial. Consider these factors:

**Experience:** Look for agencies with a proven track record of success in your industry.
**Services offered:** Ensure they align with your specific needs, whether it's campaign management, content creation, or social media management.
**Client testimonials:** Positive feedback from past clients speaks volumes about their capabilities.
**Budget:** Get quotes from several agencies to find one that fits your budget.
**Next Steps:**

Ready to harness the power of Facebook marketing for your Gandhinagar business? Here's what to do next:
**
Research:** Identify Gandhinagar-based Facebook marketing agencies that align with your needs.
**Contact shortlisted agencies:** Discuss your goals and get free consultations.
**Choose your partner:** Select the agency that best understands your vision and offers a winning strategy.
By partnering with a skilled Facebook marketing agency in Gandhinagar, you can unlock a world of possibilities, reaching new customers, boosting brand awareness, and achieving your business objectives.
Numpy Dot Function
Tags: coding, programming, tutorial, python
Published: 2024-06-11 12:47:31


# ① Understand the Syntax of `numpy.dot()`

The syntax required for using the `dot()` function is as follows:

```python
numpy.dot(a, b, out=None)
```

Where:

- **a** is the first parameter. If "a" is complex, then its complex conjugate is used for the calculation of the dot product.
- **b** is the second parameter. If "b" is complex, then its complex conjugate is used for the calculation of the dot product.
- **out** is the output argument. If it is not used, then it must have the exact kind that would be returned. Otherwise, it must be C-contiguous and its `dtype` must be the `dtype` that would be returned for `dot(a, b)`.

# ② Calculate the Dot Product of Scalars and 1D Arrays

In this step, we will use the `dot()` function to calculate the dot product of scalars and 1D arrays.

```python
import numpy as np

# Calculate the dot product of scalar values
a = np.dot(8, 4)
print("The dot product of the above given scalar values is: ")
print(a)

# Calculate the dot product of two 1D arrays
vect_a = 4 + 3j
vect_b = 8 + 5j

dot_product = np.dot(vect_a, vect_b)
print("The dot product of two 1D arrays is: ")
print(dot_product)
```

# ③ Perform Matrix Multiplication with 2D Arrays

In this step, we will use the `dot()` function to perform matrix multiplication with 2D arrays.

```python
import numpy as np

a = np.array([[50,100],[12,13]])
print("Matrix a is:")
print(a)

b = np.array([[10,20],[12,21]])
print("Matrix b is:")
print(b)

dot = np.dot(a, b)
print("The dot product of matrices a and b is:")
print(dot)
```

# ④ Error Handling

In this step, we will explore the `ValueError` that is raised when the last dimension of `a` is not the same size as the second-to-last dimension of `b`.

```python
import numpy as np

a = np.array([[1, 2, 3], [4, 5, 6]])
b = np.array([[7, 8], [9, 10], [11, 12], [13, 14]])

# Error handling
error = np.dot(a, b)
print(error)
```

#

# ⑤ Summary

In this lab, we covered the `dot()` function of the Numpy library. We learned how to use this function with its syntax, and the values returned by the function were explained with the help of code examples. We also explored the error handling of the function.

---

## Want to learn more?

- 🚀 Practice [Numpy Dot Function](https://labex.io/tutorials/python-numpy-dot-function-86429)
- 🌳 Learn the latest [Python Skill Trees](https://labex.io/skilltrees/python)
- 📖 Read More [Python Tutorials](https://labex.io/tutorials/category/python)

Join our [Discord](https://discord.gg/J6k3u69nU6) or tweet us [@WeAreLabEx](https://twitter.com/WeAreLabEx) ! 😄
Cricbet99 Login - Cricbet99 ID Register Now on Cricbet99.com
Tags: cricbet99, cricbet99login
Published: 2024-06-11 12:40:40

Online platforms have evolved into intriguing doors, and **[Cricbet99](https://cricbet99id.org/
)** Login is a top choice for sports fans seeking to intensify their enthusiasm with a little extra pleasure. It has grown to be popular among people looking to turn their passion for sports into possible money because of its wide selection of betting options, which include cricket, tennis, soccer, and more.
An exciting universe of sports betting potential is unlocked with **[Cricbet99](https://cricbet.cricket/
)**. These easy steps will help you open an account and begin betting on sports like tennis, soccer, cricket, and more. To ensure a safe and happy experience on the Cricbet99 App Login platform, always remember to wager sensibly and within your means.
Alpha-Beta Pruning in AI
Tags: ai, datascience, pruning, algorithms
Published: 2024-06-11 12:32:35

Alpha-Beta [pruning in ai](https://www.almabetter.com/bytes/tutorials/artificial-intelligence/alpha-beta-pruning) is a search algorithm used in artificial intelligence, specifically in game theory and decision trees, to reduce the number of nodes that need to be evaluated in the minimax algorithm. It improves upon the basic minimax algorithm by eliminating branches of the search tree that cannot possibly influence the final decision.

1. **Minimax Algorithm**: Alpha-Beta pruning is often used in conjunction with the minimax algorithm, which explores all possible moves in a game tree to determine the best move for a player while assuming that the opponent also makes optimal moves.

2. **Pruning**: Alpha-Beta pruning maintains two values, alpha and beta, representing the best choices for the maximizing and minimizing player, respectively. As the search progresses, branches of the tree that are known to be worse than previously explored alternatives are pruned, reducing the number of nodes evaluated.

3. **Efficiency**: By eliminating branches that cannot affect the final decision, Alpha-Beta pruning significantly reduces the search space, leading to a more efficient search process, particularly in games with large branching factors.

4. **Optimality**: Alpha-Beta pruning guarantees the same results as the basic minimax algorithm but with fewer node evaluations, making it an essential optimization technique for games and other decision-making problems with large state spaces.

Overall, Alpha-Beta pruning is a powerful and widely used technique in artificial intelligence for optimizing search algorithms, particularly in games like chess, where efficient decision-making is crucial.
Install aws-iam-authenticator in Linux
Published: 2024-06-11 12:12:03

`

1. sudo curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v0.5.9/aws-iam-authenticator_0.5.9_linux_amd64

3. sudo chmod +x ./aws-iam-authenticator 

4. sudo mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin

5. sudo echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc

6. aws-iam-authenticator help`
Don't use System, better use Logger
Tags: java, beginners, tutorial, webdev
Published: 2024-06-11 12:05:23

Throughout my career, I've relied on System.out.println() to print application logs to the terminal. However, at one point, a fellow Java Developer Engineer suggested using the Logger class instead.

## System

This method is handy when developing a basic application and needing a quick way to log messages.

```java
// The main, basic, and simplest way to log
System.out.println("Something");
```

## Logger

This approach becomes invaluable when working on larger applications that require more sophisticated logging.

```java
import java.util.logging.Logger;

class TestLogging {

  // Creating a new Logger object
  private static Logger log = Logger.getLogger(Logger.class.getName());

  public static void main(String[] args) {
    
    System.out.println("Hello World");
    log.info("Hello World!");
    
  }
}
```

This is the output generated when running the application:

![Output generated when running the application](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ba5wh71bd70xrxtosrh.png)

That's all!
Webinar about web development
Published: 2024-06-11 12:04:18


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

Hello everyone,

I am hosting my first webinar on Zoom this coming Saturday about getting started as a web developer.

In this session, I will provide an introduction to web development, a roadmap for upskilling, discuss industry trends, and possibly conduct a demo. Additionally, I'll share what motivates me to keep working in this field.

Date: 📅 15 June
Time: ⏰ 4 PM IST
Platform: Zoom

Registration Link - [https://forms.gle/Qq9oQzv6ai1PuT5j6](https://forms.gle/Qq9oQzv6ai1PuT5j6)

Looking forward to seeing you all there!
Today I learned about Variables in PHP
Tags: webdev, php, laravel, backend
Published: 2024-06-11 11:56:00

The main way to store information in the middle of a PHP program is by using a variable.

- Here are the most important things to know about variables in PHP.
- All variables in PHP are denoted with a leading dollar sign ($).
- The value of a variable is the value of its most recent assignment.
- Variables are assigned with the = operator, with the variable on the left-hand side and
- the expression to be evaluated on the right.
- Variables can, but do not need, to be declared before assignment.
- Variables in PHP do not have intrinsic types - a variable does not know in advance
- whether it will be used to store a number or a string of characters.
- Variables used before they are assigned have default values.
- PHP does a good job of automatically converting types from one to another when
necessary.
PHP variables are Perl-lik
PHP has a total of eight data types which we use to construct our variables:

- **Integers**: are whole numbers, without a decimal point, like 4195.
- **Doubles:** are floating-point numbers, like 3.14159 or 49.1.
- **Booleans:** have only two possible values either true or false.
- **NULL:** is a special type that only has one value: NULL.
- **Strings:** are sequences of characters, like 'PHP supports string operations.'
- **Arrays:** are named and indexed collections of other values.
- **Objects:** are instances of programmer-defined classes, which can package up both other kinds of values and functions that are specific to the class.
- **Resources:** are special variables that hold references to resources external to PHP
 (such as database connections).
The first five are simple types, and the next two (arrays and objects) are compound - the
compound types can package up other arbitrary values of arbitrary type, whereas simple
types cannot.

Here's My PHP code

```php
<?php
$x = 4;
function assignx () {$x = 0;
print "\$x inside function is $x.
";
}
assignx();
print "\$x outside of function is $x.
";
?>
```
This will produce the following result.
```php
<?php
$x inside function is 0.
$x outside of a function is 4.
?>
```
Guide to Choosing a New Web Hosting Provider: Key Considerations
Published: 2024-06-11 11:35:43


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

This blog post guides you through switching web hosting providers as your website grows. It emphasizes planning and choosing a provider based on your website’s needs.

### Before You Start:

Assess your website’s traffic, storage, resource requirements, and future growth.

### Choosing a Hosting Plan:

- **Shared hosting**: Affordable for low-traffic websites but resource sharing can impact performance.

- **VPS hosting**: Offers dedicated resources on a server, ideal for moderate traffic or specific resource needs.

- **Dedicated hosting**: Provides full control and resources of a server, best for high-traffic websites.

**Also Read** : [https://www.wewp.io/](https://www.wewp.io/best-web-hosting-provider-for-2024/)

### Prioritize Uptime and Performance:

- Aim for at least 99.9% uptime to ensure your website is accessible.
- Look for providers with fast loading speeds (ideally under 3 seconds) for better user experience and search ranking.
- Consider features like solid-state drives (SSDs) and content delivery networks (CDNs) for optimization.

### Security Matters:

Choose a provider offering robust security features like DDoS protection, malware scanning, and SSL certificates.

### Don’t Forget Customer Support:

- Reliable and responsive support is crucial for addressing website issues quickly.
- Look for multiple support channels (phone, live chat, email) with knowledgeable representatives.

### Cost: Value Over Price:

While budget is important, prioritize features and resources needed for your website’s success.

### Additional Considerations:

- **Scalability**: Choose a plan that allows for easy upgrades if you anticipate significant growth.

- **Backups**: Look for providers offering automated backups to ensure data safety.

### WordPress Hosting:

- If your website is built on WordPress, consider specialized WordPress hosting providers for optimized infrastructure and pre-installed tools.
- Managed WordPress hosting takes care of updates, security, and performance optimization, freeing you to focus on content.

### Conclusion:

Switching web hosting can improve your website’s performance, security, and user experience. Carefully evaluate your needs and research different providers before making a decision.

**Read Full Blog Here With Insights** : [https://www.wewp.io/](https://www.wewp.io/considerations-when-switching-web-hosting-providers/)
Golf Island Dwarka - Luxury 4 BHK Apartments in Dwarka
Tags: realestate
Published: 2024-06-11 11:34:56

Golf Island, buy 4 BHK luxury apartment, flat in Dwarka, South Delhi. Finding Four (4) BHK apartments, flats for sale at best price near Golf Course Dwarka? 
https://www.golfisland.in/
Benefits Of SOC Maturity Assessment
Tags: cybersecurity, soc, cybersecurityservice
Published: 2024-06-11 11:32:52

Embracing the outcome-based approach brings a significant advantage by aligning with the fundamental mission of a SOC. This mission revolves around swiftly restoring a secure operational state following incidents and thwarting security events from escalating into breaches. This approach offers a more relevant framework of objectives and advancements for the SOC, enabling resource allocation towards addressing common threats initially and then delving into more intricate scenarios. By automating Threat Detection and Incident Response (TDIR) processes for levels 1 and 2, an organization can efficiently manage a substantial portion of expected threats. This strategic allocation of manual resources to the more intricate Level 3 and other challenging cases can address potential risks more effectively. The shift from generating a multitude of alerts to embracing an end-to-end outcome-focused TDIR workflow not only enhances SOC effectiveness but also drives continuous improvement through insights gained from each incident. Consequently, this maturity model not only boosts SOC efficiency but also enhances staff satisfaction, reducing burnout. The next step, discussed in our upcoming blog, will delve into real-world use cases, showcasing the practical implementation of this advantageous approach.
Shared vs. Managed WordPress Hosting: Picking the Perfect Fit
Published: 2024-06-11 11:31:09


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

Choosing the right WordPress hosting depends on your website’s needs and technical expertise. Shared hosting is affordable and ideal for low-traffic websites with a basic setup. It’s like a crowded highway — resources are shared, potentially slowing down your website during peak times. You’ll also handle some technical tasks like updates and security.

[Managed WordPress hosting](https://www.wewp.io/) is a premium service offering a dedicated lane on the highway. Optimized for WordPress, it boasts enhanced security, improved performance, and automatic updates and backups. This hands-off approach comes at a higher cost. There are additional configurations like shared WordPress hosting (resources dedicated to WordPress on a shared server) and cloud WordPress hosting (utilizes cloud resources for scalability).

Consider shared hosting if you’re on a budget, have a simple website, and are comfortable with some technical tasks. Managed WordPress hosting is ideal for high-traffic websites, those seeking a hands-off experience, or businesses prioritizing top-notch performance and security.

**Also Read** : [Key Considerations When Switching Web Hosting Providers](https://www.wewp.io/considerations-when-switching-web-hosting-providers/)

The blog also mentions managed shared hosting, a hybrid option with some managed features at a shared hosting price, and cloud hosting, offering scalability for fluctuating traffic. Remember, cloud hosting can be pricier.

Once you’ve chosen an approach (shared vs. managed), compare providers based on features, scalability, reliability, pricing, reviews, and security measures. Don’t just focus on price; consider the value proposition.

Read Full Blog Here With Insights : [https://www.wewp.io/](https://www.wewp.io/shared-hosting-vs-managed-wordpress-hosting/)
Key Advantages of Cloud Hosting for eCommerce Businesses
Published: 2024-06-11 11:28:13


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

Ecommerce businesses need a reliable and scalable hosting solution to keep their online stores running smoothly. Cloud hosting offers several advantages over traditional hosting, making it a popular choice for businesses of all sizes.

### Here’s why Cloud Hosting is a game changer:

- **Scalability**: Cloud hosting can easily handle surges in traffic during peak seasons or marketing campaigns. Resources can be automatically adjusted to ensure your website remains fast and responsive.

- **Reliability**: Cloud hosting utilizes redundant systems and disaster recovery solutions to minimize downtime and data loss. This is crucial for ensuring customer satisfaction and business continuity.

- **Security**: Cloud providers have dedicated security teams that constantly monitor and update their infrastructure. They also offer compliance solutions for data privacy regulations.

- **Flexibility**: Cloud hosting allows remote access to website data and applications, making it ideal for geographically dispersed teams. Additionally, it integrates seamlessly with popular eCommerce platforms.

- **Cost-Effectiveness**: Cloud hosting eliminates upfront hardware costs and reduces IT management overhead. Businesses only pay for the resources they use, making it a budget-friendly option.

**Also Read** : [What to Look for in a Hosting Provider for an Ecommerce Website](https://www.wewp.io/hosting-provider-for-ecommerce-website/)

By choosing cloud hosting, eCommerce businesses can:

- Focus on growth and innovation instead of managing server infrastructure.

- Ensure a seamless and secure shopping experience for customers.

- Scale their online store efficiently to meet growing demands.

Ready to unlock the benefits of cloud hosting for your eCommerce business? Explore the options available and find a provider that meets your specific needs. Cloud hosting can be the key to scaling your business and achieving success in the competitive online retail market.

Read Full Blog Here With Insights : [https://www.wewp.io/](https://www.wewp.io/why-ecommerce-businesses-prefer-cloud-hosting/)
Switching from VS Code to Sublime Text: A Guide for macOS 10.13.6 Users
Tags: vscode
Published: 2024-06-11 11:27:25

See my latest article on [Medium](https://medium.com/@erik.metz.info/switching-from-vs-code-to-sublime-text-a-guide-for-macos-10-13-6-users-6b5283bac90b)