teleren/devto huggingface dataset:
Create a Redis Cluster for scalability and high availability
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-01-19 10:43:00

[19/100] #100DaysOfCloud Today, I created a Redis Cluster for scalability and high availability.

- Amazon ElastiCache is a web service that makes it easy to set up, manage, and scale a distributed in-memory data store or cache environment in the cloud. It provides a high-performance, scalable, and cost-effective caching solution. At the same time, it helps remove the complexity associated with deploying and managing a distributed cache environment.

- Amazon ElastiCache for Redis is a blazing fast in-memory data store that provides sub-millisecond latency to power internet-scale real-time applications. Built on open-source Redis and compatible with the Redis APIs, ElastiCache for Redis works with your Redis clients and uses the open Redis data format to store your data. Your self-managed Redis applications can work seamlessly with ElastiCache for Redis without any code changes. ElastiCache for Redis combines the speed, simplicity, and versatility of open-source Redis with manageability, security, and scalability from Amazon to power the most demanding real-time applications in Gaming, Ad-Tech, E-Commerce, Healthcare, Financial Services, and IoT.

- Amazon ElastiCache for Redis is a great choice for real-time transactional and analytical processing use cases such as caching, chat/messaging, gaming leaderboards, geospatial,   machine learning, media streaming, queues, real-time analytics, and session store.

