teleren/devto huggingface dataset:
Aws Api Gateway Introduction Guide with Steps to Start with
Published: 2023-03-22 05:50:59

Introduction to Aws Api Gateway

AWS API Gateway is a fully managed service that enables developers to create, publish, maintain, monitor, and secure APIs at any scale. It is a powerful tool that can be used to create APIs for web applications, mobile applications, and backend services.

With AWS API Gateway, developers can easily create APIs that integrate with AWS services like AWS Lambda, Amazon S3, and Amazon DynamoDB, as well as third-party services like Salesforce, Twilio, and Stripe. API Gateway provides a scalable and secure platform for building APIs that can handle any amount of traffic.

In this article, we will explore how to build an API request on AWS Cloud using API Gateway.

Getting Started with AWS API Gateway

To get started with AWS API Gateway, you need to create an API in the AWS Management Console. You can do this by following these steps:

Open the AWS Management Console and navigate to the API Gateway service.

1. Click the "Create API" button.
2. 
3. Select the "REST API" option and click the "Build" button.
5. Choose "New API" and give your API a name and description.
6. Select the "Edge optimized" endpoint type.
7. Click the "Create API" button.

Creating a Resource and Method

Now that you have created an API, you can add resources and methods to it. A resource represents a collection of related API endpoints, while a method represents an HTTP verb (such as GET, POST, PUT, or DELETE) that can be used to access a resource.

To create a resource and method, follow these steps:

- Click the "Create Resource" button in the API Gateway console.
- Enter a name for your resource and click the "Create Resource" button.
- Select the resource you just created and click the "Create Method" button.
- Select the HTTP method you want to use (such as GET or POST) and click the checkmark button.
- In the "Integration Type" section, select "Lambda Function" and choose the Lambda function you want to use for your API.
- Click the "Save" button
.

Deploying Your API

Before you can start using your API, you need to deploy it. To do this, follow these steps:

In the API Gateway console, select your API.

Click the "Actions" button and select "Deploy API".

Choose the deployment stage you want to use (such as "prod" or "test") and click the "Deploy" button.

Your API is now deployed and ready to use.

Making an API Request

To make an API request, you can use a tool like Postman or cURL. Here's an example cURL command to make a GET request to your API:

curl -X GET https://<api-id>.execute-api.<region>.amazonaws.com/<stage>/<resource>
Replace <api-id> with your API ID, <region> with your AWS region, <stage> with your deployment stage, and <resource> with the name of the resource you created.

Conclusion

AWS API Gateway is a powerful tool for building APIs in the cloud. With its ease of use and integration with other AWS services, it is a great choice for developers who want to create scalable and secure APIs. By following the steps outlined in this article, you can quickly create an API and start making requests to it.
How to Create Configurable Product in Magento 2
Tags: webdev, magento, magento2tutorials
Published: 2023-03-22 05:15:01

A configurable item is a solitary item with a rundown of choices for varieties. It allows you to add credits to items like various sizes and varieties. Configurable items benefit stock keeping. It likewise makes you know which of your items are unavailable.

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

Each and every item is a different variety. Presently we will see the means for how to create configurable product in Magento 2.

For more info, visit https://webguru.dev/how-to-create-configurable-product-in-magento-2/
Zabbix 6.x LDAP Entegrasyonu
Tags: network, tutorial, beginners, monitoring
Published: 2023-03-22 05:11:06

Zabbix ürününün LDAP otantikasyon özelliği bulunmakta, bu özelliği kullanmak için **Administration** sekmesine yetkili bir kullanıcı ile Zabbix arayüzüne giriş yapabilmemiz gerekmektedir.

1- **Admin** bir kullanıcı ile Zabbix arayüzüne giriş yapıyoruz.

2- Sağ tarafta açılan pencerelerden **Adminisration** altında bulunan **Authentication** sekmesine tıklıyoruz.

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

3- Sağ tarafta açılan alandan **LDAP Setting** tabınına tıklıyoruz.

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

4- **Enable LDAP authentication** alanını seçiyoruz

5- İlgili alanları dolduruyoruz

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

Bu alanları doldururken **SSL** kullanan iletişim isteniyorsa Port alanı **636** ve LDAP host alanının urli de **ldaps** olarak güncellenmelidir.

6- Test alanını bir LDAP kullanıcısının bilgilerini giriyoruz ve **Test** butonuna basarak kontrol ediyoruz.

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

7- Yukarıdaki gibi başarılı sonuç aldıysak **Update** butonuna basarak ayarı kayıt ediyoruz. 

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

8- Açılan **Authentication** tabından Default authenticationu istersek LDAP olarka güncelleyebiliriz. 

İşlem tamam :)

