teleren/devto huggingface dataset:
I need an Ethereum alternative.
Tags: blockchain
Published: 2021-02-13 08:25:49

---
title: I need an Ethereum alternative.
published: true
description: 
tags: blockchain
//cover_image: https://direct_url_to_image.jpg
---

I and my friend @bilbeyt built an app on Ethereum network. It's living on https://etherboard.io It's simple board that you can buy and sell slots on that. It was fun to develop but we have a problem:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j0dt6yq7i53ase2oqdkd.png)

A slot is 17$ but to buy that slot we need to pay 98$ gas fee. I know that Ethereum 2.0  promises much better gas fees but It's not changing the fact that Ethereum and all other [ERC20](https://support.blockchain.com/hc/en-us/articles/360027491872-What-is-an-ERC20-token-#:~:text=ERC20%20is%20an%20official%20protocol,20%20is%20the%20proposal%20identifier.&text=This%20token%20standard%20defines%20a,interact%20seamlessly%20with%20one%20another.) tokens are not usable for today.


So, I'm searching for better solutions. Do you have any suggestions?

My needs are:

* It's price must not change very fast, stable as much as possible.
* Affordable development and transaction costs.
* Ability to create and delete wallets programmatically.
* Ability to listen to incoming transactions for these wallets.

If you help me with that subject I'll be very happy. Thanks!
TIL Godot has Live Edit
Tags: todayilearned, gamedev, godot, unity3d
Published: 2021-03-20 04:11:26

2021-03-19

Unity lets you inspect and edit GameObjects while the game is running and I recently discovered that Godot lets you do the same.
![Image of Remote Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c70tutmp6g180zogwlqp.png)
While the game is running, if you click on the Remote Tab, you can view and edit nodes running in the game. Changes made in the Remote tab do not persist but it's possible to copy them and paste them in later.
![Copy params on a remote node](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sv0wgdoxdv03z2wh15a2.png)
BUBBLE SORTING IN PYTHON
Tags: python, buublesort, sorting, ayushkumarsingh
Published: 2021-03-20 03:37:06

a=list(input("Enter the elements of list:"))

for i in range(len(a)):
<tab>for j in range(1,len(a)):
<tab><tab>if a[j-1]>a[j]:
<tab><tab><tab>a[j-1], a[j]=a[j],a[j-1]
print("your sorted list is:\n",a)
Classifiers' Evaluation Metrics
Tags: datascience
Published: 2021-03-20 03:36:36

