teleren/devto huggingface dataset:
TUTORIAL HELL!!!
Tags: webdev, frontend, beginners
Published: 2023-06-12 20:20:53


How do you handle it? here are 3 simple steps to help you deal with that.

1: write your pseudo code: have a plan on how you plan to execute your project and break it down into steps. this gives you a picture of how your process should look like. it also gives you direction and cuts down on the need to watch every tutorial out there.

2: Try to understand how the code works: as you watch one tutorial, try to understand why the tutor is doing what he/she is doing. ask yourself if there are other ways that same thing can be done. what this does is that it helps you think for yourself and when you are able to critically think about your codes and the expected results, it makes you more independent.

3: Believe in yourself: yes! this may sound cliché, but it is the simple truth. if you keep thinking low of yourself, you may never believe any code you write. believe that you are a good programmer and see yourself become one. it is that simple. 
I hope this helps someone 👍
"Bookmark Decay": A Project for Learning
Tags: project, extension, devjournal
Published: 2023-07-24 19:06:18

---
title: "Bookmark Decay": A Project for Learning
series: Bookmark Decay
published: true
date: 2023-06-12 20:16:22 UTC
tags: ["project", "extension", "devjournal"]
canonical_url: https://www.thehappycactus.dev/posts/2023-06-12-bookmark-decay/
---

I’ve been working on a small personal project for awhile now, and I thought I’d start sharing my progress, just to talk about how I work through things. A bit of rubber duck programming for me, a little bit of content for you (uh, and for me).

# “Bookmark Decay”

The working title of a little project I’ve thought about on and off for a couple years. The basic idea is a list of bookmarks that “decay” (IE, disappear) after a certain amount of time. It’s supposed to (a) encourage you to actually read the numerous bookmarks (or in my case, tabs) you create before they disappear, and (b) just be fun.

# Feature List

- Ability to add URLs to a list, ordered by last addition date
- “Bookmarked” URLs should be removed from the list after a set time
- Settable “decay” time (default 7 days, no more than 30)
- There should be a visible decay for each listed “bookmark”
- A “Recently Deceased” section for the last X many days of removed bookmarks; displayed in a different area from the main list
- Absolutely _no_ permanent history - the point here is that when it’s gone, it’s gone (Recently Deceased section aside)

# Technical Decisions

I hemmed and hawed some on this, but ultimately settled on a few initial decisions:

## Local Storage Only

To keep this easy (ha-ha), I decided to make this frontend-only. I don’t want to have to keep up a DB of users and their various bookmark-related data, so we’ll keep all of this in some sort of local storage. More on this development in future posts. 😅

Downsides? Regretting this decision if I eventually decide that it makes more sense/would be more popular if it _did_ have a login for use across browsers and devices. Since this is supposed to be a “fun’n’easy” project, I’ll sacrifice future-proofing for convenience.

## Chrome Extension

