teleren/devto huggingface dataset:
IoT: How to make a "Thing" Smart?
Tags: iot, smart, automation, digital
Published: 2022-06-20 12:36:33

The Internet of Things is about extending the power of the internet beyond computers and smartphones to a whole range of other things, processes, and environments.

How to make a "Thing" Smart?

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

We can make anything smart by putting components in the world around us which interact and sense the physical world and connecting those to the internet.

There are 4 components as Senses, Network, Identity & Control or Interface.

1.Sensors help integrate physical parameters into data (sensors for vision, sound, smell, composition & touch can be used). Once the data gets to the cloud, software processes it and then decide to act.

2.The network is Wi-Fi or cellular, whatever is being used for cloud interface. IoT interconnects a series of devices to a network that readily shares information, transmitting data that allows humans and machines to interact freely with each other.

3.Identity is given by using IP addressing protocols, like ipv4 or ipv6.

4.Control or Interface is generally a cloud UI or an app from where things can be controlled and monitored.

Let us know your views in the comment box!!
Link: How Not To Test With DynamoDB
Tags: dynamodb, aws, testing
Published: 2022-06-20 12:31:52

---
title: Link: How Not To Test With DynamoDB
published: true
description: 
tags: dynamodb,aws,testing
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

I do this exponential back-off + retry for eventually consistent things and it leads to reliable integration tests. However, I don't retry the assertion like he does; I retry getting the data I expect to be there, then assert on the result. Minor stuff, though, great technique.

https://sethorell.substack.com/p/how-not-to-test-with-dynamodb
12 SEO Lessons. I Have Learned After Examining Countless Competitors!
Published: 2022-06-20 12:26:37

One of the toughest hurdles right now is convincing small businesses that they need to step up and learn how the Internet can dramatically increase their sales and conversion. They are leaving a lot of cash on the table by delaying the process. Now lets explore my learnings!

1. Most links are utter garbage: When you start to break websites down, you'll find that most links are rubbish. So don't be intimidated by big link numbers in the tools.

2. Most content is terrible: The chances are you can build far better content than what's ranking online.

3. Internal links are still one of the best sources of links, no matter what anyone says. It's common sense to link to your pages. Just don't overdo it.

4. Content velocity is now what most SEO is about. Publish more content, more aggressively, and do it like your life depends on it. If it's not written it can't rank.

5. You don't have to publish perfect content the first time if you don't plan on promoting it. It's perfectly OK to publish lean content and when it ranks on page 2 or 3 in time, then upgrade it.

6. Google is carving up the SERPS, they don't want people to click on your site. But remember Google isn't the only search engine. While they only have a small % of the market DuckDuckGo handles an average of 98.79 million search queries a day and is growing fast. Expect other search engines to be launched soon, making SEO future-proof.

7. Product pages can and should be sales pages. Most product pages are awful, yet we know that better pages rank higher and convert better. Invest in good product descriptions.

8. Don't forget conversion and emails. Make sure you have a high-quality lead magnet and a follow-up email funnel. Grab those emails at every opportunity.

9. Don't waste your money on dog shit PR link-building campaigns that generate links from nothing but foreign sites. Instead, invest in real PR. Be the expert, get featured on TV, and get people talking about you. Know the difference between REAL PR and the terrible link building disguised as PR.

10. Create expected content and unexpected content. If I google tips for cleaning my computer, that's what I expect to get. But you must also create content that I don't expect, that intrigues me. It's this content I see after I read the expected stuff, and it's this content that makes me click on a second page.

11. Leverage AI tools by asking yourself 'how can AI help with this?' Even if it handles intros and conclusions, it saves a lot of time.

12. Smash ideas together to get fresh content topics. For example, superheroes smashed with SEO = "Stan Lee's Content Creation Template That Will Make You A Better Writer".

What are your learning from SEO? Where are we doing it wrong?
Introduction to Data Structures and Algorithms
Published: 2022-06-20 12:12:14

