teleren/devto huggingface dataset:
Running a classification tree
Published: 2022-10-13 13:55:18

## Output
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ilresv6uizcxjx2lrpm1.png)
## Explanation
Decision tree analysis was performed to test nonlinear relationships among a series of explanatory variables and a binary, categorical response variable. All possible separations (categorical) or cut points (quantitative) are tested.

This decision tree uses these variables to predict output variable (TREG1) – whether person is a smoker, or not:

BIO_SEX – categorical – gender
GPA1 – numeric – current GPA
ALCEVR1 – binary – alcohol use
WHITE – binary – whether participant is white
BLACK – binary – whether participant is black
To train a decision tree I’ve split given dataset into train and test datasets in proportion 70/30.

After fitting the tree I’ve tested it on test dataset and got accuracy = 0,826. This is a good result for a model, which is based only on three explaining variables.

From decision tree we can observe:

Participants who used alcohol were more likely to be smokers.(up to 5 times more smokers who used alcohol)
Most smokers are white
People with lower GPA are more usual to be regular smokers
Code for the above output is :-

```
import pandas as pd
import sklearn.metrics
from numpy.lib.format import magic
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn import tree
from io import StringIO
from IPython.display import Image
import pydotplus
RND_STATE = 55324

AH_data = pd.read_csv(“data/tree_addhealth.csv”)
data_clean = AH_data.dropna()
data_clean.dtypes
data_clean.describe()

predictors = data_clean[[‘BIO_SEX’,’GPA1′, ‘ALCEVR1’, ‘WHITE’, ‘BLACK’]]

targets = data_clean.TREG1

pred_train, pred_test, tar_train, tar_test = train_test_split(predictors, targets, test_size=0.3)

classifier=DecisionTreeClassifier(random_state=RND_STATE)
classifier=classifier.fit(pred_train, tar_train)
predictions=classifier.predict(pred_test)

print(“Confusion matrix:\n”, sklearn.metrics.confusion_matrix(tar_test,predictions))
print(“Accuracy: “,sklearn.metrics.accuracy_score(tar_test, predictions))

out = StringIO()
tree.export_graphviz(classifier, out_file=out, feature_names=[“sex”, “gpa”, “alcohol”, “white”, “black”],proportion=True, filled=True, max_depth=4)
graph=pydotplus.graph_from_dot_data(out.getvalue())
img = Image(data=graph.create_png())
img

with open(“output” + “.png”, “wb”) as f:
f.write(img.data)

```
How to check Azure KeyVault Access Logs
Published: 2022-10-13 13:21:07

- Login to Azure portal
- Find the KeyVault resource
- Select **Insights** from **Monitoring** Blade

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

- Select the **Operations** Tab

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

- Scroll down to view the Access Logs

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

- Click on **View Details** for detailed information
Cpocket - Best Cryptocurrency Web Wallet
Tags: webdev, beginners, programming, php
Published: 2022-10-13 13:14:37

My first **PHP project** is Cpocket which is now live on Envato. I am happy because it is now trending on Envato Marketplace.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zeut3y8wk70qmf9996jy.png) 
**What is Cpocket?**

