teleren/devto huggingface dataset:
Graph Database: Introduction
Tags: graph, database, dbms, nosql
Published: 2023-01-06 07:12:29

A graph database is a type of NoSQL database that uses graph theory to store, map, and query relationships. It is designed to handle data with complex relationships, such as social networks, recommendation systems, and fraud detection.
Unlike traditional relational databases, which store data in tables with rows and columns, a graph database stores data in a graph structure with nodes, edges, and properties. Nodes represent entities, such as people or products, and edges represent relationships, such as friendship or purchase history. Properties are key-value pairs that provide additional information about the nodes and edges.

To use a graph database, you need to define the schema of your data, which includes the node labels, edge labels, and property keys. You can then create nodes and edges and set their properties. For example, to represent a social network, you might create nodes for users and edges for friendships, with properties for the user's name, location, and interests.

To query a graph database, you can use a graph query language, such as Cypher or Gremlin. These languages allow you to traverse the graph, filter nodes and edges, and return results. For example, you can use a Cypher query to find all the users who live in a certain city and are friends with a specific user.
There are several subtopics related to graph databases, such as graph data modeling, graph indexing, and graph algorithms. Graph data modeling is the process of designing the schema of your data to optimize for querying and performance. Graph indexing is the process of creating indices to speed up queries. Graph algorithms are mathematical techniques used to analyze and manipulate graph data, such as shortest path algorithms and community detection algorithms.

In conclusion, a graph database is a powerful tool for storing and querying data with complex relationships. It allows you to represent and manipulate data in a natural and intuitive way, and offers a wide range of capabilities for data analysis and visualization.
Blink an LED
Tags: microcontroller, atmega128, chatgpt, beginners
Published: 2023-01-09 06:43:45

My code
```
#define F_CPU 16000000L
#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
	DDRB |= 0x0F;	// xxxx1111
	
	PORTB = 0x01;
	while (1)
	{	
		_delay_ms(500);
		
		PORTB = PORTB << 1;
		if(PORTB == 0x10)
			PORTB = 0x01;
	}
}
```

chatGPT's code
```
#include <avr/io.h>
#include <util/delay.h>

#define LED_PIN PB0

DDRB |= (1 << LED_PIN);
int main(void){
    while (1) {
        PORTB |= (1 << LED_PIN);  // turn the LED on
        _delay_ms(500);  // delay for 500 milliseconds
        PORTB &= ~(1 << LED_PIN);  // turn the LED off
        _delay_ms(500);  // delay for 500 milliseconds
    }
    return 0;
}

```

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

Easy
Simple Landing Page in HTML
Tags: webdev, html, javascript, beginners
Published: 2023-01-09 06:36:56

Here is simple html code for your landing page 

```
<html>
  <head>
    <title>Landing Page</title>
  </head>
  <body>
    <h1>Welcome to my landing page!</h1>
    <p>Thank you for visiting. Please take a look around and learn more about what I have to offer.</p>
    <ul>
      <li><a href="#services">Services</a></li>
      <li><a href="#about">About me</a></li>
      <li><a href="#contact">Contact</a></li>
    </ul>
    <h2 id="services">Services</h2>
    <p>I offer a variety of services, including web design, graphic design, and social media management. Let me know how I can help you succeed online.</p>
    <h2 id="about">About me</h2>
    <p>I am a creative professional with years of experience in the industry. I am passionate about helping businesses and individuals achieve their goals through effective online marketing.</p>
    <h2 id="contact">Contact</h2>
    <p>If you have any questions or would like to work with me, please don't hesitate to get in touch. You can reach me by email at hello@example.com or by phone at 555-555-5555.</p>
  </body>
</html>

```
This code creates a basic landing page with a heading, a paragraph, and a list of links to different sections of the page. The page also includes three sections: "Services," "About me," and "Contact." Each section has its own heading and paragraph of text.


Hopes it helps you 
Do follow me on twitter
Clustering Algorithms in Machine Learning
Tags: machinelearning, python, datascience
Published: 2023-01-09 06:29:47


Clustering algorithms are a type of unsupervised learning method in machine learning that divides a dataset into groups (also known as clusters) based on the patterns in the data. The goal of clustering algorithms is to group data points in a way that points within a group are more similar to each other than they are to points in other groups.

There are several different types of clustering algorithms, each with its own unique characteristics and applications. Some common examples include:

K-means clustering: This is a widely used algorithm that divides a dataset into a specified number (k) of clusters. It does this by iteratively assigning each data point to the closest cluster based on the mean of the points in the cluster, and then updating the mean of each cluster until convergence.

Hierarchical clustering: This type of clustering algorithm creates a hierarchy of clusters by repeatedly dividing the dataset into smaller and smaller clusters. There are two main types of hierarchical clustering: agglomerative, which starts with individual data points and merges them into larger clusters, and divisive, which starts with the whole dataset and divides it into smaller clusters.

DBSCAN: This algorithm is designed to find clusters of any shape in a dataset. It does this by identifying points that are in high-density regions of the dataset and grouping them together, while ignoring points in low-density regions.

Clustering algorithms have a wide range of applications, including image segmentation, text analysis, and customer segmentation. They are often used as a preprocessing step for other machine learning tasks, such as classification and regression.

It's important to note that choosing the right clustering algorithm for a given dataset can be a challenge, as different algorithms may perform better on different types of data. It is also important to carefully evaluate the quality of the clusters produced by a clustering algorithm, as this can have a significant impact on the accuracy of downstream machine learning tasks.
VIM - Search, Replace, Text Objects and Tags.
Tags: learning, vim
Published: 2023-01-09 06:26:22

## Same Line Search Mode:

<kbd> <kbd>f</kbd><kbd>{char}</kbd> </kbd> - Forward search
<kbd> <kbd>F</kbd><kbd>{char}</kbd> </kbd> - Reverse search
<kbd> <kbd>t</kbd><kbd>{char}</kbd> </kbd> - move you to the next occurrence of the character afterwards
<kbd> <kbd>T</kbd><kbd>{char}</kbd> </kbd> - Same as **t** but in reverse
<kbd>;</kbd> - Repeat in the same direction
<kbd>,</kbd> - Repeat in the opposite direction


## Searching:

<kbd> <kbd>/</kbd><kbd>{pattern}</kbd> </kbd> - Forward search
<kbd> <kbd>?</kbd><kbd>{pattern}</kbd> </kbd> - Reverse search
<kbd>n</kbd> - Repeat search in the same direction
<kbd>N</kbd> - Repeat search in the opposite direction
<kbd>*</kbd> - Forward search for word where the cursor is current located
<kbd>#</kbd> - Reverse search for word where the cursor is current located

## Substitute Command

### Format:
```vim
:[range]s/{pattern}/{string}/[flags]
```

### Global Substitution:
```vim
:%s/{pattern}/{string}/g
```

## Text Object & Tags

### Format:
`{operator}{a}{object}`
`{operator}{i}{object}`

#### Examples:

<kbd> <kbd>d</kbd><kbd>a</kbd><kbd>w</kbd> </kbd> - Delete A Word
<kbd> <kbd>c</kbd><kbd>i</kbd><kbd>w</kbd> </kbd> - Change Inner Word
<kbd> <kbd>c</kbd><kbd>i</kbd><kbd>"</kbd> </kbd> - To change what is inside quoted strings
<kbd> <kbd>d</kbd><kbd>i</kbd><kbd>[</kbd> </kbd>  - Delete what is inside brackets
<kbd> <kbd>y</kbd><kbd>i</kbd><kbd><</kbd> </kbd> - Yank what is inside angle brackets
<kbd> <kbd>d</kbd><kbd>a</kbd><kbd>p</kbd> </kbd> - Delete the entire paragraph
<kbd> <kbd>y</kbd><kbd>a</kbd><kbd>s</kbd> </kbd> - Yank a sentence. A sentence is defined as ending at a '.', '!' or '?' followed by either the end of a line, or by a space or tab.
144. Binary Tree Preorder Traversal
Tags: java, leetcode, 100daysofcode, problemoftheday
Published: 2023-01-09 06:20:25

**Problem Statement:**
Given the root of a binary tree, return the preorder traversal of its nodes' values.

 

**Example 1:**
**Input:** root = [1,null,2,3]
**Output:** [1,2,3]

**Example 2:**
**Input:** root = []
**Output:** []

**Example 3:**
**Input:** root = [1]
**Output:** [1]
 

**Constraints:**

- The number of nodes in the tree is in the range [0, 100].
- -100 <= Node.val <= 100

**Solution:**
**Algorithm:**

1. Create an arraylist and a stack.
2. If the node is null return the arraylist.
3. Add the node to stack.
4. Run a while loop till the stack is not empty.

 - Pop the node and add it to the list.
 - If right node is not null add it to the stack.
 - If left node is not null add it to the the stack
5. Return the arraylist.

**Code:**
```
class Solution {
    public List<Integer> preorderTraversal(TreeNode root) {
        List<Integer> result = new ArrayList<>();
        Stack<TreeNode> stack = new Stack<>();
        
        if (root == null) {
            return result;
        }
        
        stack.push(root);
        while (!stack.empty()) {
            TreeNode node = stack.pop();
            result.add(node.val);
            
            if (node.right != null) {
                stack.push(node.right);
            }
            if (node.left != null) {
                stack.push(node.left);
            }
        }
        
        return result;
    }
}
```
Snowflake Connector for Python
Tags: beginners, snowflake
Published: 2023-01-09 05:53:08

I am trying to use the snowflake connector for python in a lambda function. I am using a virtual environment and I am getting this error.

`Running PythonPipBuilder:ResolveDependencies

Build Failed
Error: PythonPipBuilder:ResolveDependencies - {snowflake==0.0.3(sdist)}
SAM Build has failed: Command did not exit successfully, exit code: 1
94 has failed: Command did not exit successfully, exit code: 1`

I have no problem with importing anything else from my site-packages in the virtual environment, but for some reason it cannot find snowflake, even though I can see it installed correctly in the virtual environment.

Can anyone tell me what I'm missing?
NetSuite API Insert Phone Call
Tags: netsuite
Published: 2023-01-09 05:48:37


I've successfully created a phone call record in netsuite and related it to a company record. However, I haven't been able to relate a phone call to a contact record. Where am I going wrong?

Error
{
   "message": "Invalid contact reference key 43780 for company <NULL>.",
   "code": "INVALID_KEY_OR_REF"
}
Culture beats Strategy
Tags: culturebuilding, culturebeatsstrategy, strategyexecution, storybytes
Published: 2023-01-09 05:47:32


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l7ejgjykimq3qynvcw2m.png)As the year begins, many organisations try to start or adjust a few things. A start of the year that improves from the previous year, a stable commencing that will lead with lots of hope and confidence to the brighter side of the organisation’s success. Anytime such movements are planned, a strategy is prepared and ready to roll out. A Strategy that is layered and complex but still understandable for everyone. Nevertheless, we often forget that a culture exists and is the driver to accept and embrace the strategy. Culture is often valued in the organisation as a mouse, something small, quirky and can be ignored. Whereas Strategy is big, sounds loud and has a gigantic impression resembling an Elephant. The Reality is that Culture beats strategy, also known as “Culture eats Strategy for Breakfast”. That tiny mouse, holding the Culture, can embrace any Elephant that marches with the strategy. It is often agreed that how we do things is more important than how well we do them. But do we put that into practice? How much effort are you placing on your company’s culture? It is less about what we want to achieve and more about who we are. Focusing on it will go a long way and help in hiring the right people, letting go of the wrong people, and creating a productive and meaningful organisation for which people love to work. Please start with the culture, and then other things tend to fall in place.
Socialite Login with Facebook Account In Laravel 9
Tags: laravel, socialite, facebook, codenewbie
Published: 2023-01-09 05:30:00

In this article, we will see socialite login with a facebook account laravel 9. 

Here, we will learn how to create socialite login with facebook in laravel 8 and laravel 9. 

Many websites provide different types of login authentication to users like login with facebook, login with google/email, login with Github, and login with Twitter.

So, let's see login with facebook account in laravel 9, laravel 9 jetstream login with facebook, and laravel 9 socialite facebook login.

Here, I have used laravel 9 jetstream authentication for the laravel social login example.

```
Step 1: Install Laravel 9 for Socialite Login with Facebook Account

Step 2: Install JetStream for Laravel Authentication

Step 3: Install Socialite Package

Step 4: Create Facebook App

Step 5: Changes in Config File

Step 6: Create Controller for Facebook Login

Step 7: Create Route

Step 8: Add Code in Blade File

Step 9: Add Column in Database

Step 10: Update Model

Step 11: Run Project
```
How I Rented My Old Apartment In Tbilisi
Published: 2023-01-09 05:27:16