You can try to create a Redis Cluster for scalability and high availability by yourself by following the steps from the link below:
[GitHub](https://github.com/aaditunni/100DaysOfCloud/blob/main/Journey/019/Readme.md)
what are the register Event Callbacks phase means in node js process
Tags: help, node
Published: 2023-01-19 10:38:39

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


hi  i want to ask a question here there is a phase in nodejs processing where all of the event callback are registered this phasee is diffrent than the on that happerns in the evenl loop phase of adding request to the  event quue is that corrrect

Nodejs and Express
Azure Data Ingestion Tools
Published: 2023-01-19 10:37:09

Azure is a cloud computing platform offered by Microsoft that provides a variety of services for data storage, processing, and analytics. One of the key components of Azure for data processing is its data ingestion tool, which allows users to easily import and load large amounts of data into Azure for further analysis and processing.

There are a variety of different options for data ingestion in Azure, each with its own set of features and capabilities. Some of the most commonly used options include:

- 
**Azure Data Factory:** This is a fully managed cloud-based data integration service that allows users to create, schedule, and manage data pipelines. Data Factory supports a wide range of data sources and destinations, including files, databases, and cloud storage. It also includes built-in data transformation and data flow capabilities, allowing users to easily clean and prepare data before loading it into Azure.


- 
**Azure Stream Analytics:** This is a real-time data streaming service that allows users to process and analyze data as it is generated. Stream Analytics supports a wide range of data sources, including IoT devices and social media streams, and can be used to perform real-time data processing and analytics, such as counting and aggregating data, detecting patterns and anomalies, and triggering alerts.

- 
**Azure Event Hub:** This is a fully managed service for ingressing and processing data streams. Event Hub allows to easily ingest millions of events per second from connected devices and applications and can stream that data into multiple data storage and processing options like azure data lake, azure synapse analytics and others.


- 
**Azure Logic App:** This is a service that allows users to create workflows that integrate with a variety of different services and systems. Logic Apps can be used to create data pipelines that move data between different services, such as pulling data from a website and loading it into Azure storage.

- 
**Azure Data Lake Storage Gen2:** This is a fully-managed data lake service that allows users to store and analyze big data in one place. Data lake storage Gen2 allows you to store large amounts of data in their native format and provides a scalable platform to process and analyze that data using services like Azure Synapse Analytics and HDInsight

Ultimately, the choice of data ingestion tool will depend on the specific requirements of your project and the type of data that you need to work with. By understanding the different options available in Azure and their capabilities, you'll be able to make an informed decision about which tool to use for your data ingestion needs.

It's worth mentioning that there are other data ingestion options as well, like using Azure SQL Db, blob storage, among others.

In this way, Microsoft Azure offers a wide range of services that enable different ways of data ingestion, each one tailored for a specific use case, making it a powerful platform for data storage, processing and analytics.
weac 2023 for Ghana and Nigeria
Published: 2023-01-19 10:33:16

[https://multischolar.com/waec-timetable/](https://multischolar.com/waec-timetable/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)
https://plaza.rakuten.co.jp/chenlee/diary/202301190001/
https://www.provenexpert.com/weac-2023/
https://www.producthunt.com/@weac2023
https://www.divephotoguide.com/user/weac2023/
https://www.diggerslist.com/weac2023/about
https://wakelet.com/@weac2023836
https://vocal.media/authors/weac2023
https://www.lifeofpix.com/photographers/weac2023/
https://seedandspark.com/user/weac2023
https://rosalind.info/users/weac2023/
http://phillipsservices.net/UserProfile/tabid/43/userId/194973/Default.aspx
https://app.roll20.net/users/11527808/weac2023
http://uid.me/weac2023
https://speakerdeck.com/weac2023
https://social.msdn.microsoft.com/Profile/weac2023
https://www.iheart.com/podcast/269-weac-2023-107507842/
https://active.popsugar.com/@weac2023/profile
https://unsplash.com/@weac2023/likes
https://camp-fire.jp/profile/weac2023
https://plazapublica.cdmx.gob.mx/profiles/weac2023/activity
https://www.metal-archives.com/users/weac2023
https://artmight.com/user/profile/927992
https://storium.com/user/weac2023
https://trabajo.merca20.com/author/weac2023/
https://telegra.ph/weac-2023-01-19
https://www.intensedebate.com/people/weac2023
https://www.mifare.net/support/forum/users/weac2023/
https://pinshape.com/users/2557135-weac2023
http://foxsheets.com/UserProfile/tabid/57/userId/118557/Default.aspx
https://www.kompasiana.com/weac2023
https://www.credly.com/users/weac-2023/badges
https://www.myminifactory.com/users/weac2023
https://www.speedrun.com/user/weac2023
https://www.sqlservercentral.com/forums/user/weac2023
https://www.longisland.com/profile/weac2023
https://leanin.org/circles/weac2023
https://myanimelist.net/profile/weac2023
How To install Laravel 9x on your Ubuntu
Tags: laravel, ubuntu, install, tutorial
Published: 2023-01-19 10:22:17

To install Laravel 9x on your Ubuntu machine from scratch, you can follow these steps:

1.Install PHP and other dependencies:

```bash
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.2 php8.2-cli php8.2-mbstring php8.2-xml php8.2-zip

```
2.Install Composer:


```bash
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
```
3.Install Laravel:


```bash
composer global require laravel/installer

```
4.Add the Composer global bin directory to your PATH:

```
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> ~/.bashrc
source ~/.bashrc
```
5.Create a new Laravel project:


```bash
laravel new myproject

```
6.Start the development server:


```bash
cd myproject
compose install
php artisan serve

```
now you can see your browser 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bne87bsa5i8e48kfh6ik.png)
Unions are bad! What to use instead.
Tags: unions, webdev, programming, graphql
Published: 2023-01-19 10:16:12

I decided not to use union types as you see them usually. Because they aren't well supported in many languages. And I have a better replacement. 

## One of
This means input will be only one of the specified types. You will ask: "Are union types the same?". Almost, but the implementation is different. Let's look at some examples.

### Typescript union types
```ts
type Aircraft = {
    weight: number,
    capitan: string
}

type Car = {
    weight: number,
    driver: string,
    engine: string
} 

type Transport = Aircraft | Car
```
That's union type. To recognize which type of object is, we can check `is the engine is not undefined`. But the usual practice is to create a separate field for defining type:
```ts
type Aircraft = {
    type: 'aircraft',
    weight: number,
    capitan: string
}

type Car = {
    type: 'car'
    weight: number,
    driver: string,
    engine: string
} 

type Transport = Aircraft | Car
```
And check `if the type equals 'aircraft' or 'car'`.

### What's the problem?
If my lang doesn't support union types I got some limitations. First of all, I should get a dynamic object, then check if it contains a type field, and only then cast them as some type. Not actually cool. 

### What to do?
We will use OneOf type. This means the object can contain only 1 of the specified types. How to implement:
```csharp
public class Aircraft
{
    public double weight;
    public string capitan;
}

public class Car
{
    public double weight;
    public string driver;
    public string engine;
}

public class Transport
{
    private Aircraft? aircraft;
    private Car? car;

    public Aircraft? Aircraft
    {
        get => aircraft;
        set { aircraft = value; car = null; }
    }

    public Car? Car
    {
        get => car;
        set { car = value; aircraft = null; }
    }

    public Field(Aircraft aircraft) => this.aircraft = aircraft;
    
    public Field(Car car) => this.car = car;

    public static implicit operator Transport(Aircraft aircraft ) => new(aircraft);
   
    public static implicit operator Transport(Car car) => new(car);
}
```
What did we get? In transport, type can exist only 1 field because on set all other fields will be set null. And we can return Car or Aircraft types because we have implicit casts for them. It's also typesafe because you HAVE TO check if fields are not null. The only bad thing is more code, but Vesna will generate them for you (when will be v1). 
It will solve problems of universality. Also checking `if is not null` requires fewer resources than comparing strings (like __typename in GraphQl). If you use the same lang on the front and back (maybe tRPC) and will not use something else, then you can use union types. But my opinion is there, I will be glad to discuss more if you want, just write a comment!
Salesforce Service Cloud
Tags: salesforce, cloud, dextara
Published: 2023-01-19 10:12:56

Dextara has a team of Certified [Salesforce Service Cloud](https://www.dextara.com/salesforce-service-cloud 
) Consultants who provide our clients with Salesforce Quote-to-Cash, Service Cloud Consulting and Professional Services that want to this in the first place.
Companies Who Use Data Mining
Tags: datamining, companies, companieswhousedatamining, data
Published: 2023-01-19 10:08:35

The practise of obtaining useful information from huge data collections is known as data mining. Data mining is used by businesses across several sectors to gather insights and improve choices. Here are a few Companies Who Use Data Mining:


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

To read about the Companes visit
https://hecodesit.com/companies-who-use-data-mining/
Facebook Scraper to access public data
Published: 2023-01-19 10:01:45

Kevin Zúñiga’s Facebook Scraper is a handy tool for tech aficionados that enables them to quickly and conveniently gather data from Facebook without obtaining an API key. This Python code can be downloaded from Github and is customizable, allowing users to select the speed of the scraping, filter results, and scrape data from a profile’s about section, friends, admins, members and groups. Moreover, it can also generate RSS feeds from Facebook pages.

Facebook Scraper project github link: [GitHub – kevinzg/facebook-scraper: Scrape Facebook public pages without an API key
](https://github.com/kevinzg/facebook-scraper)

Also here you can read about why Facebook Scraping is useful for businesses and why people do that: [Facebook Scraper: Scrape public Facebook data with Python easily
](https://coronium.io/facebook-scraper/)
Advent of Code 2022 Day 1 Part 2 - Solution Only
Tags: javascript, programming, algorithms, adventofcode
Published: 2023-01-18 19:43:41

```javascript
// EXAMPLE input converted to a multiline string
const input =
`1000
2000
3000

4000

5000
6000

7000
8000
9000

10000`

// use my work from Part 1 to get the array of sums
    // make an array of sub-arrays where each sub-array is one elf's calories, i.e., one grouping of nums
    const groupedByElf =
        input // `1000\n2000\n3000\n\n4000\n\n5000\n6000\n\n7000\n8000\n9000\n\n10000`
            .split('\n\n') // ['1000\n2000\n3000', '4000', '5000\n6000', '7000\n8000\n9000', '10000']
            .map(str => str.split('\n').map(str => +str)) // [ [1000, 2000, 3000], [4000], [5000, 6000], [7000, 8000, 9000], [10000] ]

    // find the total for each grouping and put these totals in one array
    const eachGroupSum = groupedByElf.map(subArr => subArr.reduce((acc, curVal) => acc + curVal)) // [6000, 4000, 11000, 24000, 10000]

// sort array from smallest to largest
const eachGroupSumSorted = eachGroupSum.sort((a, b) => a - b) // [4000, 6000, 10000, 11000, 24000]

// push and pop, push and pop, push and pop (3 times)
let threeHighest = []
threeHighest.push(eachGroupSumSorted.pop())
threeHighest.push(eachGroupSumSorted.pop())
threeHighest.push(eachGroupSumSorted.pop())
// console.log(threeHighest) // [24000, 11000, 10000]

// sum those three values
const sumOfThreeHighest = threeHighest.reduce((acc, curVal) => acc + curVal)

// log it
console.log(sumOfThreeHighest) // 45000
```
Online Final Cut Pro Course
Tags: videoedting, webdev, javascript, finalcutprox
Published: 2023-01-19 09:41:14

Learn video editing using the most demanded tool Final Cut Pro at Post Production Institute. Master this tool under our FCPX training in Delhi. Learn advanced tips and tricks used by industrial experts in Online Final Cut Pro Course.
Check course: https://www.postproductioninstitute.com/course/fcp-x-training-in-delhi/
Contact us at: +91 99117 82350
TIL how to work with Gitlab-CI’s Pull Policy
Tags: todayilearned, docker, gitlab
Published: 2023-05-19 20:37:33

---
title: TIL how to work with Gitlab-CI’s Pull Policy
published: true
date: 2023-01-19 09:38:00 UTC
tags: TIL,docker,gitlab
canonical_url: https://www.zufallsheld.de/2023/01/19/til-how-to-work-with-gitlab-cis-pull-policy/
---

In a `.gitlab-ci.yml` job, if you do not specify a tag for an image, the `latest` tag is used by default.

The default configuration of the gitlab-runner to pull Docker images is `if-not-present`, which means the image is only loaded if it is not already present. This in turn means that the image used is not updated. So if you use `latest` or no tag at all,, the image used is the one that was current at the time it was pulled, any updates afterwards will be ignored.

To change this behavior, you can use one of the following methods:

- Change the pull-policy in GitLab Runner and in the job. This can be done by following the instructions in the official documentation: [https://docs.gitlab.com/ee/ci/yaml/#imagepull\_policy](https://docs.gitlab.com/ee/ci/yaml/#imagepull_policy)
- update the image manually on the server of the runner (with `docker pull foo:latest`)
- use ephemeral runners that are always rebuilt
Get Better With CSS By Building These Mini Projects 👨‍💻🦄
Tags: css, webdev, javascript, html
Published: 2023-01-19 09:27:56

If you are struggling with CSS then one great way to fix that is to build small projects using CSS that will help you gain confidence and can be a great starting point for your CSS journey 🦄

Here are 10 mini CSS project ideas that you can build to improve your CSS skills 🌈

1️⃣
Create a photo gallery using CSS grid or flexbox.

2️⃣
Design a navigation bar with dropdown menus.

3️⃣
Build a responsive landing page for a fictional business.

4️⃣
Create a simple webpage layout using CSS grid or flexbox.

5️⃣
Design a CSS-only card component with hover effects.

6️⃣
Build a CSS-only pricing table.

7️⃣
Create a simple CSS animation, such as a hover effect on a button.

8️⃣
Design a simple form using CSS to style the input fields and buttons.

9️⃣
Create a CSS-only accordion component.

🔟
Build a responsive navigation menu for a mobile view.

Hope this helps 💯

Do Like ❤️ & Save 🔖

𝗙𝗼𝗹𝗹𝗼𝘄 me on [Linkedin](https://linkedin.com/in/rammcodes) for more:
Tips💡+ Guides📜 + Resources ⚡ related to programming and Web Development 👨‍💻

Feel free to connect with me 👍🔖
[video course] Learn how to build apps with LiveChat Developer Platform
Tags: javascript, beginners, tutorial, react
Published: 2023-01-19 09:20:20

## Hello! Welcome to Lesson 2 of our video course on creating LiveChat apps!

(if you haven't seen it, [check out the introduction and Lesson 1](https://dev.to/livechat/video-course-learn-how-to-build-apps-with-livechat-developer-platform-2njm) about planning the app development 🫡)

{% embed https://youtu.be/HDto0LYLYSg %}

By watching the 2nd lesson, you’ll learn about:
- how to code the LiveChat configuration API methods to your app.
- how to implement authorization with LiveChat Accounts SDK.
- how to configure your app in the Developer Console.

Tomorrow we will be back with another lesson!
How to Access Angular Parent Route Params
Tags: angular, ionic, webdev, typescript
Published: 2023-01-19 09:17:31

**Case Study **

Assume your  app-routing.module.ts looks like this



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


**Problem Statement **


How do we access the accountNumber params from the children route.


**Possible Solution*

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

This Works but it not the best solutions.

**Best Solution**

Update your app-routing.module.ts


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

>  paramsInheritanceStrategy: 'always' ==> This gives your access to parent params.Which make it easier to access parent params by doing 


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

Thanks for reading you can support by [Support link](https://www.buymeacoffee.com/es404020m)
VScode 模块调试
Published: 2023-01-19 08:55:27

## 背景
当我在一个python项目中的时候，每次想要运行这个train.py代码，但是有的项目用的相对路径，这个时候就很难处理（除非把所有的相对路径改成绝对路径）

## 解决方法
由于vscode的调试机制采用的是：在当前文件夹下处理，也就是工作目录（就是我们用vscode 打开的哪个文件夹），那么一个处理方式就是打开两个工作区
1. 安装 ctrl + shift + p, 输入命令add folder to workspace，选择需要的目录
2. 修改launch.json 文件进行模块调试
How to build a project in Django.
Tags: webdev, programming, python, django
Published: 2023-01-19 08:49:34


Django is an open-source Python web framework that enables rapid development of applications and websites. It is the most popular web framework for Python and is widely used for developing robust, secure, and efficient applications. Django is a powerful and flexible framework that provides a range of features, including an object-relational mapper (ORM), an integrated template engine, an extensible authentication system, and a powerful URL routing system. In this blog, we will discuss how to build a project in Django.

1. Install Django: Install the latest version of Django by running the following command in the terminal:

pip install django

This will install the latest version of Django on your system.

2. Create a New Project: Create a new project by running the following command in the terminal:

django-admin startproject myproject

This will create a new directory called myproject with the necessary files and folders for a Django project.

3. Create an App: Create an app for your project by running the following command in the terminal:

python manage.py startapp myapp

This will create a new directory called myapp with the necessary files and folders for a Django app.

4. Configure Database: Configure the database by editing the file in the settings.py directory. This file contains the configuration for the database.

5. Configure URLs: Configure the URLs for the project by editing the file in the urls.py directory. This file contains the URL patterns for the project.

6. Create Views: Create views for the project by editing the file in the views.py directory. This file contains the view functions for the project.

7. Create Models: Create models for the project by editing the file in the models.py directory. This file contains the models for the project.

8. Create Templates: Create templates for the project by editing the file in the templates directory. This directory contains the HTML templates for the project.

9. Create Static Files: Create static files for the project by editing the file in the static directory. This directory contains the CSS, JavaScript, and other static files for the project.

10. Test the Project: Test the project by running the following command in the terminal:

python manage.py runserver

This will start the development server and you can access the project at http://localhost:8000.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nezo4ts94bx8vpbg31h6.png)
C#: Retry mechanism for Event Hub Trigger Function
Tags: csharp, azure, function, eventhub
Published: 2023-01-19 08:33:58

We recently used an Event Hub trigger for Azure Functions and realized how to handles retry when the function code throws an exception.

## Default Behavior

Even though we throw an exception, the function app considers the job is done, and update checkpoint. This means we cannot process the event again.

## Add Retry Policy

[Azure Functions error handling and retries](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-error-pages?tabs=fixed-delay%2Cin-process&pivots=programming-language-csharp) explains how we can add the retry policy in case of failure.

- Fixed Delay: Retry after certain amount of time
- Exponential back-off: It keep increasing the wait time for the next try

Exponential back-off is a good way if we want to avoid retry too frequently when there is a issue which requires some time to be fixed. 

## Code Sample

The following code sample is taken from the office doc. It's quite easy as we just need to add an appropriate attribute with arguments. Following example retries 5 times in total with 4 seconds as the minimum wait time, and 15 minutes as the maximum wait time. 

If we specify -1 as retry count, it retires indefinitely.

```csharp
[FunctionName("EventHubTrigger")]
[ExponentialBackoffRetry(5, "00:00:04", "00:15:00")]
public static async Task Run([EventHubTrigger("myHub", Connection = "EventHubConnection")] EventData[] events, ILogger log)
{
// ...
}
```

When we specify -1 as retry count, we need to make sure to implement alert system so that someone is aware of the issue to fix the cause!

## Summary

At the beginning, I thought the Function App will retry automatically in case of the failure, but it doesn't. I hope this article helps me in the future.