**Confusion matrix**
Confusion matrix is a table that holds True and False Positive values ('TP' and 'FP'), as well as True and False Negative values ('TN' and 'FN').

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jru9bzpbuwsyu5lo7yt1.png)
[Image](https://medium.com/@m.virk1/classification-metrics-65b79bfdd776)


**What is important for the project**
For example, we have an image classifier, which identifies if a rock is a precious stone or not(e.g., diamond) and we use it for automated mining. 
In this context, we may want to get as many stones as possible ('TP'), even if we have some not precious stones identified as diamonds ('FP'). Because it could be sorted out by an expert at a later stage.
Now let's imagine, that we are buying these stones by using our image classifier algorithm. We do not want to buy not precious stones('FP'), so our model should be very careful regarding False Positive predictions.

**Common Evaluation Metrics**
To evaluate and quantify the performance of a classification model, we can use common evaluation metrics: accuracy, balanced accuracy, precision, recall (a.k.a. sensitivity and True Positive Rate),  Specificity (=1-False Positive Rate), ROC (=TPR vs FPR) and F1 score. 
As we can see there are many options to choose from regarding evaluation metrics. However, all of these metrics can be calculated using confusion matrix values(TP, FP, TN, and FN). So, the main idea is to know what metrics are most important for the project, and how well balanced is the target we are trying to predict (classify).
The most general approach would be to choose a few metrics to optimize (e.g., accuracy, recall, precision, F1 score, ROC-AUC).
So I tried Svelte and it was...interesting
Tags: svelte, javascript
Published: 2021-03-20 03:33:34

When I first started writing my blog, I wanted to try something new. I‘m a big believer in doing what you know works for production, but still taking advantage of opportunities to try new things.

# What is Svelte?

Svelte is a framework a la React and Vue. It uses a componentized approach just like those frameworks. However, it compiles down to plain JS with no runtime. That way it‘s smaller. It also looks a lot more like plain HTML and JS rather than weird custom syntax (I‘m looking at your Angular). It also has first class support for animations, which some other frameworks (cough React) don‘t have.

# However, there are some problems...

The build ecosystem and routing solutions are a bit of a mess and the maintainers keep changing their mind (despite being well intentioned).

For example, Svelte initially came with a CLI, then the maintainers switched to a format where they give you a template repo and you clone it via a custom tool called [degit](https://github.com/Rich-Harris/degit). They now want to move back to a CLI in a future release.

The recommended Svelte build tool is called [Sapper](https://sapper.svelte.dev/). It‘s been deprecated in favor of a to be released build tool called Svelte Kit that is months and months delayed as of March 2021. They‘re also moving it to [Snowpack](https://www.snowpack.dev/) for reasons? However even sticking with Sapper, I had a lot of obvious issues, like styling the `body` tag without triggering a Sapper warning. Build times for any non-trivial app can also get quite long using the webpack version of Sapper, which is something the maintainers acknowledge but can‘t fix until SvelteKit.

Additionally, one of the principles of the framework is to bind JS to the UI in a way that looks like normal JS. However, this can lead to some problems. You think you‘re looking at `var a = "b"` But it‘s actually doing a ton of magic to watch the value that expression to update the DOM. So when it goes wrong. It‘s a little hard to debug.

# Conclusion

First of all, this is just my opinion and this was my first attempt at using Svelte. However, chances are you‘re in the same boat, so I thought my insights could be valuable. I‘ve said a lot of negative things here, but I don‘t mean to rant. I really like Svelte‘s first class support for animations and the fact that it doesn‘t need to start up a runtime on the client to work. That means Svelte sites are generally fast after compilation. However, the ecosystem needs some more attention. It doesn‘t just need to be bigger but needs for the maintainers to stop using it for experimentation. If an idea is good at one point, it needs overwhelming reasons to change.
Async vs Defer attribute
Tags: webdev, javascript, html, codenewbie
Published: 2021-03-20 03:23:05


I'm back after a 20 days without any blogs. Will be posting about what I did in these 20 days. So here's my new post about async vs defer attribute in JavaScript. Let's go. 

When you load a webpage then there are **two major things** happening in your browsers: 

- HTML Parsing
- Loading of the scripts

**Loading of the scripts contain two parts:**

- Fetching the script from the network.
- Executing the script line by line.

---

The `<script>` element has two attributes, **async** and **defer**, that can give us more control over how and when external; files are fetched and executed. 

**async** and **defer** are boolean attributes that are used along with the `<script>` tag to load the external scripts efficiently into your webpage. 

---

### Normal `<script>` tag

```html
<html>
 <head>...</head>
 <body>
   ...
   <script src="main.js">
   ...
 </body>
</html>    
```

Suppose your browser is parsing the HTML and then it encounters the `<script>` tag. 

---

### Normal `<script>` tag

In the case of the normal `<script>` tag following steps takes place: 

- JS blocks the parsing of HTML
- Fetches the script from the network
- Executes the script
- HTML parsing is started only after the script is fully executed


---

### The `async` attribute

The **async** attribute is used to indicate to the browser that the script file can be executed asynchronously. 

`<script async src="main.js">`

- While using the **async** attribute, meanwhile, the HTML parsing is going on, any of the script with the **async** attribute is fetched from the network *asynchronously* along with the HTML parsing. 

### The async attribute

As soon as scripts are fetched and available in the network, HTML parsing stops and scripts start executing. 

Once the scripts are executed, the HTML parsing continues like regular. 

---

### The `defer` attribute

`<script defer src="script.js">`

The **defer** attribute tells the browser to only execute the script file once the HTML document has been fully parsed. 

### The `defer` attribute

In this case: 

- HTML parsing goes on and scripts are fetched in parallel
- Scripts are only executed once the HTML parsing is complete. 

---


This blog was originally posted at => [https://rahulism.tech/article/async-vs-defer-in-JS/]


---

😎Thanks For Reading | Happy Coding😃

<a href="https://buymeacoffee.com/rahxuls" target="_blank">
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1616209806065/A24KTdOi6.png?auto=compress">
</a>
Alice and Bob Learn: Chapter Discussions
Tags: application, security, appsec, devsecops
Published: 2021-03-20 03:18:29

---
title: Alice and Bob Learn: Chapter Discussions
published: true
description: At the end of each chapter of Alice and Bob Learn Application Security there are questions for the reader to ponder. As the author, I will be hold streaming sessions every 4 weeks to discuss the questions, starting March 20, 2021.
tags: application, security, appsec, devsecops
//cover_image: https://direct_url_to_image.jpg
---

At the end of each chapter of [Alice and Bob Learn Application Security](https://www.amazon.com/dp/1119687357/) there are questions for the reader to ponder. As the author, I will be hold streaming sessions every 4 weeks to discuss the questions, starting March 20, 2021. If you would like invites to the streams, [please sign up here](http://aliceandboblearn.com/).

![Alice and Bob Learn Application Security](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/106kki1blx4tw5mqak4c.png)

All of the streams are free, and I would love to have you join us live! If you can’t make it live, you can watch them after on [my YouTube Channel](http://youtube.com/c/shehackspurple), or download them via at podcast app by looking for the podcast “Alice and Bob Learn” (which will be launched right after the first stream).

Ideally you will read the chapter before the corresponding live discussion, but if you don’t, that’s okay. You will still learn, and you are definitely will welcome to attend. :-D

##Schedule:

**All streams are in 2021, on Saturdays, starting at noon pacific time. They can last up to three hours.**

[March 20: Chapter 1; Security Fundamentals](https://youtu.be/CpfWbqLEoHo)

[April 17: Chapter 2; Security Requirements](https://youtu.be/lWk4UTqGATU)

[May 15: Chapter 3; Secure Design](https://youtu.be/0ImPJHEc9XU)

[June 12: Chapter 4; Secure Code](https://youtu.be/bfzpt24sBlY)

[July 10: Chapter 5; Common Pitfalls](https://youtu.be/u8QxUQ8MjIM)

[August 7: Chapter 6: Testing and Deployment](https://youtu.be/Jd_ysSapGLc)

[September 4: Chapter 7; An AppSec Program](https://youtu.be/vjTklSPi79E)

[October 2: Chapter 8; Securing Modern Applications and Systems](https://youtu.be/kOHUlm2yYRQ)

[October 30: Chapter 9; Good Habits](https://youtu.be/GYZZwCR1E84)

[November 27: Chapter 10; Continuous Learning](https://youtu.be/vWBiKeKgyGA)

[December 11: Chapter 11; Closing Thoughts](https://youtu.be/KsYNnJVnAXE)
Caching a function instead of something "expensive" using useCallback() in React
Tags: react, webdev, tutorial, reacthooks
Published: 2021-03-20 03:01:23

We have seen that we can cache something that is "expensive", using `useMemo()`, in https://dev.to/kennethlum/seeing-usememo-speed-up-our-webpage-3h91

Now a function can be quite simple, but why would we want to cache it to?  It can be when we pass into a child component or use it else where, and we want to keep it the same value, so that there is no unnecessary re-rendering.

We can see, in 

```js
export default function App() {
  const myFooter = useMemo(() => <Footer n={30000} />, []);
  const [count, setCount] = useState(0);

  function handleClick() {
    setCount(count + 1);
  }
```

The function `handleClick` is a new function every time `App()` is called.

We can use `useMemo()` to cache it too, just like how we cache `<Footer />` 

The code:

Wrong behavior demo: https://codesandbox.io/s/relaxed-newton-5sqmy?file=/src/App.js

```js
  const handleClick = useMemo(
    () => () => {
      setCount(count + 1);
    },
    []
  );
```
It can only increment the count to 1, but not more. Why is that?  The reason is that we cached the function, which is a closure with the scope chain with `count` equal to `0`. Every time, the function sees `count` as `0`, and therefore the `setCount(count + 1)` is always `setCount(0 + 1)`.

To fix that behavior, we can use:

```js
  const handleClick = useMemo(
    () => () => {
      setCount(c => c + 1);
    },
    []
  );
```

Demo: https://codesandbox.io/s/nameless-fast-d0fv1?file=/src/App.js

Note that we don't need to use `useMemo()`, but can use `useCallback()`. It is essentially the same thing:

```js
  const handleClick = useCallback(() => {
    setCount((c) => c + 1);
  }, []);
```
Demo: https://codesandbox.io/s/busy-archimedes-vse8f?file=/src/App.js

Note that we don't need to give a function that return a value, but can provide that function we want to cache directly.

Likewise, if we have

```js
  const handleClick = useCallback(() => {
    setCount(count + 1);
  }, []);
```
It is not going to work: https://codesandbox.io/s/distracted-cloud-o93gw?file=/src/App.js

To see that `handleClick` is the same value (a reference to the same function), we can use a `useRef()` to double check it.  We can skip this part if `useRef()` is not familiar to you yet:

```js
  const checkingIt = useRef(null);

  const handleClick = useCallback(() => {
    setCount((c) => c + 1);
  }, []);

  console.log(checkingIt.current === handleClick);
  checkingIt.current = handleClick;
```

Demo: https://codesandbox.io/s/unruffled-sunset-81vwx?file=/src/App.js

We can see that the first time, the `console.log()` would print out `false`, but once we set it, the next time `App()` is called, it has the same value as the previous time, and would print out `true`.

If we change it to a new function every time, then it would print out `false` every time.

Demo: https://codesandbox.io/s/affectionate-dewdney-556mn?file=/src/App.js
Day 45: Phonebook
Tags: 100daysofcode, csharp
Published: 2021-03-20 02:56:29

Phone book dictionary with 5 names and phone numbers. Asks the user to enter a name and it will try to find that name in the phone book. If found it will print the name, if not an error message will be displayed.

```csharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace phonebook
{
    class Program
    {
        static void Main(string[] args)
        {
            var DictionaryNames = new Names();
           
            bool stop = false;
            string input;
            char answer;

            do
            {
                bool found = false;
                Console.WriteLine("Please enter the person you want to search for?");
                input = Console.ReadLine();

                foreach (string name in DictionaryNames.PhoneBook.Keys)
                {
                    if (input == name || input == name.ToUpper() || input == name.ToLower())
                    {
                        found = true;
                        Console.WriteLine($"The phone number of {input} is {DictionaryNames.PhoneBook[name]} ");
                    }
                }
               
                if (!found)
                {
                    Console.WriteLine($"the person {input} is not present in your Phonebook. Do you want to add that person to your PhoneBook? press Y/N");
                    answer = Console.ReadKey().KeyChar;

                    if (answer =='n' || answer == 'N')
                    {
                        break;
                    }
                    else
                    {
                        Console.WriteLine("Please enter your person number?");
                        var number = int.Parse(Console.ReadLine());

                        DictionaryNames.PhoneBook.Add(input, number);
                    }


                }
                Console.WriteLine("Do you want to search again? Press Y/n");

                var answer2 = char.Parse(Console.ReadLine());
                if (answer2 == 'n' || answer2 == 'N')
                {
                    stop = true;
                    break;
                }               

            } while (stop == false);

           
        }
    }
           
}
```
Blockchain Private chains
Tags: hyperledger, privatechain, cryptocurrency, blockchain
Published: 2021-03-22 09:09:51

---
title: Blockchain Private chains
published: true
date: 2021-03-20 02:33:52 UTC
tags: hyperledger,privatechain,cryptocurrency,blockchain
canonical_url: https://medium.com/coinmonks/blockchain-private-chains-e9beb5b2e3aa
---

[![](https://cdn-images-1.medium.com/max/1200/0*d23AebK-eAh_ucAm.jpg)](https://medium.com/coinmonks/blockchain-private-chains-e9beb5b2e3aa?source=rss----721b17443fd5---4)

With Ethereum come a certain number of properties. For instance, anyone with a computer and the freely available software can participate…

[Continue reading on Coinmonks »](https://medium.com/coinmonks/blockchain-private-chains-e9beb5b2e3aa?source=rss----721b17443fd5---4)
Why do you use Perl? - Perl Fine Channel
Tags: perl, webdev, beginners
Published: 2021-03-20 02:08:44

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7cc4p5svmwnbqru5kx04.png)

I talk "Why do you use Perl?"

Finish daily work

Text Processing

Regular Expression

UTF-8

Web Nonblocking I/O performance
API를 이용하여 네이버나 다음같은 환율 적용하기
Tags: api, naver, daum, php
Published: 2021-03-20 01:44:50

전세계 환율 변동을 API를 이용하여 사이트에 반영할 수 있습니다.

[환율API](https://www.exchangerate-api.com/)

다양한 프로그래밍 언어로 적용할 수 있도록 API를 제공하고 친절한 예제도 제공합니다.

월 1.5K 요청까지는 [무료](https://www.exchangerate-api.com/#pricing)입니다.

PHP를 이용한 네이버나 다음같은 환율정보를 구현한 예는

[여기](https://skin.fiance.co.kr/api/exchangeRate.php)에서 볼 수 있습니다.

나라와 금액을 변동해 가면서 환율을 확인할 수 있습니다.

다만, 네이버나 다음은 실시간 환율변동을 반영하지만
이 API를 이용할 경우 0시전후를 기준으로 24시간 간격으로 제공합니다.
How to create beautiful confetti animations with tsParticles
Tags: javascript, showdev, tutorial, html
Published: 2021-03-20 01:25:00

## Deprecation notice

This article is outdated. Read the newer details about the new confetti options here

{% link https://dev.to/tsparticles/how-to-create-beautiful-and-realistic-confetti-animation-with-tsparticles-1lkm %}

---

{% github matteobruni/tsparticles %}
Scrum vs DevOps
Tags: scrum, devops, agile
Published: 2021-03-21 14:47:05

---
title: Scrum vs DevOps
published: true
date: 2021-03-20 00:00:00 UTC
tags: scrum, devops, agile
canonical_url: https://jhall.io/archive/2021/03/20/scrum-vs-devops/
---

I frequently encounter people wondering how Scrum and DevOps relate to each other. Or as it was recently put to me:

> Is DevOps better than Scrum?

I like to answer this question with the aid of this popular DevOps worfklow diagram:

[![](https://jhall.io/images/devops400.png)](https://commons.wikimedia.org/wiki/File:Devops-toolchain.svg)

This shows seven distinct activities in the DevOps lifecycle, and how they relate to two broad roals: Development, and Operations.

1. Plan
2. Create
3. Verify
4. Package
5. Release
6. Configuration
7. Monitor

Scrum, in contrast, defines the relationship between the business (personified by the Product Owner), and the development team, and provides 5 key activites:

1. Product backlog refinement
2. Sprint planning
3. Daily Scrum
4. Sprint review
5. Sprint retrospective

When we consider these activity lists side by side, the only direct overlap is in the planning activity ( **Plan** from DevOps, and **Backlog refinement** and **sprint planning** from Scrum).

There is also some small overlap between Scrum’s **Sprint review** and the DevOps **Verify** activity, but **Verify** includes much more, such as unit and integration tests, and possibly even code review, and security audits.

I hope it’s clear here that Scrum and DevOps are quite distinct, so asking which is better isn’t really the right question. In fact they can work very well together. And while DevOps can be successful without Scrum, I would go so far as to say that [Scrum actually _needs_ DevOps](http://scrumisntenough.com/) to be completely successful for software projects.
How to get the current home directory of the user in Node.js?
Tags: node
Published: 2021-03-20 00:00:00

---
  title: How to get the current home directory of the user in Node.js?
  published: true
  tags: Nodejs
  date: Sat Mar 20 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/get-home-directory-of-user-nodejs
  cover_image: https://melvingeorge.me/_next/static/images/main-a8fa8bc5bcdfd0db052b86d88b7106cb.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/get-home-directory-of-user-nodejs)
  
To get the current user home directory, you can use the `homedir()` method from the `os` module in Node.js.

```js
/* Get home directory of the user in Node.js */

// import os module
const os = require("os");

// check the available memory
const userHomeDir = os.homedir();
```

- The method returns the path to the directory as a `string`.

See the above code live in [repl.it](https://replit.com/@melvin2016/get-current-user-home-directory-nodejs#index.js).

### Feel free to share if you found this useful 😃.

---
A Prometheus exporter of Tuxedo metrics
Tags: oracle, tuxedo, prometheus
Published: 2021-11-03 06:25:28

---
title: A Prometheus exporter of Tuxedo metrics
published: true
date: 2021-03-20 00:00:00 UTC
tags: oracle,tuxedo,prometheus
canonical_url: http://aivarsk.com/2021/03/20/prometheus-tuxedo-exporter/
---

Now that [my book about Oracle Tuxedo](https://amzn.to/3ljktiH) is completed, I can work on some code that did not make it into the book. Here is the first by-product: [a Prometheus exporter of Tuxedo metrics](https://pypi.org/project/prometheus-tuxedo-exporter/). Chapter 6 (among other topics) showed how to retrieve statistics from the Tuxedo core system, but there was no space to include export to Application Performance Management tool.