✨ [**Watch on YouTube**](https://youtu.be/dw4AvBLXMFU)

Recently I moved into my new apartment, and it was time to rent my old place. The apartment is on the edge of the Vake neighborhood, so it's almost in the center. It has around 64 squire meters of space and has a good enough renovation. The building is not great, but not the worst either. Since the apartment is on the twelfth floor and windows do not face the street, it has a better-than-average view.

As soon as we moved all the things to the new place, we paid a cleaner 60$ to make up the apartment, took pictures, and posted it on the most popular real estate portal MyHome.ge with the price of 1200$. The idea was to start high and lower the price by 50$ a day or two. Right away, we started getting calls from agents even though we stated in the post that we won't rent through an agency. Only after a few days, with the price of 1100, did one couple come to check the apartment, they seemed to like it, but we didn't hear from them again.

While we didn't want to deal with agencies, some said they would bring people but would charge tenants instead of us. While it felt strange to us why people would rent through an agency while you can go to the website and rent yourself, we agreed to show the apartment to one agent who brought two couples. One of them liked the apartment, so the agent went to print a generic rental agreement, and we both signed the one-year lease with 1050$ monthly payment. The agent made 550$ from this deal.

I'm not thinking of this money as a pure profit. There are taxes, fixing apartment things that would break, and renovations to make after tenants leave. Also, rent is superficially high in Tbilisi right now. Once the war is over, and there is less demand, prices can get twice lower.
How To Accelerate Drupal Development with Lando
Published: 2023-01-09 05:17:03

---
title: How To Accelerate Drupal Development with Lando
published: true
---
Ever wonder what makes Lando a powerful DevOps tool when you already have Docker installed? This blog is your chance to know a lot more about setting up Lando with Drupal and why you should do it.

https://www.specbee.com/blogs/accelerate-drupal-development-with-lando

#lando #landosetup #landowithdrupal #drupaldevelopment  #devopstool #drupalwebsite #devops #docker #drupalwithlando #specbee
Make You Rich "Create A Site Like Wikihow"
Tags: wikihow
Published: 2023-01-09 05:11:00

---
title: Make You Rich "Create A Site Like Wikihow"
published: true
description: wikiHow explains everything about anything in a semi-literal sense. Are you thinking of investing in the stock market? Or how to play the bank of fortune game? Or even design your own car? All these topics and more have more than one guide on this site.
tags: Wikihow
# cover_image: https://www.abreakz.com/wp-content/uploads/2023/01/writers.png.webp
# Use a ratio of 100:42 for best results.
published_at: 2023-01-09 05:11 +0000
---
Gitlab-CI - How to share environment variables to the after_script?
Tags: sre, devops
Published: 2023-01-09 05:00:00

In **Gitlab-CI**, you can use `after_script` to do some stuff after a job, what ever appends during the job.

## Issue
But if you tried to share environment variables from your `before_script` or `script` part *(note : I talk about environment variables which are declared with `export` in one of this section)*, you won't be able to access to them.

## What cause the issue?
For the `after_script` execution, Gitlab will **create a new shell instancce** to execute it.

So all the temporary elements **which are not shared accross multiple shell instances won't be accessible in `after_script`**.

## Resolution
So to resolve it, you can just print the value of the desired environment variable in a file, then read this file in the `after_script` section.

```yaml
job:
  before_script:
    - export TEST="test"
    - echo $TEST > test
  after_script:
    - export TEST = $(cat test)
    - echo $TEST
```

---

## Links
- Gitlab : https://gitlab.com/
- Gitlab-CI - after_script : https://docs.gitlab.com/ee/ci/yaml/#after_script

---

I hope it will help you! 🍺

---

<center><h3>You want to support me?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Today I completed 2001 Solutions on Leetcode🥳🥳🥳
Tags: leetcode, chiki1601, beginners
Published: 2023-01-09 04:27:54


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



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/49y7nz7wnp5ejebaaune.png)
Podcasts and why I love them for Computer Science
Tags: computerscience, javascript, podcast, beginners
Published: 2023-01-09 04:09:43

Syntax, Whiskey, Web, Whatnot, JS Party, Javascript Jabber, Enjoy the View, the list goes on... when it comes to podcasts that can help a software engineer.

What makes Podcasts so helpful?

The main reason to listen to the above mentioned podcasts is to both learn challenging aspects of computer science, but also to find out about new tools that can later be researched. 

Some podcasts can really go on a deep dive where as others might only give a cursory skimming over of topics. A deep dive maybe a bit too much in the moment but can be revisited. A shallow skim can be good to re-orientate one's brain on a subject.

For example, you may know React Redux pretty well, but listening to a podcast about it can help connect the dots a bit more and provide insights on how to explain it to others. The podcast can also explore aspects of Redux like its history or deep dives into certain aspects of Redux that can be explained better.