## Introduction
In this article we will have a simple overview regarding data structures and algorithms. Before we look into the two we need to understand why they are important to developers. To put it lightly when writing a program you need to consider the data structures the algorithm you use because they affect the efficiency  of your program.
The efficiency of the code you write is dependent on the time complexity and space complexity. The time complexity affects how long it takes your program to perform a task while space complexity affects the space used for computing. Essentially we want to write programs that deliver fast results while using up the least amount of memory.

## Algorithm
An algorithm is basically a finite stepwise procedure to solve a problem. Algorithms are language independent and are result oriented. They focus on the logic to attaining a desired result. We use algorithms everyday to solve tasks such as tying shoelaces or even preparing meals. Algorithms are not limited to writing computer programs.

## Data Structures
Data structures are means of storing data in a computer. They are a means to create, read, update, and delete data in a computer. The common data structures that are often used are queue, linked lists, arrays and trees.
The data structures are classified based on their representation and memory allocation. Representation is either linear or nonlinear while memory allocation is either static or dynamic.
Laravel Tinker - A PHPStorm Plugin
Tags: php, laravel, productivity, opensource
Published: 2022-06-20 12:02:49

A little while ago I created a plugin which lets you run quickly tinkered up php code from your IDE as if through `php artisan tinker`. If you have been using that command or have been using dump()/dd() in a controller just to see what is in your database for example, I highly recommend this plugin to you.

It combined the power of laravel/tinker with all the nice features of the IDE. Think about code completion, error correction and all those other lice features your IDE alreadyt gives you.

Installing is easy, just search for "Laravel Tinker" in the plugin marketplace in the settings of PHPStorm (or IDEA) or visit https://plugins.jetbrains.com/plugin/14957-laravel-tinker


![Laravel Tinker in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0llvwy1fozx00pn50tx8.png)
How to bulk upload files to S3 using node script
Tags: javascript, s3, fileupload, node
Published: 2022-06-20 11:59:14

In this article let's see a small nodejs script which can be run to upload files to amazon S3 bucket. 

## Prerequisite
I am going to assume you understand what amazon s3 is using for. If not you can visit this [link](https://aws.amazon.com/s3/) to learn more.

## Writing the upload script

```
// uploadTos3.js

const fs = require('fs');
const readDir = require('recursive-readdir');
const path = require('path');
const AWS = require('aws-sdk');
const mime = require('mime-types');

AWS.config.update({
  region: 'ap-south-1',
  accessKeyId: process.env.AWS_ACCESS_KEY_ID,
  secretAccessKey: process.env.SECRET_ACCESS_KEY,
  maxRetries: 3
});

const directoryPath = path.resolve(__dirname, './images');

const getDirectoryFilesRecursive = (dir, ignores = []) => {
  return new Promise((resolve, reject) => {
    readDir(dir, ignores, (err, files) => (err ? reject(err) : resolve(files)));
  });
};

const generateFileKey = fileName => {
  const S3objectPath = fileName.split('/images/')[1];
  return `website-assets/${S3objectPath}`;
};

const s3 = new AWS.S3();

const uploadToS3 = async () => {
  try {
    const fileArray = await getDirectoryFilesRecursive(directoryPath, [
      'BUILD_ID'
    ]);
    fileArray.map(file => {
      // Configuring parameters for S3 Object
      const S3params = {
        Bucket: 'public-read-bucket',
        Body: fs.createReadStream(file),
        Key: generateFileKey(file),
        ACL: 'public-read',
        ContentType: mime.lookup(file),
        ContentEncoding: 'utf-8',
        CacheControl: 'immutable,max-age=31536000,public'
      };
      s3.upload(S3params, function(err, data) {
        if (err) {
          // Set the exit code while letting
          // the process exit gracefully.
          console.error(err);
          process.exitCode = 1;
        } else {
          console.log(`Assets uploaded to S3: `, data);
        }
      });
    });
  } catch (error) {
    console.error(error);
  }
};

uploadToS3();
```

Note: I’m uploading all the assets to website-assets folder. The cloudfront distribution will have that as a base path.

Run the command `node uploadToS3` to upload all the files to S3 bucket.
Know Your World
Tags: javascript, api, fetch
Published: 2022-06-20 11:47:44

**PROBLEM STATEMENT**:

Many people don't know the names of the countries in the world, and this project aims to educate them. A NGO organization may require information on a country's population and exact location in order to determine how best to assist the people there..

**SOLUTION STATEMENT:**

Create a web application that uses data from the RES COUNTRIES API and allows users to search and retrieve the following data. a country's population, the currencies it uses, its flag, and the region it is located, along with a country code like (+254, +44),
Users should be able to:

1. See all countries from the API on the homepage
2. Search for a country using an input field
3. See  countries’s  region
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gtsp4oa6hm8lq6sii3pl.png)
 