I wanted the adding of bookmarks to be as easy as possible, so requiring people to go to the Bookmark Decay website every time they wanted to add a bookmark didn’t seem like a great option. After a brief perusal of the [Chrome Extension docs](https://developer.chrome.com/docs/extensions/), I thought having an extension to handle the adding of a bookmark would be a simple solution.

## Client-Side Rendering

Learning NextJS has taught me some about SSR and streaming, but did it really make sense to use server-based components if I’d decided to use exclusively local storage? Not really. In lieu of not using my latest learnings from NextJS, I thought I’d try out [Vite](https://vitejs.dev/) with plain ‘ole React.

# Next Steps

I decided to start by diving into the Chrome Extension. The docs made it seem relatively straight-forward, so why not?
Using Binance APIs
Tags: cryptocurrency, websocket
Published: 2023-06-12 20:10:55

## Background
As someone who worked with data for entire of my career, I always love to learn how to build a useful live data dashboard. One of the problems for build a live data dashboard comes with live data. Most live data are behind a hefty price wall and not really accessible to most people. However, Binance has a wonderful [public Websocket API](https://binance-docs.github.io/apidocs/spot/en/#websocket-market-streams) and it is really useful for anyone to learn!

In this blog, I am going to share my experience in learning websocket. This is the link to the [final product](https://crypto-investment-journal.vercel.app/). 

## Websocket API
The websocket API we are going to use is the [miniticker](https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream), which we can receive the latest closing price. According to the document, this is the payload
```
  {
    "e": "24hrMiniTicker",  // Event type
    "E": 123456789,         // Event time
    "s": "BNBBTC",          // Symbol
    "c": "0.0025",          // Close price
    "o": "0.0010",          // Open price
    "h": "0.0025",          // High price
    "l": "0.0010",          // Low price
    "v": "10000",           // Total traded base asset volume
    "q": "18"               // Total traded quote asset volume
  }
```

In order to receive the miniTicker socket stream, we would need to [subscribe ](https://binance-docs.github.io/apidocs/spot/en/#live-subscribing-unsubscribing-to-streams) to it. What it means is that, we need to send below json to websocket url, say if we want to subscribe to BTCUSDT and ETHUSDT
```
{
    "method": "SUBSCRIBE",
    "params":
    [
        "btcusdt@miniTicker",
        "ethusdt@miniTicker"
    ],
    "id": 1
}
```

Finally, the market data websocket url is `wss://data-stream.binance.vision`. Now, we are good to go 😎


## Trying the websocket API
Most morden web browser support websocket, so we just need to open the developer console to try 
```
const ws = new WebSocket('wss://data-stream.binance.vision/ws');
ws.onmessage = function (e) { console.log(e.data) };
ws.send('{"method":"SUBSCRIBE","params":["btcusdt@miniTicker"],"id":0}');
```
we should see log messages like below
```
{"e":"24hrMiniTicker","E":1686600526157,"s":"BTCUSDT","c":"25813.21000000","o":"26116.47000000","h":"26206.88000000","l":"25602.11000000","v":"32722.94617000","q":"846855564.49409930"}
...
{"e":"24hrMiniTicker","E":1686600527217,"s":"BTCUSDT","c":"25813.20000000","o":"26114.91000000","h":"26206.88000000","l":"25602.11000000","v":"32711.86119000","q":"846566058.39423260"}
```

---
WIP
https://codesandbox.io/s/binance-websocket-l2dglq?file=/src/ContextProvider.tsx
Free Html5 Online Games
Published: 2023-06-12 20:07:34

Play games on your computer or mobile device with [Gamerazi](https://www.gamerazi.com). On our site; You can play the most preferred games without being a member. In addition, you can play games on our site or on the computer; You can play games comfortably regardless of whether you play games on the phone. Because our site; It is HTML5 based and there are no flash games on our site. It is precisely for this reason that playing games on is extremely fun and easy. Currently, gamerazi.com has games in many different categories, especially in the "2 Player, 3D Games, Action, Car, Arcade, Io Games, Fighting, Mobile, Racing, Zombie, Shooting, Skill, and Adventure" categories. Click and play a game right now. Because; There is no procedure to waste time on after you say "play game". No membership problem, no money payment. Just "play game" and come to The best part of playing games on is a game site that appeals to users of all ages. While you are browsing our website, play games whether you are a child; Whether you are an adult or not, you will enjoy it very much. We should not forget our "Other" category in the game category of our site. A voice inside you; "Play game!" If he says and your soul wants to play something different; Our "Other" category is just for you. In our "Other" category; There are different sub-categories like Skill, Fighting, Dress Up and many more. This situation makes a great contribution to game diversity. You will definitely not understand how time passes on. Because there are hundreds of different games on our website and these games are just waiting for your "play game" command for you to meet them! Whether you want to play a game to relieve the tiredness of a tough day; play a game to spend time. Play games for whatever you want and play all of these games on. Our site consists of game variety and HTML5 based games; The main reason why our site is so popular. Because our slogans are clear: Play games without membership! Play games for free! Play HTML5 quality games! Here are all these advantages that make our site stand out, and seeing the interest shown in our site make us extremely happy. This is exactly why we are working harder to improve our site. Come on, don't waste your time. Play a game now and enjoy this unlimited fun. Don't get bored, play games!
[Bleach vs Naruto 4.0](https://www.gamerazi.com/fighting/bleach-vs-naruto-40.html)
[Bleach vs Naruto 3.6](https://www.gamerazi.com/fighting/bleach-vs-naruto-36.html)
[Bleach vs Naruto 3.9](https://www.gamerazi.com/fighting/bleach-vs-naruto-39.html)
Blockchain Trilemma
Tags: blockchain, cryptocurrency
Published: 2023-06-12 20:03:03

Blockchain technology, which underpins cryptocurrencies, is a distributed ledger that allows transactions to be recorded in a secure and transparent way. However, there is a fundamental problem that developers and users of blockchain technology face, known as the Blockchain Trilemma. The blockchain trilemma refers to the challenge of achieving scalability, security, and decentralization, all at the same time.

**Scalability**
Scalability refers to the ability of a blockchain network to handle a large number of transactions. Currently, most blockchain networks have limited scalability, which means they can only process a few transactions per second. This is a major problem for blockchain adoption, as it limits the number of users who can use the network at the same time.

**Security**
Security refers to the ability of a blockchain network to resist attacks and prevent malicious actors from hacking or manipulating the network. Blockchain networks are secured through a process called consensus, where nodes in the network agree on the validity of transactions. However, achieving security can be difficult, especially in the face of determined attackers.

**Decentralization**
Decentralization refers to the distribution of nodes that maintain the blockchain network. A decentralized network is more secure and resistant to attacks because there is no single point of failure. However, achieving decentralization can be difficult, especially as the network grows and more nodes are needed to maintain it.


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


Achieving all three goals of scalability, security, and decentralization at the same time is a challenge that has yet to be fully solved. Most blockchain networks have had to make trade-offs between these goals. For example, some networks sacrifice decentralization to achieve greater scalability, while others sacrifice scalability for greater security. You can at anytime successfully only cater to one side of the above triangle.
Understanding Elasticsearch Analyzers
Tags: elasticsearch
Published: 2023-06-12 20:01:29

If you want to truly understand the analysis process in Elasticsearch, you need to get familiar with analyzers. It's what sets Elasticsearch apart from NoSQL databases like MongoDB.

An analyzer in Elasticsearch is a pipeline. You feed it text, and it gives you back a bunch of **tokens**.

The analyzer pipeline consists of three steps:

```bash
Analyzer
├── 1. Char filters
├── 2. Tokenizer
└── 3. Token filters
```

Think of them as different stages through which your text flows.

## Char filters
First up, we have character filters. These filters preprocess the text before it gets split into tokens by the tokenizer. 

For example, it can transform emojis like `:)` into the word `_happy`.” 

## Tokenizer
Next, we have the Tokenizer. The Tokenizer **splits the text into smaller units called tokens**. 

For instance, if we use the `whitespace` tokenizer on the phrase "Hello World," it would intelligently split it into two tokens: `Hello` and `World`.

## Token filters
Now that our text is split into tokens, the token filters come to play. They are responsible for applying changes to the generated tokens. 

One popular use case is stemming, where the token `went` is stemmed to `go`. 

## Analysis
Bringing it all together, this entire process is referred to as **analysis**. 

Note that analyzers can be customized by configuring different combinations of character filters, tokenizers, and token filters based on your requirements.

Understanding analyzers is like holding the key to the relevancy capabilities in Elasticsearch. It allows you to fine-tune your search queries and ultimately enhance the overall user experience.
Introduction to Apache Age: A Next-Generation Data Management and Analytics Platform
Tags: apacheage, graphdatabase, datamanagement
Published: 2023-06-12 20:00:39

Sure, here is an article about "Introduction to Apache Age: A Next-Generation Data Management and Analytics Platform":

## Introduction to Apache Age

Apache AGE is a next-generation data management and analytics platform that combines the power of graph databases with the flexibility of relational databases. AGE is built on top of PostgreSQL, one of the most popular relational databases in the world, and provides a seamless way to store, manage, and analyze graph data.

## Features of Apache AGE

Apache AGE offers a number of features that make it a powerful data management and analytics platform. These features include:

* **Graph data model:** AGE stores data in a graph data model, which is a natural way to represent relationships between data points. This makes it ideal for applications that require complex queries and analysis, such as fraud detection, social network analysis, and recommendation engines.
* **Relational data model:** AGE also supports the relational data model, which makes it easy to integrate with existing relational databases. This allows you to use AGE to manage both graph and relational data in a single platform.
* **OpenCypher support:** AGE supports OpenCypher, a popular graph query language. This makes it easy to write complex queries against graph data.
* **High performance:** AGE is designed for high performance and scalability. It can handle large amounts of data and complex queries without sacrificing performance.

## Use cases for Apache AGE

Apache AGE can be used for a variety of use cases, including:

* Fraud detection: AGE can be used to detect fraud by analyzing relationships between transactions and users.
* Social network analysis: AGE can be used to analyze social networks by understanding relationships between users.
* Recommendation engines: AGE can be used to build recommendation engines by understanding relationships between products and users.
* Knowledge graphs: AGE can be used to build knowledge graphs by storing and managing information about entities and their relationships.

## Conclusion

Apache AGE is a powerful next-generation data management and analytics platform. It is built on top of PostgreSQL and offers a number of features that make it ideal for complex queries and analysis. AGE can be used for a variety of use cases, including fraud detection, social network analysis, recommendation engines, and knowledge graphs.

If you are looking for a powerful data management and analytics platform, Apache AGE is a great option. It is easy to use, scalable, and highly performant.
Simplify Machine Learning with MindsDB: An Introduction
Published: 2023-06-12 19:53:21



Hey Devs! 🚀 Are you ready to supercharge your machine learning projects? Allow me to introduce you to MindsDB, a powerful open-source tool that simplifies the process of building and deploying machine learning models. Whether you're a seasoned data scientist or a developer eager to delve into ML, MindsDB has got you covered! Let's dive in and explore how MindsDB can revolutionize your ML workflows. 💡

MindsDB enables you to harness the power of machine learning without the need for complex coding or extensive data science knowledge. With its intuitive interface and robust set of features, you can quickly train, evaluate, and deploy ML models in just a few lines of code. Say goodbye to time-consuming feature engineering and manual model tuning – MindsDB automates these tasks, allowing you to focus on extracting insights from your data.

One of the standout features of MindsDB is its automated machine learning (AutoML) capability. It analyzes your dataset, identifies the target variable, and automatically selects the best algorithm for the task at hand. This empowers developers to effortlessly build accurate ML models, even if they lack specialized ML expertise. MindsDB takes care of the heavy lifting, so you can iterate faster and spend more time on what truly matters – solving real-world problems with machine learning.

But that's not all! MindsDB offers a variety of tools and functionalities to enhance your ML experience. Its powerful explainability feature provides transparency into the decision-making process of your models, enabling you to understand and interpret their predictions. This is particularly valuable in regulated industries or applications where model interpretability is critical.

MindsDB also boasts a seamless integration with popular data analysis libraries, including Pandas and SQL, making it easy to incorporate into your existing workflows. Whether you prefer working with structured data, time series, or even unstructured text, MindsDB has you covered.

Moreover, MindsDB has a vibrant and supportive community. They actively contribute to the project, share their experiences, and provide assistance when needed. The documentation is comprehensive and beginner-friendly, ensuring that developers of all skill levels can make the most of MindsDB's capabilities.

If you're excited to get started with MindsDB, head over to their official website and grab the installation instructions. The team has also prepared a range of tutorials and examples to help you hit the ground running. Join the growing community of developers who are transforming their ML workflows with MindsDB!

So, what are you waiting for? Empower your projects with the power of MindsDB and unlock the true potential of machine learning. Happy coding! 👩‍💻👨‍💻

#MindsDB #MachineLearning #DataScience #Automation #OpenSource
A problem that everyone faced.....
Tags: writing
Published: 2023-06-12 19:42:44

It's easy to start but it's hard to continue. Almost every developer faces the problem of being consistent in their coding journey. Same is happening with me one day I become so serious that complete a vast topic in one go and another day I do nothing. This demotivates me many a times especially when-you have very less time and your collegue or friends or people around are way more skilled and grabing opportunities that you are looking for in specific area. You feel pressurized but then a thought came to your mind and says  not to worry and try your best.  

Everyday I wake up with a hope in my heart and surely will overcome my weakness because everyday is a new opportunity. I hope  same for everyone out there who are struggling in there life. And want to say "yes! we can do it. May be we are slow but we will win not immediately but definitely."
HR and Workplace Discrimination in Software Engineering
Tags: hr, discrimination, diversity, inclusion
Published: 2023-06-12 19:29:52

Hello!

I am Riley, an undergraduate student majoring in Computer Science at Seattle University. I’m hoping to get in touch with you because I am expanding on a short paper that was accepted by IEEE ICSE 2023 about workplace discrimination in software engineering. The paper, “Workplace Discrimination in Software Engineering: Where We Stand Today,” by Xin Zhao and Riley Young, found a possible link between software developers’ experiences with workplace discrimination and their communication, or lack thereof, with Human Resources. To expand, we are hoping to interview several employees who work in HR at large software engineering companies. By carrying out these interviews, we aim to reach a better understanding of how external actors within a technology-focused company perceive workplace discrimination. From these findings, we will find more concrete solutions to this pervasive issue. If HR can further reduce and eliminate workplace discrimination, we will do research to show what kinds of changes can be made and how that will constitute improvement. If we find that HR has significant barriers to improvement, we will research how we can eliminate these barriers, whether these solutions are higher up in the company or in more systemic problems across companies. This research is incredibly important to my peers and me in improving the climate we will soon be working in. Without drastic change in STEM companies, the biases that persist in our society will continue to seep into the code and technology that is moving our world forward. We must stop leaving people behind. 

Please let me know if you can put me in contact with anyone in HR at your company who would be willing to interview. We would greatly appreciate it!

Best,
Riley Young
Logarithmic Functions in Apache AGE
Tags: apache, postgressql, graphdatabas, database
Published: 2023-06-12 19:28:42

ApacheAGE being a multipurpose extension provides a range of functions including the logarithmic functions that are quite useful, we have discussed them in detail below:

##e
e() returns the base of the natural logarithm, e.

Syntax:e()

Returns:
`An agtype float.
`

Query:
```
SELECT *
FROM cypher('graph_name', $$
    RETURN e()
$$) as (e agtype);
```

Results

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

## sqrt
sqrt() returns the square root of a number.

Syntax:sqrt(expression)

Returns:
`An agtype float.
`

Query
`SELECT *
FROM cypher('graph_name', $$
    RETURN sqrt(144)
$$) as (results agtype);`

Results

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

## exp
exp() returns e^n, where e is the base of the natural logarithm, and n is the value of the argument expression.

Syntax: e(expression)

Returns:
`An agtype Float.
`
Arguments:

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

Considerations:
- exp(null) returns null.

Query:

```
SELECT *
FROM cypher('graph_name', $$
    RETURN exp(2)
$$) as (e agtype);
```
e to the power of 2 is returned.

Result:

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

## log
log() returns the natural logarithm of a number.

Syntax:log(expression)

Returns:
`An agtype Float.
`
Arguments:

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

Considerations:
- log(null) returns null.
- log(0) returns null.

Query:
```
SELECT *
FROM cypher('graph_name', $$
    RETURN log(27)
$$) as (natural_logarithm agtype);
```

The natural logarithm of 27 is returned.

Result:

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

##log10
log10() returns the common logarithm (base 10) of a number.

Syntax:log10(expression)

Returns:
`An agtype Float.
`
Arguments:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iojoquvjcxynsj66wqtp.png)

Considerations:
- log10(null) returns null.
- log10(0) returns null.

Query:
`SELECT *
FROM cypher('graph_name', $$
    RETURN log10(27)
$$) as (common_logarithm agtype);`

The common logarithm of 27 is returned.

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