teleren/devto huggingface dataset:
Interact with AWS S3 using boto3, AWS's SDK for Python . Part 1
Tags: aws, s3, storage, boto3
Published: 2022-11-08 14:24:17

Boto3 is an amazon AWS SKD (Software Development Kit ) for Python.  Using boto3, it is possible to create , update and delete resources on AWS S3 and EC3  by writing the appropriate Python's Scripts.  Here in this blogpost,  I will be focusing Amazon Simple Storage Service S3 and show how to create and S3 Bucket. Boto3 is fully maintained and published by Amazon Web Services.
To learn more about Boto3 , please check the link [here](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html).


 Bellow are the prerequisites

  

-    Have an aws account
-    Lunch an EC2 Instance and SSH into it.
-    Install Python3
-    Install pip
-    Install Boto3


 Installing python 

    sudo amazon-linux-extras install python3.8


** Installing pip **
 Once you ssh into your EC2 instance , run the command bellow 
```
sudo yum -y install python-pip

```
 There is no need to install aws cli  here since it already comes preinstalled when using amazon linux 2 EC2 instance.
 Once installed you can check the version by running the code bellow 

```
aws --version 
```

**Installing Boto3**

```
pip install boto3
```
  Once you have boto3 installed you can also check the version by running the command bellow 

```
pip list
```
Once you have create the appropriate role and attached it to the instance , you should be able to  make some call  base on the permission that you passed to the instance via the AIM role 

 
 Create an IAM role and attach it to your ec2 instance. On that role you will specify the permission needed to complete your tasks which in here is to interact with aws S3 .I granted full access control to that role 

  

**Create a new role**

1. Select your instance 
2. Click on the drop down arrow and select security and then  Modify the IAM Role and then chose the new IAM role you created


 Here  I have create an new role and granted it Full Access to S3 and now  I should be able to get some response back from my aws resources. 

Run the following command and  to see the List all the buckets 
 you have in your account account 

```
aws s3 ls
```

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





  

## Create a new Bucket named  volt123zzzz
 

```
aws s3 mb s3://volt123zzzz

```


![bucketBoto3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/io9bd89q3i5ogqnncmvt.JPG)
 As you can see a new bucket named(volt123zzzz) was created.



  

## Remove bucket  named  volt123zzzz
 

```
aws s3 rb s3://volt123zzzz

```
Once run. the newly created bucket (volt123zzzz) will be removed 
 
 In later posts,  I will dive deep in and show  more functionalities and   of aws and boto2

 Lets  link up on twitter [@asksouley](https://twitter.com/asksouley)
Critérios de desempate do protocolo BGP
Tags: rede, bgp
Published: 2022-11-08 14:17:27

Atualmente trabalho em um sistema autônomo, com isso lido diariamente com diversos protocolos de roteamento, mas às vezes, até pra quem já tem vivência não fica claro quais são os critérios de desempate na escolha de uma melhor rota pelo BGP nos roteadores.

Segue como funciona a seleção de melhor caminho:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dd4y62szrfkqbo6n0h1s.JPG)
Fonte da imagem: https://packetlife.net/media/library/1/BGP.pdf



**1 - Weight(Peso) -** Esse atributo que é configurável somente em roteadores Cisco, que é a preferência administrativa, ou seja, a preferência feita pelo administrador pelo roteador de maior peso. Influencia o tráfego de saída;

**2 - Local Preference (Preferência local) -** Esse atributo vem setado na sessão BGP pelo administrador do AS vizinho, pode ser setada pelo administrador que está recebendo ou gerando a rota e por padrão arranca com o valor 100. Influencia o tráfego de saída;

**3 - Self-originated (Originado no próprio AS) -** Esse atributo de preferência é valido para rotas originadas localmente. Influencia o tráfego de saída;

**4 - AS Path( Caminho do AS) -** Atributo se torna a melhor rota, quando o caminho até a rota destino tem o menor "AS Path". Influencia o tráfego de saída;

**5 - Origin ( Origem ) -** É preferida a rota com menor Origin IGP, ou seja, é menor que EGP, que por sua vez é menor que incomplete. Influencia o tráfego de saída;