Lastly, a lot of podcasts, like [Syntax](www.syntax.fm), have a lots of great links in their show notes for further deep dives!
144. Leetcode solution in Cpp
Tags: cpp
Published: 2023-01-09 03:59:24

```cpp
/**
 * Definition for a binary tree node.
 * struct TreeNode {
 *     int val;
 *     TreeNode *left;
 *     TreeNode *right;
 *     TreeNode() : val(0), left(nullptr), right(nullptr) {}
 *     TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
 *     TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
 * };
 */
class Solution {
 public:
  vector<int> preorderTraversal(TreeNode* root) {
    vector<int> ans;
    preorder(root, ans);
    return ans;
  }

 private:
  void preorder(TreeNode* root, vector<int>& ans) {
    if (!root)
      return;

    ans.push_back(root->val);
    preorder(root->left, ans);
    preorder(root->right, ans);
  }
};

```
#leetcode
#Challenge
Here is the link for the problem:
https://leetcode.com/problems/binary-tree-preorder-traversal/
How To Be More Productive As Software Engineer | BugTalks | Episode #1
Tags: webdev, beginners, programming, tutorial
Published: 2023-01-09 03:50:34


In this video, We are going to discuss about the 9 Productivity Tips for Software Testers, Developers
These are the exact methods I have used and got a  awesome results, Lets jump into it and in the video
I gonna share fews tools that can help you to be more productive.

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

So, Productivity is one of the challenge that I always have, I used to struggle to the task. I believe you also, There is Parkison Law, Which states that the Work expands with in Given Time.
So if you have 1 day to write a 10 manual test , you will write 10 but if same thing you can do it in 2 hours also.


🚀 Eat that frog Book : https://amzn.to/327rtra
 
🚀 Best Website Blocker : https://bit.ly/3iQCMKd

🚀 Pomodoro Timer : https://pomotodo.com/

🚀 Download Notion : https://notion.so

🚀 Download Freetom.to  :  https://bit.ly/3iQCMKd
*ngFor not displaying data
Published: 2023-01-09 03:41:33

`<div class="row mt-3">{{topHeadlinesData}}
        <ul *ngFor="let data of topHeadlinesData;" class="col-lg-3 mt-3 mb-3">
            <li class="box">
                <img src="{{data.urlToImage}}" alt="image">
                <h5 class="mt-3 mb-3">{{ data.title }}</h5>
                <a class="btn btn-dark btn-sm" href="{{data.url}}" target="_blank">Read More</a>
            </li>
        </ul>
</div>`

The data in `{{topHeadlinesData}}` is displaying, but the list i.e. the `<ul>` with ngFor is absent from DOM
Day 4 #100DaysofCode
Tags: beginners, webdev, 100daysofcode
Published: 2023-01-09 03:30:04

Jumping right in

## Concepts I learned today

* CSS Functions
  * Calc()
  * Min()
  * Max()
  * Clamp()

* CSS Custom Properties

* Browser Compatibility

* CSS Frameworks and Preprocessors

* HTML Forms
The application of ZigBee technology in smart home
Tags: zigbee
Published: 2023-01-09 03:19:30


Strong anti-interference ability: ZigBee transceiver module uses 2.4G direct-sequence spread spectrum technology, which has better anti-interference ability than general FSK, ASK and frequency hopping data transmission stations.

Good confidentiality: ZigBee provides data integrity check and authentication functions, [ZIGBEE Module](https://www.cdebyte.com/Module-Zigbee) the encryption algorithm adopts the general AES-128, and the 128-bit password guarantees the confidentiality of ZigBee signal transmission.

Fast transmission speed: ZigBee mostly uses short frames to transmit data, so the transmission speed is fast and the real-time performance is strong.

Strong scalability: ZigBee is easy to network and has strong self-recovery ability. Therefore, it is easy to expand in smart homes and add new devices.

The advantages of zigbee technology looks beautiful

However, we must realize that after many functions of ZigBee are implemented in the application scenarios of smart homes, they become beautiful advantages:

Is the cost of the zigbee module really low?

At present, TI's CC2430, CC2530 and Freescale's MC1319X and MC1322X series, which have relatively large shipments of ZIGBEE chips, cost about 2 to 3 US dollars. Considering other peripheral devices and related 2.4G RF devices, the BOM cost is difficult to be low At $10, [serial to ethernet ](https://www.cdebyte.com/Module-Testkits)adaptor the cost is quite embarrassing for smart home devices that are cost-sensitive and require a large number of nodes.