## Feature to be added

1. Click on a country to see more detailed information on a separate page
2. Click through to the border countries on the detail page
3. All countries displayed on the home page

## How to use a Res Countries api
 ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/orzplva3nrgst4n33uwl.png)
fetch data first then manipulate Dom and display into webpage
This is all the tech stack I used to build my portfolio website
Tags: webdev, html, react, programming
Published: 2022-06-20 11:21:03

Last week I completed my portfolio website and this is all the tech stack I used to build the website which could be helpful for your next project. Before that, here is the link to my:

- Portfolio website: https://sadeedpv.github.io/Portfolio-website/

- Github repository:https://github.com/Sadeedpv/Portfolio-website



Ok, let's get straight to the point.

I used **React** as my front-end framework. If you are a beginner and want to learn React, these are a few of the best sources I could find on the Internet.

- https://github.com/MoonHighway/learning-react (This repository contains the files for the book Learning React by Alex Banks and Eve Porcello of Moon Highway.)

- https://github.com/Asabeneh/30-Days-Of-React (30 Days of React challenge is a step by step guide to learning React in 30 days.)

2. I used **Framer-motion** to integrate animations into my website. If you want learn Framer-motion, this you-tube playlist by NetNinja contains all the information you need - https://www.youtube.com/watch?v=2V1WK-3HQNk&list=PL4cUxeGkcC9iHDnQfTHEVVceOEBsOf07i.

3. I used **shoelace.js** as my component library. If you want to dive deep into shoelace.js, here is the link https://shoelace.style/frameworks/react


4. **React-icons** - I used this npm library to create all the icons you could see on my website 🤠. They provide bootstrap icons, Font-awesome, and Iconsicons. etc

5. Framer-motion with **React-intersection-observer** library enables you to display animations on scroll ✨.

6. This shadow generator helps you to create shadows of your desired style https://shadows.brumm.af/

7. I used **undraw** for adding illustrations to my website (https://undraw.co/illustrations).

8. **react-parallax-tilt** - This library is very useful in creating tilting animations on hover 🚀

9. Finally, I used **Figma**❤️ for prototyping which is a tool that I highly recommend you should learn if you are a front-end developer. It is a powerful tool that helps you to create anything. It is easy to learn and you can find tutorials on youtube.

Thanks, and that's all the technology I used to build this website. Even though it looks terrible in terms of design, I feel like I did make some improvements. (The website is not completely built yet, I still have some broken links to fix.)
Svelte MUI: Can't get how to use 'sx' property of SMUI components to customize their theme CSS attributes [ TypeScript ]
Published: 2022-06-20 11:19:07

May be specific NODE modules, TS imports and/or Rollup config steps are required. Currently in my projuect the 'sx' attribute is silently ignored.

```
<Button
  sx={ sw 
  ? { color: 'blue', bgcolor: 'yellow' } 
: {}
}					
on:click={() => handleLocaleChange('ua')}
use={[afterMountSetupRuButton]}
>
<Label>UA</Label>
</Button>

```
Building a Weather Hub app using vanilla JavaScript that consume API
Published: 2022-06-20 11:18:54


//In this project I'm working towards creating a Weather Wizard is an application for users to search for any weather data they may need. It also allows them to set a default location for revisiting the application and getting quick data on the location of their choice.
About The Project
This app is simple to navigate and takes minimal time to get results of any information you might need.
Built With
HTML
CSS
JavaScript
JSON server.
Sentry Advanced Deployment Configuration
Tags: webdev, javascript, devops, productivity
Published: 2022-06-20 11:17:46

> " This article is published using [Lamento](https://www.lamento.in/)🍋

## Vercel 

Add sentry integration to your [Vercel account](https://vercel.com/integrations/sentry)

1. Click `add integration` it will prompt a popup in which we need to select the project which need sentry to integrate with.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywc2v42x1pbeqibcaesq.jpg)

2. Next a popup will be shown from the Sentry about the project integration. Make sure the right `vercel project` is matched with the `Sentry project`. This will link our sentry project to Vercel.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ni2ikt4jb16jggcojctp.jpg)