**6 - MED (Discriminador de múltiplas saídas) -**  É preferida a rota com menor valor setado. Influencia a entrada de tráfego

**7 - External (Externo) -** Prefere eBGP ao invés de iBGP, ou seja, prefere rotas externas. Influencia o tráfego de saída;

**8 - IGP Cost (Protocolo de saída interior) -** Prefere rotas que estão através do vizinho mais próximo dentro do mesmo AS. Influência tráfego de saída;

**9 - eBGP Peering ( Sessão eBGP ) -** Prefere rotas que estão na sessão BGP mais antiga. Influencia o tráfego de saída;

**10 - Router id  (Id do roteador) -** Prefere as rotas recebidas do roteador que tem o menor ID. Influencia o tráfego de saída.

Referências:
https://tools.ietf.org/html/rfc1771
https://memoria.rnp.br/newsgen/9907/pgbp4p3.html#ng-atributos
https://wiki.brasilpeeringforum.org/w/O_Minimo_que_Voce_precisa_saber_sobre_o_BGP
Where are all the branches?!
Tags: github, git
Published: 2022-11-08 13:52:03

Recently I started using `gh` for working with my forks. Before that I used to add the remotes manually.

When cloning a fork, `gh` adds the original repository as a `upstream` remote which is what I used to do manually, but if you try to find the branches, you'll find that it only tracks the default one.

For tracking all of the branches in the `upstream` remote too, you just need to find the `fetch` line under the `upstream` section in the `.git/config` file.

For example, this is the content of my `.git/config` after cloning my `go` fork:

```bash
$ cat .git/config 
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = git@github.com:alexsaezm/go.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
[remote "upstream"]
	url = git@github.com:golang/go.git
	fetch = +refs/heads/master:refs/remotes/upstream/master
```

But what I really want under the `upstream` entry is this:

```bash
[remote "upstream"]
        url = git@github.com:golang/go.git
        fetch = +refs/heads/*:refs/remotes/upstream/*
```

After changing that file, you can do a `git fetch --all` :)
How To Set Up a React Project with Vite. Faster than CRA! - by Sedrick
Published: 2022-11-08 13:37:35

**Using npm**

The company NPM claims it found more than 1,300 malicious npm packages in 2021 in npm. That's bad, but 1,300 out of 1.8-million is only 0.007222%. If you were to just randomly grab JavaScript packages for your program, odds are you'll be safe. As of 03 Feb,2022.

**So what is better than npm?**

In terms of speed and performance Yarn is better than NPM because it performs parallel installation. Yarn is still more secure than NPM. However, Yarn uses more disk space than NPM. According to "knowledge-hut".

**So what is the alternative solution?**

**Vite** (French word for "fast", pronounced /vit/) is a new breed of frontend build tool that significantly improves the frontend development experience. It consists of two major parts:

   1. A dev server that serves your source files over native ES modules, with rich built-in features and astonishingly fast Hot Module Replacement (HMR).

   2. A build command that bundles your code with Rollup, pre-configured to output highly optimized static assets for production.

**How to install Vite**
`$ npm create vite@latest` - using npm.

`$ yarn create vite` - using yarn.

**Setting up our React-vite project**

```
yarn create vite

Output
yarn create v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "create-vite@2.9.0" with binaries:
      - create-vite
      - cva
? Project name: » react-vite-project
```

After entering your project name, Vite will prompt you to select a framework:

Output

```
? Select a framework: » - Use arrow-keys. Return to submit.
    vanilla
    vue
>   react
    preact
    lit
    svelte
```

After setting up the framework, you will see an output that the project has been scaffolded. Vite will then instruct you to install dependencies using Yarn:

```

Output
Done:
Scaffolding project in path\to\digital-ocean-vite...

Done. Now run:

  cd digital-ocean-vite
  yarn
  yarn dev

Done in 129.89s.
```

Navigate to your project folder as directed:

 `   $ cd digital-ocean-vite`

Then, use the yarn command to install the dependencies of the project:

    `$ yarn`


After installing all the dependencies, you will see how long it took to install dependencies:

```
Output
success Saved lockfile.
Done in 43.26s.

```