_Not: Zabbix server kurulu olan makina üzerinden LDAP hostuna 389 veya 636 portları üzerinden ulaşamıyorsanız iç ve dış firewall izilerinizi ev özellikle RPM tabanlı sistemlerde Selinux'u kontrol etmeyi unutmayın._
Python Programming Bootcamp #17 - lists: sort, range, enumerate; tuples
Tags: python, programming, tutorial, beginners
Published: 2023-03-22 04:50:45

---
title: Python Programming Bootcamp #17 - lists: sort, range, enumerate; tuples
published: true
description: The second part of the lists chapter and the tuples chapter in the Python programming bootcamp for scientists
tags: python, programming, tutorial, beginner
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-22 04:48 +0000
canonical_url: https://code-maven.com/programming-bootcamp-for-scientists-17
series: bootcamp
---

{% youtube F8-2iSOfpbg %}

* 00:00 The second part of the Lists chapter.
* 01:10 About debugging
* 06:20 [sort](https://code-maven.com/slides/python/sort)
* 07:30 sort numbers
* 08:57 sort mixed list
* 09:37 sort (key)
* 11:05 sort with sorted
* 14:15 [range](https://code-maven.com/slides/python/range)
* 15:56 Looping over index
* 18:25 [Enumerate lists](https://code-maven.com/slides/python/enumerate-lists) (go over lists using index-value pairs)
* 19:57 List operators
* 22:11 List of lists
* 24:36 List assignment
* 26:30 [Tuples](https://code-maven.com/slides/python/tuples)
* 28:00 [Sort Tuples](https://code-maven.com/slides/python/sort-tuples)
* 30:00 Exercise: color selector menu
* 32:22 Exercise: count digits
* 33:15 Exercise: create list
* 34:00 Exercise: count words
* 34:47 Exercise: check if number is prime
* 35:00 Exercise: DNA sequencing
BitAlpha AI Survey, Is BitAlpha AI Trick Application?
Tags: bitalphaai
Published: 2023-03-22 04:15:39

Official Site, Login Page, and Individuals Region: There are numerous sites professing to be the "Official [BitAlpha AI](https://www.bitalphaaibot.com) bot". Some are parodied website pages that continue to change continually. They are phony.

 This stage is likewise being utilized with an alternate plan nowadays. We have added a different segment which makes sense of why this is occurring.

Confirmation of Trick
 A more critical look will uncover that it is showcased as the "world's most clever crypto programming" which creates $950-$2,200 day to day. That is a seriously strong case from a thoroughly inadequate piece of rubbish exchanging innovation. Yet, that is only the beginning of it.

BitAlpha AI Application Enrollment Region (Unique Rendition)
One layout has been reused ordinarily, and nowadays it is being utilized principally for European, Australian, and Canadian inhabitants. We are uncertain regarding the reason why tricksters continue to utilize this reused layout, yet we have referenced beforehand in large numbers of our surveys that the scalawags need to plug into a sort of turnkey arrangement which permits them to switch logos, add a touch of content or designs, and afterward send off rapidly.



[https://www.bitalphaaibot.com](https://www.bitalphaaibot.com)

[https://twitter.com/bitalphaai](https://twitter.com/bitalphaai)

[https://www.instagram.com/bitalphaai](https://www.instagram.com/bitalphaai)

[https://www.pinterest.co.uk/bitalphaai_](https://www.pinterest.co.uk/bitalphaai_)

[https://www.facebook.com/bitalphaai.official](https://www.facebook.com/bitalphaai.official)

[https://www.youtube.com/@bitalphaai](https://www.youtube.com/@bitalphaai)

[https://sites.google.com/view/bitalphaai/home](https://sites.google.com/view/bitalphaai/home)

[https://bitalphaai.blogspot.com/](https://bitalphaai.blogspot.com/)

[https://medium.com/@bitalphaai](https://medium.com/@bitalphaai)

[https://bitalphaai.gumroad.com/](https://bitalphaai.gumroad.com/)

[https://www.reddit.com/user/bitalphaai](https://www.reddit.com/user/bitalphaai)

[https://bitalphaai.wordpress.com/](https://bitalphaai.wordpress.com/)

[https://www.tumblr.com/blog/bitalphaai](https://www.tumblr.com/blog/bitalphaai)

[https://techplanet.today/member/bitalphaai](https://techplanet.today/member/bitalphaai)

[https://bitalphaai.law.blog/](https://bitalphaai.law.blog/)

[https://bitalphaai.mystrikingly.com/](https://bitalphaai.mystrikingly.com/)

[https://bleup-pfaiows-moily.yolasite.com/](https://bleup-pfaiows-moily.yolasite.com/)

[https://bitalphaai.wixsite.com/bitalphaai](https://bitalphaai.wixsite.com/bitalphaai)

[https://groups.google.com/g/bitalpha-ai/c/HJA9wo6S74k](https://groups.google.com/g/bitalpha-ai/c/HJA9wo6S74k)
openGauss：gs_probackup
Tags: opengauss
Published: 2023-03-22 03:23:55

gs_probackup
Background Information
gs_probackup is a tool for managing backup and recovery of openGauss databases. It makes regular backups of the openGauss instance to be able to restore the server in the event of a database failure.

It can be used to back up a stand-alone database, or back up a host or master node database backup machine, which is a physical backup.
The contents of external directories can be backed up, such as script files, configuration files, log files, dump files, etc.
Support incremental backup, regular backup and remote backup.
The backup retention policy can be set.
prerequisite
The openGauss database can be connected normally.
To use PTRACK incremental backup, you need to manually add the parameter "enable_cbm_tracking = on" in postgresql.conf.
In order to prevent the xlog from being cleared before the end of the transmission, please increase the value of wal_keep_segments in the postgresql.conf file appropriately.
Restrictions
Backups must be performed by the user running the database server.
The major version number of the database server backed up and restored must be the same.
If you want to back up the database in remote mode through ssh, you need to install the same major version of the database on the local and remote hosts, and use the ssh-copy-id remote_user@remote_host command to set the passwordless ssh connection between the local host backup user and the remote host database user .
In remote mode, only add-instance, backup, and restore subcommands can be executed.
Before using the restore subcommand, stop the gaussdb process first.
When there is a user-defined table space, the --external-dirs parameter must be added when backing up, otherwise, the table space will not be backed up.
When the backup scale is relatively large, in order to prevent timeout from occurring during the backup process, please adjust the parameters session_timeout and wal_sender_timeout in the postgresql.conf file appropriately. And properly adjust the value of the parameter –rw-timeout in the backup command line parameters.
When restoring, when using the -T option to redirect the external directory in the backup to a new directory, please specify the parameter --external-mapping at the same time.
After the incremental backup is restored, the previously created logical replication slot is unavailable and needs to be deleted and rebuilt.
When using remote backup, please ensure that the clocks of the remote machine and the backup machine are synchronized to prevent recovery from using --recovery-target-time, which may fail when starting gaussdb.
When remote backup is enabled (remote-proto=ssh), make sure -h and --remote-host specify the same machine. When the remote backup is invalid, if the -h option is specified, please make sure that -h specifies the local address or the local host name.
Currently, backup of logical replication slots is not supported.
2492. Leetcode Solution in cpp
Tags: cpp
Published: 2023-03-22 03:15:33


```cpp
class Solution {
public:
    // adj matrix by roads
    vector<pair<int, int>> adj[100001];
    
    int minScore(int n, vector<vector<int>>& roads) {
        // build adj matrix
        for(auto i : roads) {
            adj[i[0]].emplace_back(make_pair(i[1], i[2]));
            adj[i[1]].emplace_back(make_pair(i[0], i[2]));
        }
        vector<int> vis(n + 1, 0);
        queue<int> q;
        q.emplace(1);
        int ans = INT_MAX;
        for(; !q.empty(); q.pop()) {
            int from = q.front();
            vis[from] = 1;
            for(auto [to, val] : adj[from]) {
                if(!vis[to]) {
                    ans = min(ans, val);
                    q.emplace(to);
                }
            }
        }
        return ans;
        
    }
};
```
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/minimum-score-of-a-path-between-two-cities/
openGauss：gs_backup
Tags: opengauss
Published: 2023-03-22 03:15:32

gs_backup
Background Information
After the successful deployment of openGauss, various problems and abnormal states will be encountered during the operation of the database. openGauss provides the gs_backup tool to help openGauss back up and restore important data, display help information and version number information.

prerequisite
The openGauss database can be connected normally.
When restoring, it is necessary to ensure that backup files exist in the backup directory of each node.
Run the gs_backup command as the operating system user omm.
grammar
backup database host

gs_backup -t backup --backup-dir=BACKUPDIR [-h HOSTNAME] [--parameter] [--binary] [--all] [-l LOGFILE]
Restoring the database host

gs_backup -t restore --backup-dir=BACKUPDIR [-h HOSTNAME] [--parameter] [--binary] [--all] [-l LOGFILE] [--force]
show help information

gs_backup -? | --help
Display version number information

gs_backup -V | --version
Parameter Description
The gs_backup parameters can be divided into the following categories:

Backup database host parameters:

-h

Specifies the name of the host where the backup file is stored.

Value range: host name. If no hostname is specified, the current database instance is backed up.

--backup-dir=BACKUPDIR

Backup file save path.

–parameter

Back up the parameter file. When the –parameter, –binary, –all parameters are not specified, only the parameter file is backed up by default.

–binary

Backup the binary files in the app directory.

–all

Back up the binary files, pg_hba.conf and postgsql.conf files in the app directory.

-l

Specify the log file and storage path.

Default: $GAUSSLOG/om/gs_backup-YYYY-MM-DD_hhmmss.log

Restore database host parameters:

-h

Specifies the name of the host that needs to be restored.

Value range: host name. If no host is specified, the corresponding backup node will be restored.

--backup-dir=BACKUPDIR

Restore file extraction path.

–parameter

Restore the parameter file. When the --parameter, --binary, and --all parameters are not specified, only the parameter file is restored by default.

–binary

Restore binaries.

–all

Restore binary and parameter files.

-l

Specify the log file and storage path.

Default: $GAUSSLOG/om/gs_backup-YYYY-MM-DD_hhmmss.log

--force

After the static file of the node is lost, it will be restored forcibly, and it will only take effect when –all or –binary is used together.

Other parameters:

-?, --help

Display help information.

-V, --version

Display version number information.

-t

Specifies the type of operation.

Value range: backup or restore.
Understanding CRUD: The Key to Mastering Programming Concepts and Building Better Apps
Published: 2023-03-22 03:13:20

Most important thing with programming is understanding the concepts of how to solve a single problem.

From knowing how you did that you go to the next and you keep getting better repetitively. 

After number of days as many as possible of consistency you'll look back and appreciate yourself for keeping on trying.

If you're asking yourself what project should I work first ?

My Boss speaks of "TODO manager"   

Normally creating a TODO App is among fastest way to understand the concepts of what is necessary required for every app on the internet. 

Which is "CRUD" .

CRUD stands for :

1. Create
2. Read
3. Update
4. Delete


1+) 
Create means allowing users add new input into the app. ( E.g : Creating an account, Creating a new post on Instagram, or Create a new contact with your phone ).

2+)
Read means to fetch a data for preview or use. ( E.g:
Viewing whatsapp status, checking up an image from a gallery or searching for a saved number from Contacts list ).

3+)
Update means change of data or information to replace with another. ( E.g : Updating a new profile picture, Updating your mobile phone, Update news feed ).

4+)
Delete means what it sounds.
This deals with removing data from the system. ( E.g : Delete a social media post, Delete a video on your device or Delete the app ).


The good news is after knowing this four operations you'll have a clear grasp understanding how to continue chasing what you want. 

We are together in to this.

Be strong. 

If you're reading this today I have highest hope of one day you'll land your software engineering job, and that's when the real learning starts.

We're proud of you.
openGauss：gs_restore
Tags: opengauss
Published: 2023-03-22 03:12:22

Background Information
gs_restore is an import tool provided by openGauss for the data exported by gs_dump. The export file generated by gs_dump can be imported by this tool.

The gs_restore utility is executed by the operating system user omm.

Main features include:

import to database

If a database is specified in the connection parameters, the data will be imported into the specified database. Among them, the parallel import must specify the password of the connection. Generated columns are automatically updated on import and saved like normal columns.

Import to script file

If the import database is not specified, create a script containing SQL statements necessary to rebuild the database and write it to a file or standard output. Equivalent to exporting directly to plain text using gs_dump.
openGauss：gs_dumpall
Tags: opengauss
Published: 2023-03-22 03:10:54

gs_dumpall
Background Information
gs_dumpall is a tool used by openGauss to export all database-related information. It can export all data of the openGauss database, including the data of the default database postgres, the data of the custom database, and the global objects common to all databases of openGauss.

The gs_dumpall utility is executed by the operating system user omm.

When the gs_dumpall tool is exporting data, other users can access the openGauss database (read or write).

The gs_dumpall tool supports exporting complete and consistent data. For example, start gs_dumpall at time T1 to export the openGauss database, then the exported data result will be the data status of the openGauss database at time T1, and the modification to openGauss after time T1 will not be exported.

Generated columns are not dumped during gs_dumpall.

gs_dumpall is divided into two parts when exporting all openGauss databases:

gs_dumpall itself exports global objects common to all databases, including information about database users and groups, tablespaces, and attributes such as access rights that apply to the database as a whole.
gs_dumpall completes the export of the SQL script file of each database in openGauss by calling gs_dump. The script file contains all the SQL statements required to restore the database to its saved state.
The results exported from the above two parts are SQL script files in plain text format, and the openGauss database can be restored by running the script file with gsql.

Precautions
It is forbidden to modify the exported files and content, otherwise the recovery may not be successful.
In order to ensure data consistency and integrity, gs_dumpall sets shared locks on the tables that need to be dumped. If a table has a shared lock set in another transaction, gs_dumpall will wait for the table lock to be released before locking the table. If a table cannot be locked within the specified time, the dump will fail. Users can customize the timeout period for waiting for locks by specifying the --lock-wait-timeout option.
Since gs_dumpall reads all tables in the database, you must connect as an openGauss administrator to export the full file. When using gsql to import script files, administrator privileges are also required to add users and groups and create databases.