[CPocket](https://codecanyon.net/item/cpocket-cryptocurrency-wallet/27483828) is a complete **CryptoCurrency** secured wallet. The system platform is developed with the Laravel framework and MySQL. Our system is 100% Secure and Dynamic. It is integrated with coinpayment gateway which supports all available Cryptocurrency whose coinpayment supports. It has Buy coin functionality by bank deposit and Coin Payment gateway, It also has a deposit, Withdrawal, Referral system, Membership system, Blocked coin, and get bonus & many more features that you need to run a wallet. It is the most perfect platform for creating your own currency wallet. The good business opportunity that it has a coin staking option and membership club functionality with configurable reward bonus.

**All files** and code have been well organized and nicely commented to customize. We have included a clear and detail documentation folder to describe the code structures.

[Demo URL](https://cpocket.itech-theme.com/)
User access: email: user@email.com, pass: 123456
Admin access: email: admin@email.com, pass: 123456
Created by [Itech theme](https://itech-theme.com/)

How was the wallet?
Create Youtube Shorts, Insta Reels, Tiktok like scrolling effect | Just HTML and CSS
Tags: javascript, webdev, beginners, css
Published: 2022-10-13 13:07:16

{% embed https://www.youtube.com/watch?v=_rjNcnD_rCI&ab_channel=VAcoder%5BTech%5D %}


```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Youtube | Insta | Tiktok | Reels </title>

    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }


        body {
            background: black;
        }


        .reelsContainer {
            /* background: pink; */

            height: 80vh;
            width: 25vw;
            margin-top: 4em;
            display: flex;
            overflow: auto;
            gap: 2em;
            flex-direction: column;
            scroll-snap-type: y mandatory;
        }

        .reelsContainer::-webkit-scrollbar {
            display: none;
        }


        .reel  {
            min-height: 75vh;
            min-width: 25vw;
            background-color: red;
            scroll-snap-align: start;
        }
        
    </style>
</head>
<body>

<div style="display: flex; justify-content: center;">
    
        <div class="reelsContainer">
            <div class="reel">1</div>
            <div class="reel">2</div>
            <div class="reel">3</div>
            <div class="reel">4</div>
            <div class="reel">5</div>
            <div class="reel">6</div>
        </div>
</div>



    
</body>
</html>
```
Do you track any personal health data? If so, what and how?
Tags: discuss, watercooler, mentalhealth
Published: 2022-10-13 12:58:30

I'm curious about any "standard" data you track with a watch or smart scale, etc., but also anybody who does anything "above and beyond" in this regard.

Also — **what do you do with the data?** Which services do you use for aggregation and visualization, or do you work with any of the data directly as a programmer?
Microsoft Azure Security Engineer Associate AZ-500 Dumps ...
Published: 2022-10-13 12:49:42

With the [b]AZ-500 Exam Dumps[/b]  complete collection of Microsoft AZ-500 Exam Dumps exam questions answers, Exams4sure has assembled to take you through Dynamics : Finance and Operations Apps Solution Architect Expert AZ-500 Exam Dumps for your : Finance and Operations Apps Solution Architect Expert exam training. In this AZ-500 Exam Dumps exam dumps we have got compiled real : Finance and Operations Apps Solution Architect exam questions with their answers so that you can prepare and Dynamics : Finance and Operations Apps Solution Architect Expert exam for your first strive. Exams4sure offers unfastened Microsoft AZ-500 Exam Dumps demo. You can also take a look at demo of Dynamics : Finance and Operations Apps Solution Architect  [b]AZ-500 Dumps[/b] Expert workout take a look at in advance than making a decision to buy it. Microsoft AZ-500 Exam Dumps Q&A . How many Dynamics.

Click Here More Info >>>>> https://dumpsarena.com/microsoft-dumps/az-500/
Basics of Python(Part 1)
Tags: programming, python, webdev, beginners
Published: 2022-10-13 12:23:21

There are tons of built-in functions in python which makes it more advanced and up to date language.Python has now become on of the most used programming languages than Java or C language. Although Java is preferred in some particular coding is sides but Python is best suitable.


Some common built-in Functions of Python that you need know as a beginner and how they work is as follows:

**print() function**

print() function is used to print a specific block of characters.

```
input="Hello! I am a xyz."
print(input)
```

The output will look like-

```
Hello! I am a xyz.
```

**Adding strings before we print something**

So here comes the question ,what is string?Strings are basically a collection of character. If we store Hello in a variable; here, variable is a collection of character and H,e,l,l,o are each a character.

If we want to add string before we print the output we can do it in the following way-

```
input="Hello!I am a xyz."
print("Output is:",input)
```

The output will look like-

```
Output is:Hello!I am a xyz.
```
**Uppercase and lowercase function**

Python recognises uppercase and lowercase characters differently.To convert a string of uppercase letters to lowercase -

```
input="HELLO"
print(input.lowercase())
```
The output will look like-

```
hello
```

To convert a string of lowercase letters to uppercase-

```
input="hello"
print(input.uppercase())
```

The output will look like-

```
HELLO
```

**To remove unwanted space**

```
input="hello I am xyz."
print(input.strip())
```

The output will look like-

```
helloIamxyz.
```
Today date using Javascript
Published: 2022-10-13 12:38:41

How to write today date using javascript

```
<html>
<body>
Today date is : 
<script>
var meses = new Array ("01","02","03","04","05","06","07","08","09","10","11","12");
var diasSemana = new Array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado");
var f=new Date();
var today = (diasSemana[f.getDay()] + ", " + f.getDate() + "/" +meses[f.getMonth()] + "/" + f.getFullYear());
document.write(today);
</script>
</body>
</html>

```
Créer un site web responsive avec Bootstrap
Tags: javascript, bootstap, webdev, programming
Published: 2022-10-13 12:31:08

Tout le monde veut créer un site Web compatible avec tous les appareils tels que les ordinateurs, les ordinateurs portables, les tablettes et les mobiles. Donc, pour rendre un site Web réactif, le meilleur moyen est de créer un site Web en utilisant Bootstrap. Comme il s'agit d'un site Web d'une seule page, lorsque vous cliquez sur n'importe quel menu du site Web, il vous atteindra vers une section spécifique.

[Lire ici](https://team-codeur.blogspot.com/2022/10/creer-un-site-web-responsive-avec.html)
HTML CSS JS Calculator by Amiru Weerathunga
Tags: codepen, javascript, html, css
Published: 2022-10-13 12:30:22

<h1>JavaScript Calculator with shadow effected buttons and a display</h1>

<p>This is my first JavaScript project and I decided to make a calculator. The calculator includes  number buttons, a clear button,  5 operator button such as "Addition, Subtraction, Multiplication, Division and Exponentiation", a backspace button, a dot button and a display to show the operations. I had used `input` tags to get the values to the display.</p>
<p>In addition, this calculator has 5 other scientific operations too. The calculator has clear, backspace, history, percentage & π buttons. U can get the square root & cube root of a number using this calculator.</p>

**U can see my calculator below**

{% codepen https://codepen.io/Amiru-Weerathunga/pen/JjvWZwz %}
Follow me on Codepen.io

---

#### Support my work ...

{% embed https://www.youtube.com/channel/UCzZALfRhFNE0Y1WH-0-0Yeg/ %}
{% embed https://github.com/Amiru2007 %}
{% embed https://medium.com/@amiru.upek.weerathunga %}


Happy Coding 👨‍💻 ...
Computer vision
Tags: computerscience, datascience, machinelearning, computervision
Published: 2022-10-13 12:19:55

I'm willing to pursue my career in Computer vision domain.. I'm pursuing my B.Tech in Data Science and Machine Learning and currently working on some Computer vision projects using OpenCV and some OpenCV courses. I need a guidance on what things I need to be strong at and the tools I need to master after OpenCV.
A guidance or a roadmap would be better :)
Sass: Placeholder Selector 📎
Tags: scss, css, design, webdev
Published: 2022-10-13 12:08:10

Our series is split into two main categories: SASS rules and SASS at-rules, if you recall the course mindmap from the [sass syntax](https://dev.to/ak_ram/sass-syntax-34f1) post. The one SASS rule we didn't cover in the previous posts was **Placeholder Selector**, so now we're going to talk about it.


## Placeholder Selector

A sass placeholder is a special sass selector that begins with a % and it is used to hold CSS styles blocks like this one in the example below:

![Example on how to write placeholder selector](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22bo7fjxq1w5jao063ya.png)

Although it is comparable to a class selector, it is not converted into CSS code.

How then may this selection be of use?

A placeholder may be seen as a box that contains a block of CSS styles that can be applied in many ways without repeating, thanks to the sass at-rule "@extend."

![another example on placeholder selector](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0jgdubsy77oselbgp29c.png)


Finally, we can say that the posts that will come after this one will introduce SCSS at-rules.

See You 😉
Arna Softech Pvt. Limited
Tags: programming, webdev, react, beginners
Published: 2022-10-13 11:58:58

[**Arna Softech**](https://arnasoftech.com/), IT service provider shares your vision for success by delivering your mission critical software projects. We do Software Development, Web, E-commerce, Mobile Apps development, IT Subcontracting, Quality Assurance, Maintenance and Support. We provide a comprehensive portfolio of software services and solutions suiting our customer's needs to solve their IT challenges. Our team has strong global experience in both onsite and offshore situations with clients in North America, Europe, Middle East and India. We bring the most satisfactory outcomes through our Web app development, Mobile app development & Digital marketing services. We can work independently or as an augmented part of your team providing support during non-working hours.
Refer from - Arna Softech
Golang: Firebase Realtime Database CRUD operations
Tags: go, database, programming
Published: 2022-10-13 10:58:16

Wanna learn how to perform firebase real-time database CRUD operations using [GoLang](https://blog.canopas.com/1-min-guide-to-golang-development-best-practices-in-2022-b50d846fd6c)?

Have you ever faced a situation where you want the latest data on multiple places as soon as it gets updated?

Imagine you’re developing a quiz application that has 2 interfaces web and [mobile app](https://medium.com/canopas/golang-send-firebase-push-notifications-to-apps-45bc83d7cabf), and you need to maintain the actual score of the user at the same time.

It’s terrible to think of your database(MySQL/NoSQL) for bringing the latest data and updating the cart on both the platform(website and mobile app), as it will continuously trigger the server for the latest update.

The databases will not give updated data without doing an API(HTTP) call.

There comes real-time interaction in the picture.

Firebase's real-time database saves the data and also informs all the clients that are configured to receive a real-time update, as and when the data gets updated.

Here's what you'll learn today.

- Configure firebase DB
- Setup database rules
- Generate and configure the service account key
- Initialize firebase DB instance
- Add/Update data in firebase
- Get data from firebase
- Delete data from firebase

You can learn more about it from [canopas.blog](https://blog.canopas.com/golang-firebase-realtime-database-crud-operations-8508e3116887)
Accelerate Transformer training with AWS Trainium
Tags: aws, transformers, hardware, deeplearning
Published: 2022-10-27 12:14:24

---
title: Accelerate Transformer training with AWS Trainium
published: true
date: 2022-10-13 10:57:56 UTC
tags: aws,transformers,hardware,deeplearning
canonical_url: https://julsimon.medium.com/accelerate-transformer-training-with-aws-trainium-d20cd3f9dc08
---

In this video, I show you how to accelerate Transformer training with AWS Trainium, a new custom chip designed by AWS.

First, I walk you through the setup of an Amazon EC2 trn1.32xlarge instance, equipped with 16 Trainium chips. Then, I run a natural language processing job where I adapt existing Transformer training code for Trainium, accelerating a BERT model to classify the Yelp restaurant review datatset. Finally, I run the job on 1, 8, and 32 Neuron cores.

{% youtube HweP7OYNiIA %}

- AWS Trainium: [https://aws.amazon.com/ec2/instance-types/trn1/](https://aws.amazon.com/ec2/instance-types/trn1/)
- AWS Neuron SDK documentation: [https://awsdocs-neuron.readthedocs-hosted.com/en/latest/frameworks/torch/index.html](https://awsdocs-neuron.readthedocs-hosted.com/en/latest/frameworks/torch/index.html)
- AWS Neuron SDK samples: [https://github.com/aws-neuron/aws-neuron-samples](https://github.com/aws-neuron/aws-neuron-samples)
- Hugging Face tutorial: [https://huggingface.co/docs/transformers/training](https://github.com/aws-neuron/aws-neuron-samples)
- Setup steps and code: [https://gitlab.com/juliensimon/huggingface-demos/-/tree/main/trainium](https://gitlab.com/juliensimon/huggingface-demos/-/tree/main/trainium)
Release Notes 22.20.13 - Bulk enabling/disabling services on Connections
Tags: devops, network
Published: 2022-10-13 10:24:48

### Release Notes 22.10.13 
Bulk enabling/disabling services on Connections

We're excited to present you with the latest release of Syntropy Stack. **Now you are able to enable/disable the services on a specific connection in bulk**. Head to the `Connection` section and pick the connection with services. Tick the services that you want to enable/disable, then click the `Apply Changes` button at the bottom of the table. 


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

Our team has been tailoring the product to better align with upcoming features, and we hope these aesthetic and functional updates will also improve your Syntropy Stack experience today.

### Features
- Enable/disable services on Connections in bulk 
	
### Improvements
- Connections statuses improvements

### Fixes
- Updated `Connections statuses` styling in the connections info modal and Analytics page
- Text readability improvements
- UI fixes improving user experience in the graph section

## Getting Started
Get started with Syntropy Stack with our three-minute [quick start video](https://vimeo.com/499558754), or follow the [documentation](https://docs.syntropystack.com) for more details. Use Syntropy Stack to streamline your container and multi-cloud deployments and automate network orchestration.

## Getting Involved
Our community helps us identify the correct problems to solve for our users whether you're an active user of one of our products or just getting started, [join our community on Discord](https://discord.com/invite/HxW6DbUeMn)! We love to foster communication among developers. Also, don't hesitate to send us a message if you have feedback or need assistance. We're happy to help!
HACKTOBERFEST 2022: I'VE CRACKED IT!!!
Tags: opensource, digitalocean, github, git
Published: 2022-10-13 10:19:41

- 
2 mins read <br></ul>
**I've cracked the Hacktoberfest 2022.**
**_HACKTOBERFEST 2022_** is a fest organized by DigitalOcean, Appwrite & most popular, our love Docker.
[HACKTOBERFEST 2022 <--- link](https://hacktoberfest.com/about/)
Let's talk now,

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


## ELIGIBILITY
_Ans_) Nothing. Everyone who can code, and loves to contribute, are welcomed.

## NON CODERS?
_Ans_) HACKTOBERFEST isn't all about 'code'🥳 Anyone who writes, designs, tests, mentors, or organizes offers much needed support for OPEN-SOURCE PROJECTS all over 'THE WORLD'. 

## HOW TO DO
_Ans_) I have done it, and I've claimed a tee for me
[![@dynamicmortal's Holopin board](https://holopin.me/dynamicmortal)](https://holopin.io/@dynamicmortal)

So, listen to me! Find a repo, _message the maintainer_ and ask them if you could contribute to their project. 
Next, _raise a issue and fork the repo_. Now the modus operandi of pulling a request is known by everyone.
Lastly ping the contributor and ask them to merge the pull request.

## TIP:-
```
IF (YOU JUST WANT TO COMPLETE THE EVENT JUST) {
 FIND ANY REPO THAT HAS LESS ACTIVITY AND DO IT 
}
ELSE {
 FIND THE FAMOUS OPEN SOURCE REPOSITORIES AND HACK IT
}
```


If you have any queries, drop them down. I would answer all of them! 
_**STAY SAFE. STAY HEALTHY. HAPPY CODING!!! 💕**_
React vs Angular: Which One to Choose?
Tags: react, angular, programming, development
Published: 2022-10-13 09:44:09

For developing every frontend project, Angular and React are strong and well-liked JavaScript resources. Both make creating complex, modern user interfaces for web projects easier. They have thus been getting attention frequently in the web development community. Let us understand the difference between **React vs Angular 2022.**


## What Makes Angular Useful?
Everything in Angular takes place in the same engine room. It provides an ecosystem that enables you to construct your app quickly. Here are some of the primary reasons you should consider choosing Angular, even if we'll go into more detail about its characteristics in the features section.

- Google Help
- Documentation in depth
- Coding Reduction

## What Makes React a Good Choice?
Extremely lightweight and quick to understand and use, React is also a great choice. Here are a few compelling arguments for utilizing React today.

- Simple to Understand
- Coding Simplified
- Facebook Help

## React vs Angular Resemblances
Let's first examine the similarities between React and Angular.

### Architecture
An architecture based on components is shared by Angular and React. The parts of this architecture are infinitely recyclable and interchangeable with other factors.

### Popularity
Both interactive frameworks, React and Angular, are excellent for SPAs. They have a large developer community and tools at their disposal for a quicker and simpler planning process.

### Performance 
For both React and Angular, performance is also a crucial component. Both are equally effective, and how well they perform overall depends on the person.

### Environment for Development and Rendering
Well-known frontend frameworks include Angular and React. Both enable efficient client-side and server-side rendering and are perfect for developing web and mobile apps.


The comparison between _React vs Angular 2022_ is summarised below. Before choosing the best frontend framework for your development, look at the Scoreboard below that separates each deciding criteria.

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

## React vs Angular Which is superior?

### Pick Angular:

- If you want fully prepared options,
- If you're going to encourage more creativity,
- A more functional app needs to be created.
- If you desire the level of application complexity to remain low to medium.

### Pick React:

- When your app project will include shared components
- When you need a multiple-event app
- When you anticipate finding a unique app solution
- when the members of your development team are proficient in Web pages, browsers, and Java.

## Conclusion
To put it briefly, each of these technologies serves a unique role. They are all irreplaceable due to their comprehensive features and capabilities. However, the final choice between [React vs Angular](https://www.bacancytechnology.com/blog/react-vs-angular) is more influenced by the user's goals than by the features these technologies provide.