Now to start the dev server, just simply type the following and you're good to go.

`$ yarn run dev`

If you reached this far, your're AWESOME and thank you!
Aide pour parler en public
Tags: french, techtalks
Published: 2022-11-08 13:34:57

Un grand nombre d'entre nous sont stressés et ne savent pas quoi faire en détail avant de faire un discours en public ou une conférence. Est-ce que ça sera assez bon? Est-ce que je ne vais pas oublier quelque chose? ...

Pour nous aider avec ça, on peut trouver facilement tout un tas d'articles et vidéos parlant de ça, comment appréhender l'évènement, comment préparer ses notes... Mais généralement on doit faire le tour d'un ensemble d'articles et/ou vidéos avant d'avoir toute l'information dont on a besoin.

Jusqu'à récemment!

---

Trouvé dans un commentaire d'un article, [**speaking.io**](https://speaking.io/) contient toute l'information à un seul endroit!

Vous pourrez y trouver ici tout un tas de conseils pour chaque étape et sous étape du plan jusqu'aux conseils pour votre présentation.

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

---

Personnellement, j'adore ce site. Je n'ai pas eu l'occasion de le tester jusqu'à présent, mais je sais que j'aurais aimé l'avoir sous la main quand je préparais ma première conférence.

J'espère que ça vous sera utile! 🍺
UI Development — Dynamic Island Effect | Sacesta Technologies
Tags: webdev, webdesign, javascript, programming
Published: 2022-11-08 13:27:53

Hello people out there, On this Friday, One of our team member from the UI capability came up with the work he did in his spare time. I liked his creativity and wanted to showcase it with you. He has created effects similar to dynamic island feature on the web with only HTML and CSS. It’s also responsive.

Steps To View Dynamic Island Effect.

 1. Hover over Dynamic Island.
 2. Click On Dynamic Island.
 3. Hover Over Sacesta’s Logo or Accept or Reject buttons.

`Link to the Project. https://iphone.sacesta.com/`

Here are some screenshots of them.


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

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


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


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

Thanks.
Help for public speaking
Tags: productivity
Published: 2022-11-08 13:16:44

*A lot of us are stressed and don't know what they can do before doing a public speaking or a conference. Would it be good enough? Will I forget something to talk about? ...*

To help with this, we can found a lot of posts, videos... talking about that, how we can apprehend that ... But generally we have to read a lot of these to have all the information we want... 

Until recently!

---

