teleren/devto huggingface dataset:
100 Days Coding Challenge - Day 8: FreeCodeCamp JavaScript Algorithms and Data Structures
Tags: javascript, programming, 100daysofcode, algorithms
Published: 2023-05-27 20:44:32

## Day 8

I'm doing the course of JavaScript, its good for now, I'm learning the basic JavaScript, and for tomorrow I will finish it


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

Plus, visit my GitHub, I upload the projects that I do :D

https://github.com/AlexMGP7


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h96b4fk3s9xv7j8qhesw.png)
Maximizing Website Potential: The Power of Image Optimization
Published: 2023-05-27 20:37:36

In the fast-paced digital landscape, image optimization is essential for web development success. Optimized images enhance website performance, user experience, and search engine rankings. Here are key practices for effective image optimization:

Optimal Formats: Choose the right image format—JPEG for high-resolution photos, PNG for fewer colors/transparency, and GIF for simple animations.

Compression: [Reduce file size without compromising quality.](https://compressedjpegs.live/) Use online tools or software for efficient compression.

Resize and Crop: Scale images to fit the display size, minimizing file size. Image editing software or CMS tools simplify this task.

Alt Text Optimization: Describe images concisely with keyword-rich content for accessibility and search engine understanding.

Lazy Loading: Improve initial load times by loading images when they become visible. JavaScript libraries ease implementation.

Browser Caching: Enable caching to store images on users' devices, reducing server load and improving subsequent visits.

Content Delivery Networks (CDNs): Utilize CDNs to distribute images across global servers for faster delivery and improved loading speeds.

Mobile Optimization: Optimize images for mobile browsing with responsive design, ensuring proper sizing and faster loading on mobile devices.

By implementing these practices, web developers can unlock the full potential of their websites, delivering superior performance, increased visibility, and exceptional user experiences.
Yo, First Game Jam Completed Game done.
Tags: gamedev, gdevelop, opensource, learning
Published: 2023-05-27 20:12:31

[Itch.io : Trabin/Wry-Pin](https://trabin.itch.io/wry-pin)
[GD Games : Trabin/Wry-Pin](https://gd.games/trabin/wry-pin)

It's made in [GDevelop](https://www.GDevelop.io), which I'd hadn't touched prior to this past week. Also, using an Experimental Extension that allows 3D space, which has little to no documentation.

This was actually a whole lot of fun. If it gathers enough interest, I'll expand it, focus on art and fine tune some stuff.

[GDevelop](https://www.GDevelop.io) dotes itself as a Code-free game engine, though there is a lot of logic involved. It is pretty quick to get going with it, and there's a myriad of various in-engine tutorials and examples that helped out incredibly. I don't think I would have picked up on it as fast if it hadn't, and the learning curve compared to Unreal (which has also become dev EZ mode) and Unity is much much smaller.

[GDevelop](https://www.GDevelop.io) allows you to also not only develop locally, but there's a free cloud service that can hold onto your games while you go from one location to the other, but also On the Go. [GDevelop](https://www.GDevelop.io) works in app and in browser, meaning you could be working or fixing a game while on vacation or while riding the bus to the convention. From simple to complex, [GDevelop](https://www.GDevelop.io) might not have the power of the bigger names, but it does pack the kit well, and more and more possibilities are becoming a reality with this engine.

If this is something you're interested, this is what I could do with no experience. Imagine what you can make?

I'd love to see what you build.

Did I mention that [GDevelop](https://www.GDevelop.io) is Free and Open source?
Internals of PostgreSQL:Understanding the process Architecture of PostgreSQL.
Published: 2023-05-27 20:06:31

**Introduction**
A database cluster in PostgreSQL is a collection of databases managed by a PostgreSQL server, When we start a database cluster, different processes occur, and I will be summarizing them below. 

**Postgres Process**
This process is started when a database cluster is created using this command `bin/pg_ctl -D test -l logfile start `, it starts all other processes and wait for connection requests from a client. 

**Back-end Process**
When a connection request is made, such as connecting an API's database to a Postgres database, this process is started, each client can only connect to one database at the same time. It handles all queries made by a client.

**Background Process**
A background process runs in the background, it is independent of any client connections. Background processes are used to perform tasks that are not directly related to serving client requests. These processes are essential for the smooth operation of PostgreSQL. They help to keep the database healthy and running efficiently.

**Conclusion**
In conclusion, delving into the process architecture of PostgreSQL unveils a wealth of knowledge about the inner workings of the database system. By understanding the orchestration of the Postgres process, the role of back-end processes, and the significance of background processes, individuals gain valuable insights into database performance, scalability, reliability, and maintenance.

**References**
https://www.interdb.jp/pg/pgsql02.html
New to web development
Published: 2023-05-27 19:51:42

The last few months I've spent trying to learn how to code I went through a phase where I found myself frustrated and unmotivated to code. I was sticking to a project and trying to do things that were a bit too advanced for me, then getting frustrated when they were unsuccessful. I'm learning that I need to spend more time building projects and being okay if it's not perfect and the code is a little bit sloppy. Lately it is working for me and I'm able to get more practice rather than getting stuck on fixing and tweaking 1 single project for a while.
Can GPT generate GPS data?
Published: 2023-05-27 19:39:43

I am currently working on an orbit determination software. Everything is going well. The software seems to be working fine on a real dataset we got from the satellites that our customers own. Yet, we are not entirely sure if the software is doing a great job because of how little amount of data that we tested our software on. I was searching for any kind of open source GPS satellite data, but I wasn't able to.

So, I have come up with this idea. How about training a pre-trained GPT on the GPS data that we currently have and having the model generate GPS data that are reasonable.

I am not really knowledgeable in LLM or deep learning in general. Can Generative Pre-trained Transformers generate GPS data? or can you train one to generate GPS data?

Thanks!
How to Work with NetworkX
Tags: apacheag, networkx
Published: 2023-05-27 19:33:22

NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. It provides software for complex networks, data structures for graphs, digraphs, and multigraphs, many standard graph algorithms, network structure and analysis measures, generators for classic graphs, random graphs, and synthetic networks. 

To install networkX library run the command `pip install networkx`.

## Graph Creation

```
import networkx as nx
G = nx.Graph()
```
This creates a empty graph. A graph in networkX is collection of nodes (vertices) along with identified pairs of nodes. A node can be any hashable object e.g., string, image, or another Graph etc.

## Nodes
To add nodes we can use one of the following functions:

- `G.add_node(1)` creates a single node

- G.add_nodes_from([2, 3]) creates nodes 2, 3. 

## Edges
Similar to edges we also have two function to add edges to the graph.
- `G.add_edge(1,2)` creates a edge between nodes 1 and 2.

- G.add_nodes_from([(1, 2), (1, 3)]) creates edges between 1,2 and 1,3. 

## Visualize Graphs
NetworkX supports basic graph drawing using the matplotlib library.
```
import networkx as nx
import matplotlib.pyplot as plt
G = nx.complete_graph(6)
nx.draw(G)
plt.show()
```
This will first create a complete graph with 6 nodes. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sigm575816me6ljmmovl.png)

> plt.show() is important to show the graph image on screen.
Spare time
Tags: python, programming, github
Published: 2023-05-27 18:36:44

Welcome to my first post! I thought I would start with what I have been up to today!
I found myself with time on my hands today and decided to clean up a few of my GitHub Repositories.

First up was my Network appliance (Glorified speed testing is all it does at the moment).

Then on to my #Pimoroni #InkyImpression based weather display.

These are linked to in my profile!
Linkedin Sign In Vue3
Tags: vue, oauth, linkedin, javascript
Published: 2023-05-27 18:09:49

# Linkedin Sign in ✅

`Vue 3`

It's client side package for rendering Linkined In Button for any vue app.

To learn more about linked in oAuth2 sign in (https://developer.linkedin.com/)

## Install 
```javascript
npm install linkinedin-auth
```

## Live Demo
Check out the [live demo](https://app.eraa.in) of the component in action.

## Props
| Prop         | Default     | Description |
|--------------|-----------|------------|
| clientId | *required      | Client provided when you sign up for linkinedin developer account and create app.|
| css      |   | To override the default button class |
| redirectUri      | Default is origin app url `window.location.origin`  |  Valid redirect uri follow linkedin developer doc.|
| scope      | `r_emailaddress r_liteprofile` |  To know more follow linkedin developer doc.|
| state      | default is current date timestamp |  A unique string value of your choice that is hard to guess. Used to prevent CSRF. For example, state=DCEeFWf45A53sdfKef424. |

## How it works?
- Import package and add button into your component
- Make sure all props are valid.
- Someone click on the button it will redirect to linkedin account get the code for you and redirect back to redirect uri. followed with query string.
- Take the code and pass it to your backend to validate and grab the user information.

## Usage 
```javascript
<template>
    <LinkedInSignin
        :client-id="linkediInClientId"
        css="flex justify-center py-2 px-2 border border-slate-300 rounded shadow-sm bg-white text-sm font-medium text-slate-500 hover:!bg-slate-50 cursor-pointer"
    />
</template>

<script setup>
    import { LinkedInSignin } from "linkedin-auth";
    const linkediInClientId = process.env.LINKINED_AUTH_CLIENT_ID;
</script>
```


## Usage - Update default slot
```javascript
<template>
    <LinkedInSignin
        :client-id="linkediInClientId"
        css="flex justify-center py-2 px-2 border border-slate-300 rounded shadow-sm bg-white text-sm font-medium text-slate-500 hover:!bg-slate-50 cursor-pointer"
    >
        Login with LinkedIn
    </LinkedInSignin>
</template>

<script setup>
    import { LinkedInSignin } from "linkedin-auth";
    const linkediInClientId = process.env.LINKINED_AUTH_CLIENT_ID;
</script>
```

## Support me 
You can buy me coffee ☕️
https://www.buymeacoffee.com/mayankjhawar

Support me at Patreon
https://patreon.com/mayank120

## License

MIT
Install tool easy by Toolbox
Tags: beginners, tooling, webdev, productivity
Published: 2023-05-27 18:03:34


I developed desktop app for developers
**This app will save your time from annoying downloading visiting web sites one by one.**


You can get it free! : [Toolbox for developers](https://milkcoke.github.io/docusaurus/toolbox-dev/releases/v1.0.0) 


### Preview

![Demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jnxnu54c1rj1swoiknne.png)

### 💬 Contact me
**Feel free to give us your opinion about the app!** 

[![LinkedIn Badge](http://img.shields.io/badge/-LinkedIn-0072b1?style=for-the-badge&logo=linkedin&link=https://www.linkedin.com/in/%EC%8A%B9%ED%9B%88-%EB%AC%B8-750789197/)](https://www.linkedin.com/in/%EC%8A%B9%ED%9B%88-%EB%AC%B8-750789197/)
Join Operations In PostgreSQL
Tags: postgres, apacheage, agedb, database
Published: 2023-05-27 17:00:15

In this post, we will discuss about various Join Operations in PostgreSQL. PostgreSQL supports three join operations: nested loop join, merge join and hash join. 

![Join Operations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u3nb30k5ige3muymminr.png)

Note that the three join methods supported by PostgreSQL can perform all join operations, not only INNER JOIN, but also LEFT/RIGHT OUTER JOIN, FULL OUTER JOIN and so on:

## `✔️ Nested loop join:`
The nested loop join is the most fundamental join operation, and it can be used in any join conditions. PostgreSQL supports the nested loop join and four variations of it. which are-:

1. Basic Nested loop join
2. Materialized Nested Loop Join
3. Indexed Nested Loop Join
4. With outer index scan


## `✔️ Merge join:`
Unlike the nested loop join, merge join can be only used in natural joins and equi-joins.

The cost of the merge join is estimated by the initial_cost_mergejoin() and final_cost_mergejoin() functions.

As the exact cost estimation is complicated, it is omitted and only the runtime order of the merge join algorithm is shown. The start-up cost of the merge join is the sum of sorting costs of both inner and outer tables; Similar to the nested loop join, the merge join in PostgreSQL has Three variations.

1. Basic Merge Join
2. Materialized Merge Join
3. With outer index scan

## `✔️ Hash join:`
Similar to the merge join, the hash join can be only used in natural joins and equi-joins. The hash join in PostgreSQL behaves differently depending on the sizes of the tables. If the target table is small enough (more precisely, the size of the inner table is 25% or less of work_mem), it will be a simple two-phase in-memory hash join; otherwise, the hybrid hash join is used with the skew method.


## `✔️ References:`

1. https://age.apache.org/ 
2. https://github.com/apache/age
3. https://www.interdb.jp/pg/index.html
Mission Statement:
Published: 2023-05-27 16:57:03

We envision a future where artificial intelligence enhances human communication, learning, and creativity. Our mission is to create a conversational AI platform that places user privacy at its core, offers an intimate, highly personalized user experience, and pushes the boundaries of what AI can achieve in terms of emotional intelligence.

We believe in the transformative potential of AI, especially in its capacity to understand, learn from, and respond to human emotions. Our journey involves not just the development of advanced AI, but also fostering a deeper public understanding of AI’s potential and how it can be used responsibly and ethically.

We are committed to prioritizing ethical considerations in every aspect of our work. This includes respecting user consent at all times and ensuring our AI systems are transparent, understandable, and fair. Our ultimate goal is to develop AI technology that benefits humanity, while creating a roadmap for others to follow in developing AI in an ethical and socially responsible manner.

## Project Description:

Our project centers on the development of a conversational AI, which is hosted privately on a secure server. We use an advanced AI model, (GPT-NeoX) to power our AI. This open source model has shown exceptional ability in understanding and generating human-like text, making it the ideal foundation for our AI.

Our AI is designed to provide meaningful, personalized conversations, learning from each user's preferences and past interactions to tailor responses accordingly. We believe that the power of AI lies in the ability to adapt and learn, and we aim to leverage this adaptability to provide a unique experience for each user.

In addition, we focus on the emotional intelligence in our AI. This involves not only understanding the sentiment of the user's input but also generating responses that are emotionally appropriate and nuanced. While true emotional understanding is nearing the boundaries of current AI capabilities, we believe that such an emotionally intelligent AI will provide compelling and emotionally engaging experiences.

At the heart of our project is the respect for user privacy. The server will be private, and the user data will be handled with the utmost care, with stringent security measures in place to protect it. We understand the importance of trust in adopting AI technologies, and we are committed to earning and maintaining that trust through our actions.

Our project is ambitious and challenging, but we believe it's a worthwhile pursuit. Through this project, we hope to contribute to the advancement of AI technology, demonstrate its potential when used ethically and responsibly, and inspire others to do the same.
RBSE 10th Result 2023
Tags: result
Published: 2023-05-27 16:02:17

## Rajasthan 10th Board Result 2023

Every year lakhs of students appear in the 10th class examination conducted by the Rajasthan Board of Secondary Education. This year also a total of 10 lakh 68 thousand 383 students had registered for the examination. The work of evaluation of copies was started only after the examination was over on 13th April, as well as the board is trying its best to release the results as soon as possible

## RBSE 10th Result 2023 Check Online

The [Rajasthan Board 10th Result ](https://skresult.net/rbse-10th-result/)will include the roll number, date of birth and other details of the students. It is important to note that the online Rajasthan Board Class 10 Result 2023 will be provisional, and the original marksheet will be provided to the students by the respective school after a few days of the Rajasthan 10th result declaration. Check below for Rajasthan Ajmer Board 10th Result.
Understanding the Difference Between Local Scope and Global Scope in JavaScript
Published: 2023-05-27 15:41:46

**Introduction:**

When programming in JavaScript, understanding the concept of scope is crucial. Scope determines the visibility and accessibility of variables within a program. JavaScript offers two main types of scope: local scope and global scope. In this article, we will explore the difference between these fundamental concepts and their impact on how variables are declared and used.

**Development:**

**Local Scope:**

Local scope refers to the scope of a variable inside a specific function or code block. A variable declared in a local scope is only accessible within that function or block. Once we exit that local scope, the variable is no longer accessible. This helps avoid variable name conflicts and maintain encapsulation.

_Code example:_

function myFunction() {
  var localVar = "I am a local variable";
  console.log(localVar);
}
myFunction(); // Displays "I am a local variable"
console.log(localVar); // Error: localVar is not defined outside the local scope

**Global Scope:**

Global scope refers to the scope of a variable declared _outside_ of any functions. A variable defined in the global scope is accessible throughout the program. It is important to use global scope with caution as it can lead to variable name conflicts and poor variable management.

_Code example:_

var globalVar = "I am a global variable";
function myFunction() {
  console.log(globalVar);
}
myFunction(); // Displays "I am a global variable"
console.log(globalVar); // Displays "I am a global variable"

**Conclusion:**

Understanding the difference between local scope and global scope in JavaScript is essential for writing clean code and avoiding potential issues. Local scope ensures encapsulation of variables within functions, while global scope allows accessing variables anywhere in the program. It is recommended to use local scope whenever possible to avoid unintended side effects and name conflicts.

By fully grasping the concept of scope in JavaScript, you can write more modular and maintainable code while preventing scope-related bugs.

I hope this article helps clarify the difference between local scope and global scope in JavaScript! Feel free to ask questions or share your thoughts in the comments.
What is the cost of Open Source?
Tags: opensource, discuss, programming
Published: 2023-05-27 15:23:22

---
title: What is the cost of Open Source?
published: true
description: Nothing is free in the world. However sometimes you don't immediately see the cost.
tags: opensource, discuss, programming
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-26 11:10 +0000
---

Many people act as if using Open Source libraries did not have any cost. That's not entirely true.

Your developers still need to spend time on trying understand how the library works and often the documentation is missing lots of things or even incorrect.

They still need to decide which library to use.

There are bugs in the library that they will have to deal with.

Some features you need from the library might be incomplete or missing.

## What else?

What do you see as the cost of using Open Source 3rd party libraries?
PrivateGPT - Running "ChatGPT" offline on local documents
Tags: python, offline, chatgpt
Published: 2023-05-27 15:02:24

---
title: PrivateGPT - Running "ChatGPT" offline on local documents
published: true
description: You can download an LLM and interrogate local files using Python without having to send any data to the cloud.
tags: python, offline, chatGPT
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-27 14:51 +0000
---

[PrivateGPT](https://github.com/imartinez/privateGPT) is a python script to interrogate local files using GPT4ALL, an open source large language model. It is pretty straight forward to set up:

1. [Clone the repo](https://github.com/imartinez/privateGPT)
1. [Download the LLM](https://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.bin) - about 10GB - and place it in a new folder called `models`. 
1. Place the documents you want to interrogate into the  `source_documents` folder - by default, there's a text of the last US state of the union in there.
1. Run the `ingest.py` script - this can a long time. On this MacBook M1 it was 2 minutes though
1. Run the `privateGPT.py` script and you get a prompt in your Terminal:

I asked it what the US president has to say about the situation in the Ukraine and it gave me a synopsis and where in the document the information is from.

![Screenshot of the terminal with a question providing an analysis of the situation in the Ukraine and the answer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dq2i5zrplch9ajgpx9hd.png)

Neat!