## Slack
1. Now for the slack integration go to the [slack integrations](https://sentry.io/settings/akilesh-et/integrations/slack/) panel and click on `Add workspace`. This will pop up a slack authentication where you need to select your workspace.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1pg5d94ddd40s4nx4ob.png)
 
2. Alert rule needs to be added to trigger the notification when ever the application crashes. Go to `Alert` choose the Errors need to be notified when it happens and click on `Set conditions`.

3. According to your needs, you can configure the settings and experiment with them.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y977h2z1stdg1mbb5p0e.png)

> Take my configuration as a reference for setting conditions. You can also ignore my config and create a new one.

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

Save the rule. When ever the application crashes and according to your alert condition the notification will be sent to your Slack channel.

You have successfully integrated an error monitor into your application with the Slack notification 🔔.
Storyblok SDKs for Vue 2 and 3 – now with TypeScript support
Tags: typescript, dx, vue, storyblok
Published: 2022-06-20 10:52:04

Over the last couple of days, we have been working hard to improve our Vue SDKs. We are thrilled to announce that [@storyblok/vue](https://github.com/storyblok/storyblok-vue) and[@storyblok/vue-2](https://github.com/storyblok/storyblok-vue-2) now come with TypeScript support!

Would you like to see it in action? We have created a [Storyblok Vue SDK w/ TypeScript live demo](https://stackblitz.com/edit/vue-sdk-ts-demo) for you!

Not sure how to start? Here's our easy-to-follow tutorial: [How to add Storyblok to your Vue project in 5 minutes](https://www.storyblok.com/tp/add-a-headless-CMS-to-vuejs-in-5-minutes).

With the addition of TypeScript support, you now get to enjoy auto-completion, static typing and warnings when using either of the two Vue SDKs. This results in a significantly improved developer experience – even if you don't actually use TypeScript.

But have a look for yourself:

<img src="https://a.storyblok.com/f/88751/2048x1152/1f2959c388/vue-ts.gif" alt="https://a.storyblok.com/f/88751/2048x1152/1f2959c388/vue-ts.gif">

If you are unsure how to set up a a Vue project in combination with TypeScript, you can learn more about this topic [in the official docs](https://vuejs.org/guide/typescript/overview.html).

We intend to roll out TypeScript support for all of our other SDKs soon – so stay tuned!

Finally, we'd love to hear what you think about this latest update. What do you like about it and what could do to improve it even further?
How to Set Default Python Interpreter in VS Code
Tags: python, vscode
Published: 2022-06-20 10:35:28

Visual Studio Code is one of the most popular IDE for developers. A screenshot of the [PYPL Index](https://pypl.github.io/PYPL.html) for VS code is as follows for the US:


![PPYL index](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wavfckktl21279fkza9m.png)
 

*The graph contains only IDEs that are common among Python developers, but they are not the only ones on the list.*


VS Code can be downloaded from this link: [https://code.visualstudio.com/download](https://code.visualstudio.com/download.).

## Important Setup For Python
After the installation, there are a few things that are required to set up if you want to use Python in VS code.

### Python Extension

1. Open Visual studio
2. Click the extension button on your left
3. Type “Python”, and you will see the python extension on the top among the list of extensions, choose that.
4. Click install, it should be enabled automatically, if not enable it.

![Python Extension](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gardkpkjbl8g0pjnswz6.png)
 

### Python Interpreter

The next thing we need to set up is the default Python interpreter. To do that first we need our Python path.

#### Find out the path for windows

For Windows users, if you do not know the path, open your command prompt, and then:

1. Type python to open the Python shell.
2. Type the following command, be aware of indentation:

```
import sys
for pth in sys.path:
    print(pth)
```


![Python Path](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/evokb2o2j4r5kt51cbzs.png)
 

Copy the path like the one highlighted. Mine is python 3.9, yours can be different.

Now that you know the path, let's set it up in vs code.

#### Go to File > Preferences > Settings or Press “Ctrl + ,”.


![File Preferences](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7rcf5iq6ej15opbryalo.png)
 

#### Choose User > Extensions>Python > Python Path and paste the path that we copied earlier. Remember the path is not complete. So, add “\python.exe” in the end.

![Python Path Save](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cg39gm18vpzyti6t7hd.png)
 


Now at the bottom left you will be able to see the python interpreter name like in the pic above >>> Python 3.9.4 64-bit <<<

***For Linux its simply : /bin/python_Version for instance: /bin/python3***

### Pylint for Formatting

Its easier to check and reduce errors if they are highlighted. Hence comes Pylint.

1. On your VS code press Ctrl + Shift + P, to open the command palette.
2. Type and select “Python: Select Linter”.
3. Choose PyLint from the list.
4. Now, your Visual Studio Code is set for Python operations.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fju3rnlnac0afefeg1d.png)
How to Use TypeScript with Vue.js: Your Go-to Guide
Tags: javascript, vue, webdev, beginners
Published: 2022-06-20 10:28:34

TypeScript has now become a crucial indicator sought out for in a hire, library, maintainer, or digital product. 

In this article (follow the link below to read the article), I have written a beginner's guide for how to use TypeScript in a Vue.js application.

➡️ Have a great read!

[How to Use TypeScript with Vue.js: Your Go-to Guide](https://medium.com/p/7b40f40cc3c4)
Senior Python Full Stack Developer (100% Remote Job)
Tags: python, datascience, django, javascript
Published: 2022-06-20 10:17:20

## Overview of the Role

We are looking for a smart and enthusiastic Senior Full Stack Developer to join our development team. Your primary focus will be the development of server-side logic ensuring high performance and responsiveness to requests, as well as building customer-facing and internal features for our applications. This includes working on our backend and API development, developing a friendly and responsive UI, helping build out our React/Redux architecture, and continuously improving our tech stack for optimal performance. We’re prioritizing finding someone who has the proven ability to learn quickly and the drive to do so. 

## Responsibilities

- Create scalable and robust backend architecture and APIs
- Develop, test, and maintain robust, scalable, high-quality software
- Implement responsive and well designed UIs
- Write highly organized, maintainable code
- Provide mentorship to peers and junior colleagues

##  Desired Skills and Experience Must have

- Min 8 years of experience with Python
- Experience with Python, Django, and Django REST Framework
- Some SQL experience
- Some Javascript experience
- Eagerness to learn new things and able to do so quickly
- Deep care for user experience and producing high quality code
- Strong computer science fundamentals
- Minimum 4 hours overlap in Pacific Time (6am-10am)
- Comfortable working remotely with a distributed team

## Nice to have

- Experience with React/Redux
- Docker experience
- Experience working in a distributed team
- Experience with Scrum or other agile development process

 

## Benefits
1)Stock options20Flexible paid time off (PTO)

2)$200 reimbursed annually for learning, software/hardware or workplace improvements and fitness related spending

3)Headset reimbursement5)Laptop replacement of up to $2,000 reimbursed after 1 year of full time work and every 3 years after 

## Positions

- Full-Stack Developers
- Backend Developers

## Must have Skills

- Python
- JavaScript
- Django 
- Django Rest Framework (DRF)

**Salary**: 57K - 96K in USD / Year 

[Shoot your Resume here](https://optimhire.com/developers/jv/90923?ref_code=sojin-samuel) before the listing expires.


![senior python developer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5qz5b1a3a2qrzk84z1gp.png)