Found in a comment from a post, [**speaking.io**](https://speaking.io/) contains all the information in one place!

You will find there a lot of tips, for each steps for your talking from the **plan** to the **delivering** and the **reactions**.

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

---

Personally, I really love it. I haven't the occasion to use it now, but I really liked to have it while I was preparing my first conference.

---

I hope it will help you! 🍺

---

<center><h3>You want to support me?</h3></center>
<a href="https://www.buymeacoffee.com/mxguilbert7" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Css default browser scroll in few lines
Tags: javascript, css, webdev, tutorial
Published: 2022-11-08 13:14:14

All cool apps need a cool scroll bar to work with.  Below you can copy the code snippet to cool up your scrollbar.



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

Add the **custom-scroll** class the the whatever div you want to scroll. 🙌
Element implicitly has an 'any' type because expression of type 'any' can't be used to index type
Published: 2022-11-08 13:04:38


Tengo este objeto declarado con dos propiedades

```javascript
photosPlanes:photoPLanes = {

  Entrenamiento: '', 
  Dieta: ''
 
}
```
y quiero dinámicamente setear el valor de una de las propiedades del mismo de esta forma:

```javascript
 if(element.urlThumb!==''){

        this.photosPlanes[element.name]=element.urlThumb

      }
```


Pero obtengo el siguiente error:

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


LA SOLUCIÓN

Para resolver el problema usamos algo llamado [Type Assertions]
(https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions)

"photoPLanes" es la interface que uso

```javascript
this.photosPlanes[ element.name as keyof photoPLanes ] = element.urlThumb
```

En el articulo de [Borislav Hadzhiev](https://bobbyhadz.com/blog/typescript-element-implicitly-has-any-type-expression#:~:text=The%20error%20%22Element%20implicitly%20has,one%20of%20the%20object's%20keys.) podemos encontrar otro ejemplo mas claro aun:

```javascript
const str = 'name' as string;

const obj = {
  name: 'James Doe',
  country: 'Chile',
};

// 👇️ "James Doe"
console.log(obj[str as keyof typeof obj]);

// 👇️ type T = "name" | "country"
type T = keyof typeof obj;
```

Sígueme y cualquier problema escríbeme que te ayudo 😉🤘
https://linktr.ee/fergolive
Draw Netflix Logo In Python
Tags: tutorial, python, beginners, community
Published: 2022-11-08 12:57:31

In this article I’ll explain you how you can draw Netflix logo using python’s turtle module.

We are all familiar with Netflix, Netflix is one of the most popular OTT platform to watch web series and movies , Nowadays Netflix also producing their own shows and movies, can we said production house and it generates lots of content.

Before writing any code if don’t have any idea about what turtle is please checkout Python Turtle.

Below is the code:

```python
import turtle

t = turtle.Turtle()
t.speed(5)
turtle.bgcolor("black")
turtle.title('Netflix Logo In Python')

t.color("#b1060f")
t.fillcolor("#b1060f")
t.begin_fill()
t.forward(30)
t.setheading(90)
t.forward(180)
t.setheading(180)
t.forward(30)
t.setheading(270)
t.forward(180)
t.end_fill()
t.setheading(0)
t.up()
t.forward(75)
t.down()

t.color("#b1060f")
t.fillcolor("#b1060f")
t.begin_fill()
t.forward(30)
t.setheading(90)
t.forward(180)
t.setheading(180)
t.forward(30)
t.setheading(270)
t.forward(180)
t.end_fill()

t.color("#e50914")
t.fillcolor("#e50914")
t.begin_fill()
t.setheading(112)
t.forward(194)
t.setheading(0)
t.forward(30)
t.setheading(292)
t.forward(195)
t.end_fill()
t.hideturtle()


turtle.done()
```

As you can see the code first we have imported the turtle module in our python file, then we’ve called Turtle() function so all drawing can be possible, in next we’ve added speed of drawing we can do speed lower and higher as well for us 5 speed in best, In next we have added color to our window which going to open when we are going to run our code, In next we’ve added title of our window which is Netflix Logo In Python.

Rest of the code is mainly focused on drawing the Netflix logo, and in last we’ve used turtle.done().

{% embed https://programmingeeksclub.com/draw-netflix-logo-in-python/  %}

_This article is originally posted on [programmingeeksclub.com](https://programmingeeksclub.com/draw-netflix-logo-in-python/)_

_My Personal Blogging Website : [Programming Geeks Club](https://programmingeeksclub.com/)_
_My Facebook Page : [Programming Geeks Club](https://www.facebook.com/profile.php?id=100086258693659)_
_My Telegram Channel : [Programming Geeks Club](https://t.me/dpgcl)_
_My Twitter Account : [Kuldeep Singh](https://twitter.com/kusinghofficial)_
_My Youtube Channel: [Programming Geeks Club](https://youtube.com/@programmingeeksclub)_
Linux Challenge: Introduction to the Linux Command Line
Tags: linux, beginners, devops, tutorial
Published: 2022-11-08 12:51:47

Linux is a powerful operating system that offers many features and benefits that are not available in other operating systems. 

One of the most important features of Linux is its command line interface. The command line interface allows you to interact with the operating system using text commands. 

This can be intimidating for new users, but it also provides a level of flexibility and control that is not available with other operating systems.

One way to learn the command line is to use a tool called Terminal. Terminal is a program that allows you to interact with the command line interface of Linux. It can be installed on most Linux distributions, and it is available for download from the official Ubuntu website.

If you are new to Linux, the command line can be a bit daunting. But don't worry, it's not as difficult as it seems. In this challenge, we will cover some of the most important Linux commands and teach you how to use them.

We will add more for sure.

- [Linux Challenge: networking, file, directory](https://www.howtouselinux.com/post/linux-quiz-question-networking-file-directory)
- Linux Challenge: Basic Permissions
- Linux Challenge: Search Using Find and Grep
- Linux Challenge: Getting Help on Commands
- Linux Challenge: Combining Commands
Reactions without limits, Topics in groups, Collectible public domain aliases. 📡
Tags: blockchain, architecture, flutter, web3
Published: 2022-11-08 12:22:25

> Thanks to the new [REChain 🪐 Open Platform](https://rechain.online), any user can create their own animated sets. <u>In the current update, all custom emoji become available as reactions and status emoji.</u>
> The updated reaction selection menu can be expanded to make it easier to view many new emoji. The reactions you use most often are automatically moved to the top of the list.

Starting today, you can divide large group discussions into topics, acquire collectible public aliases for profiles and channels, as well, as blockchain matrix spaces 🌎 through secure transactions in our distributed decentralized blockchain matrix network called [Katya ® 👽 AI 🧠 REChain 🪐 Blockchain Node Network](matrix.katya.wtf)!


![REChain 🪐](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m6d76afjk124xlzfs1mf.png)

## **Topics in groups**

[REChain 🪐](https://rechain.online) groups, channels & public 'n private matrix spaces can reach incredible sizes - each of them can consist of hundreds of thousands of users. To make it easier to follow the flow of information in conversations, admins of groups of 200 or more members can now organize discussions by topic. Unlimited groups and direct chats have been available for everyone for more than a year!

The new feature allows you to create separate spaces 🐾 according within the main group for certain discussions. For each such a topic, you can separately set up new message notifications and quickly view the media files that were published in it in the general section. Members can chat on anything using a full arsenal of familiar tools, including polls, pinned messages, and autobots 🎓!

## **Minor visual improvements**

Swiping left to reply to a message is now accompanied by a new animation. Clicking on a [Katya ® 👽 AI 🧠 REChain 🪐 Blockchain Node Network](matrix.katya.wtf) domain aliases in a user's profile popup opens a new menu to select the type of call in the [REChain 🪐](https://rechain.online). And in those rare moments when our platform does not have time to immediately load the chat, outlines of text blocks with a new pulsating animation appear in place of messages.


![Hackathon by the REChain Network Solutions, LLC](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5k6dwuk90vthqott14p.png)

## **New interactive emojis and reactions**

4 new interactive emoji 😴👨‍💻🤓👀 will help inform your interlocutors that you are busy studying, sleeping or looking around suspiciously, which are accompanied by full-screen animation in personal chats - and can be used as reactions to messages. In addition, in honor of Halloween, 3 thematic reactions are available to all users in any chats. 👻🎃😭 - real horror!

_Sincerely,
Yours,
Dmitry Sorokin,_
**403 Gone
REChain, Inc
Katya AI, Systems
Katya, Inc
Katya Systems, LLC
REChain Network Solutions**
Video: Accelerate Transformer inference with Optimum and ONNX
Tags: machinelearning, transformers, deeplearning, aws
Published: 2022-11-15 16:24:53

---
title: Video: Accelerate Transformer inference with Optimum and ONNX
published: true
date: 2022-11-08 12:18:29 UTC
tags: machinelearning,transformers,deeplearning,aws
canonical_url: https://julsimon.medium.com/video-accelerate-transformer-inference-with-optimum-and-onnx-faa352fa1de3
---

In this video, I show you how to accelerate Transformer inference with [Optimum](https://github.com/huggingface/optimum), an open source library by [Hugging Face](http://huggingface.co), and ONNX.

I start from a DistilBERT model fine-tuned for text classification, export it to ONNX format, then optimize it, and finally quantize it. Running benchmarks on an AWS c6i instance (Intel Ice Lake architecture), we speed up the original model more than 2.5x and divide its size by 50%, with just a few lines of simple Python code and without any accuracy drop!

{% youtube _AKFDOnrZz8 %}
Bouncy Block Clock
Tags: codepen
Published: 2022-11-08 12:15:56

<p>A digital clock with a bounce every second. Based on <a href="https://dribbble.com/shots/3968411-Timer">Oleg Frolov’s Timer</a> on Dribbble.</p>

{% codepen https://codepen.io/Rahulchandra195/pen/OJEbBqq %}