teleren/devto huggingface dataset:
The Next CTO
Published: 2022-10-07 07:16:41

You want to become a CTO or enhance your skills as a Visionary Chief Technology Officer, but you don't know where to start.

You want to be able to lead your team to success and be at the forefront of the latest technologies.

THE NEXT CTO book will help you understand what it takes to be a great CTO, from building an engineering culture to choosing the right technologies.

**Who is book for**

_Any wanting to become a CTO. Aspiring Software engineers, startup owners, VP engineers, tech leads, testers, product owners, analysts, business consultants, engineers, and business owners._

If you have ever thought to yourself, “I want to become a CTO or I want to enhance my skills as a Visionary Chief Technology Officer” then this is best book for you. In it, the author comes up with some important technical and leadership themes: CTO in Agile era, Lean mindset for CTO, R&D lab, CTO opportunities in the year 2030 and so on.

**Chapter 1:** Steps to get into the CTO role, connection between technology and the CTO, how CTO get into innovation and become visionary CTO.

**Chapter 2:** CTO Building and debugging engineering culture, factors to consider when choosing technologies and different CTO personalities.

**Chapter 3:** Professional skills, qualities and competence for CTO, Types of CTO in the industry, Budgets management, technology management and people management, Agile and Lean mindset for creating lean organization, product, and technology. CTO and POC, Prototype, MVP, Usability.

**Chapter 4:** Coding skills for CTO, code, low code and no code skills for CTO, technology trends to build strategy, avoid over engineering, lead research, technical and business due diligence, product development (R&D) and CTO role in technical and business due diligence.

**Chapter 5:** Learning from mistakes and failure, how CTO avoid and manage failures, startup vs corporate journey and learning lessons, CTO one step ahead and employee journey.

**Chapter 6:** CTO opportunities in the year 2030 with Quantum computers, Data science, AI, ML, Smart cities, EV, IOT, OPENAI GPT 4, NEO, DALL·E and M2M-100

**BONUS: A New CTO Three Month Toolkit, SaaS CTOs Check List, Mind map for CTO and Self Q&A**

Search on amazon "**THE NEXT CTO**"
Pre-order book it via Amazon

![the next cto](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ph5pmvxmv0v0tq93ay8.png)

**How chief technology officer CTO avoid over engineering**

![chief technology officer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fa2k97d2d4w9pas3euqz.png)

**CTO and Employee Journey**

![CTO BOOK](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hss723cuo396uxcg9m53.png)
TLM Reality Bytes Blog
Published: 2022-10-07 08:06:10

People in the gaming industry come in many shapes and sizes. We want to learn more about what makes a game designer by talking about our own experience, but also learning about the journeys of others.

TLM has launched the Reality Bytes Blog, providing the games industry a platform to tell short-form stories and provide actual accounts of everyday life experiences we face working in the fastest-growing entertainment field. These stories have been curated across the video game industry. Our hope is to give insight, honesty, and a hard look at what it’s like to have a career in gaming.

So far three members of our own community have already shared their stories, but we are looking for more! We want to learn from you and we want you to be able to learn from us and others.

One of those stories is that of a software developer, forced to leave his country of Belarus because of the war in Ukraine. You can find his story here: https://tlmpartners.com/2022/09/28/fallout-ukraine-war/

What is your story?

Share it with us at https://tlmpartners.com/reality-bytes-blog/
AWS Storage Gateway AD Integration
Published: 2022-10-07 07:46:29

Unlike many mainstream AWS services, Storage Directory & Active Directory integration is rather not documented well or there may be a different reason behind his lack of attention to his aspect.

In this post below, I would attempt to share a cli command which would indicate how simple it is to achieve his AD join.

aws storagegateway join-domain --gateway-arn $GATEWAY --domain-name 'cloudadvisorygroup.tech' --user-name $USER --password $PASSWORD
Video: Accelerate Transformer training with Optimum Habana
Tags: transformers, deeplearning, naturallanguageproce, computervision
Published: 2022-10-10 14:38:18

---
title: Video: Accelerate Transformer training with Optimum Habana
published: true
date: 2022-10-07 07:26:17 UTC
tags: transformers,deeplearning,naturallanguageproce,computervision
canonical_url: https://julsimon.medium.com/video-accelerate-transformer-training-with-optimum-habana-8efd5a9778c3
---

In this video, I show you how to accelerate Transformer training with [Optimum Habana](https://github.com/huggingface/optimum-habana), an open-source library by Hugging Face that leverages the [Habana Labs](https://habana.ai/) Gaudi chip.

First, I walk you through the setup of an [Amazon EC2 DL1](https://aws.amazon.com/ec2/instance-types/dl1/) instance, which is equipped with 8 Gaudis.

Then, I run a natural language processing job where I adapt existing Transformer training code for Optimum Habana, accelerating a DistilBERT model to classify the star rating of Amazon product reviews. I train with 1 Gaudi chip, then with 8 to demonstrate near-linear scaling.

Finally, switching to computer vision, I use a built-in script in the Optimum Habana repository to accelerate image classification training jobs on the Food101 dataset, first with a Vision Transformer model and then with a Swin model.

{% youtube 56fpEa1Y1F8 %}
Ignite Drops (Shocking Results) That's Why User Are Crazy For Ignite Drops In Update 2022
Published: 2022-10-07 07:22:28

https://ignitedropsprice.substack.com/p/ignite-drops-reviews-why-people-are
https://managementmania.com/en/blog/eroniclok-lee/ignite-drops-reviews--unique-weight-loss-formula--shocking-side-effects-2022
https://playpass.com/ignite-drops4-OYFuMEY/ignite-drops-does-this-ignite-drops-really-work-what-people-this-about-it-T2nfv62
https://techplanet.today/post/ignite-drops-shocking-results-thats-why-user-are-crazy-for-ignite-drops-in-update-2022
https://lexcliq.com/ignite-drops-reviews-unique-weight-loss-formula-shocking-side-effects-2022/
https://warengo.com/stories/257710-ignite-drops-does-this-ignite-drops-really-work-what-people-this-aboutt-it
https://ignite-drops.storychief.io/ignite-drops-reviews-1-weight-loss-product-100-natural-and-effective-results
https://evvnt.com/events/?_ev_id=1368622_ignite_drops_reviews_1_weight_loss_product_100_natural_and_effective_results
https://forum.techtudo.globo.com/perguntas/494150/ignite-drops-reviews-1-weight-loss-product-100-natural-and-effective-results
Fix Securifi Peanut issue with zigbee2mqtt
Tags: homeassistant, zigbee, zigbee2mqtt, iot
Published: 2022-10-15 17:02:52

---
title: Fix Securifi Peanut issue with zigbee2mqtt
published: true
date: 2022-10-07 07:20:45 UTC
tags:
  - homeassistant
  - zigbee
  - zigbee2mqtt
  - iot
canonical_url: https://unixorn.github.io/post/securifi-peanut-gotcha/
---

Securifi Peanut plugs have issues with zigbee2mqtt.

I have several Securifi [Peanut](https://smile.amazon.com/gp/product/B00TC9NC82) Zigbee switches. Overall, they’re nice little smart plugs and make good Zigbee routers to strengthen your Zigbee mesh, but they have one annoying issue - [zigbee2mqtt](https://zigbee2mqtt.io) doesn’t recognize them perfectly, though there’s a simple fix that I’m going to document here.

## Adding Peanut Smart Plugs to zigbee2mqtt

The Peanut Smart Plug does not provide a `modelId` in its database entry, so `zigbee2mqtt` can't identify it to know how to handle it. Fortunately, it's an easy fix, though you'll have to do it every time you add a new Peanut plug.

1. Pair your new Peanut(s) to your [zigbee2mqtt](https://zigbee2mqtt.io) instance
2. Once you've added all the peanut plugs, _stop_ `zigbee2mqtt`. We're going to need to do some surgery on its `database.db` file and that can't be done with the service running.
3. Backup your `database.db` file. If you mess up the edit, you'll want to be able to revert and try again easily.
4. Edit your `database.db` file. Add a `"modelId":"PP-WHT-US"` to each of your Peanut entries. For example, change `""manufId":4098,` to `"manufId":4098,"modelId":"PP-WHT-US",`
5. Once you've finished editing `database.db`, restart the `zigbee2mqtt` service.

You should now see proper entries with capabilities in `zigbee2mqtt` and be able to turn the switches on and off, both from `zigbee2mqtt` and from Home Assistant. Now would be a good time to go to `zigbee2mqtt`'s OTA tab and check if your Peanut plug(s) have any firmware updates.
Setup git สำหรับทำงานกันเถอะ
Published: 2022-10-07 07:05:07



สำหรับ Version control ที่ Woxa จะใช้ Gitlab กันเป็นหลัก ดังนั้นในบล็อคนี้จะใช้ Gitlab ครับ แต่วิธีการ Setup ก็เหมือนๆกัน

1 ไปที่ ssh โดยใช้คำสั่ง 

```
cd ~/.ssh
```

และ Gen ssh key กันก่อน ด้วยคำสั่ง
```
ssh-keygen -t rsa -b 2048 -C "your_email"
```

แล้วมันจะถามเราว่า
`Enter file in which to save the key (/Users/ans/.ssh/id_rsa):`

เราจะใส่หรือไม่ใส่ก็ได้ ถ้าไม่ใส่ก็กด Enter ไปเลย แต่ในที่นี้ผมจะใส่เป็น `id_rsa_gitlab` จะได้แยกถูกว่า key ไหนใช้กับอะไร


![ssh-keygen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y01l1zh2lee4u1l485kt.png)

และถัดมาจะมีช่องให้กรอก passphrase เผื่อ Key หลุดไป ถ้าไม่มี password ก็จะใช้ไม่ได้ แนะนำให้กรอกครับ แต่ถ้าไม่กรอกก็แค่ Enter ยาวๆไปครับ

`Enter passphrase (empty for no passphrase):
Enter same passphrase again:
`

2 เพิ่ม key เข้าไปใน ssh-agent เพื่อช่วยจำ passphrase ของ ssh key ถ้าเราไม่ได้ตั้ง passphrase ก็ข้ามข้อ 2 ไปเลยก็ได้ครับ

```
eval "$(ssh-agent -s)"
```
รันคำสั่ง ssh-add แล้วกรอก passphrase ของ key นั้นๆ
```
ssh-add ~/.ssh/id_rsa_gitlab
```

และเราสามารถดู list key ที่เราสร้างขึ้นมาได้จากคำสั่ง

```
ssh-add -l
```

3 เอา public key ไปใส่ใน gitlab

```
cat ~/.ssh/id_rsa_gitlab.pub
```

จะได้หน้าตาแบบนี้

![[Public key]](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k8uaalldybxkr19basla.png)

ให้ copy key ไปวางไว้ที่ gitlab

[`https://gitlab.com/-/profile/keys`](https://gitlab.com/-/profile/keys)
How to Implement Type in Module Federation (Poly repo)
Tags: webpack, modulefederation, microfronte, typescript
Published: 2022-10-07 06:51:18

When you're building a Typscript micro-frontend project with Webpack Module Federation, you might have type problems (no type support when import package from remote). But it's depend on what type of git repository of the project.

If it's a mono repo ... no problem, just import type from other package (in the same repo!)

If it's a poly repo ... you might have to import type from remote, but how?

use [@module-federation/typescript](https://www.npmjs.com/package/@module-federation/typescript/v/0.2.2)

---

## Prepare project

```sh
# setup pnpm project 
mkdir remote-typesafe && cd remote-typesafe/
pnpm init -y

# setup workspace
cat >> package-workspace.yml << 'END'
packages:
  - host 
  - remote
END

# create host
npx create-mf-app
# name: host
# type: Application
# port: 8080
# framework: react 
# language: typescript 

# create remote
npx create-mf-app
# name: remote
# type: Application
# port: 8080
# framework: react 
# language: typescript 

# install packages 
pnpm i 

# then, we will have folder structure like these
# |- /remote-typesafe
# |  |- host/
# |  |- remote/
```

## Installation

You need to install `@module-federation/typescript` both host app and remote app

```sh
# when I'm writing this blog 0.2.2 is the most stable version
pnpm i -D @module-federation/typescript@0.2.2
```

## Configuration 

Add the plugin both host app and remote app 

```js
const FederatedTypesPlugin = require('@module-federation/typescript')

module.exports = {
  // ...weboack config 
  plugins: [
    new ModuleFederationPlugin(), // module federation main config 
    new FederatedTypePlugin(), // remote typesafe plugin
  ]
}
```

## Development flow 

We need to published the remote app first 

Here, I add a simple `src/Button.tsx` component and expose it 

```jsx
export interface ButtonProps {
  title: string
  onClick?: () => void
}

const Button = (props: ButtonProps) => {
  const onClick = () => props?.onClick && props?.onClick()
  return <button onClick={onClick}>{props.title}</button>
}

export default Button
```

Then, build it!

```sh
pnpm build
```

We will have `dist/` that store our `remoteEntry.js` and `dist/@mf-typescript` that store our type as `Button.d.ts`

Then serve it!

```sh
pnpm build:start # it's just enter dist and serve this folder 
```

Now, we move to host app.

We need to start Webpack devServer first (because we're about to dev it!)

```sh
pnpm start:live
```

Webpack will generate `@mf-typescript` in out root project 

All we have to do is import the type and use it! like these

```jsx
import { ButtonProps } from '../@mf-typesript/remote/Button'

const Button = React.lazy(() => import('remote/Button')) 
  as unknown 
  as React.FC<ButtonProps>
```

And now, our `Button` will have type and it will show us some warning when we use invalid type.
Bun so far
Tags: bunjs, javascript, node, webdev
Published: 2022-10-07 06:25:08

I must say I'm impressed with Bun. However, as expected, they are still working on many things underwater.

This means I'll put Bun on a side track for now.
I'll keep playing with it, especially once some roadmap items are released.

## What works in Bun

The speed is incredible, from the basic start to the Next and React image. It's just super fast!

I also appreciate their Discord community, where everyone seems super happy to help you.

I'm also pleasantly surprised by how easy it was to set up a basic React and Next application on Bun.

## So what's the catch

As mentioned, I think it's a bit early to adopt it fully. There seem to be some essential things missing for me, at least.

This includes a solid router (there are some out there, but I rather wait a bit for a stable one).
But also, from the Next starter, I hit some things that should work, including the SSR.

After asking around on Discord, this should be supported already, so I will keep trying to set it up and let you all know once I get it to work.

As for me, I will keep an eye out for upcoming Bun things and keep you posted via these articles as I try them out.

I'd love to hear if you were able to give Bun a test run and what you've built with it.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
How to check any property of State has any null value or not
Tags: react, javascript, webdev, programming
Published: 2022-10-07 06:24:24

Here is the state of my App:
   
```
const [state, setState] = useState({
    priceType: 0,
    recurrenceType: 0,
    start_date: '',
    end_date: '',
    minCapacity: 0,
    maxCapacity: 0,
    price: 0,
    min: 0,
    max: 0,
    days: []
});
```
Here is the code of condition in which I am trying to achive, if any property of the state has null value then return true otherwise return false.

```
const isNullish = Object.values(state).every(value => {
        if (value==='' && value===0 && value === []) {
          return true;
        }
        return false;
      });
console.log(isNullish)
console.log(state)
```
But the chalenge is whenever I execute that code in my app it returns false although the properties has no value.Below is the console output of above code:

```
false
SpecialPrice.jsx:124 {priceType: 0, recurrenceType: 0, start_date: '', end_date: '', 
minCapacity: 0, …}
days: []
end_date: ""
max: 0maxCapacity: 0
min: 0
minCapacity: 0
price: 0
priceType: 0
recurrenceType: 0
start_date: ""
[[Prototype]]: Object
SpecialPrice.jsx:129 []
```
For better understanding I have attached a screenshot here:

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


Thanks in advance....
How JavaScript works? Execution Context...
Tags: javascript, webdev, frontend, beginners
Published: 2022-10-07 06:19:15

__

> **_Everything in JavaScript happens inside an execution context
_**

We can assume execution context is a big box in which whole JavaScript code is executed.
Execution context contains two components first one called Memory Component and second one is called code (
In first component all the variables and functions are placed in key value pairs. Function are also stored in memory component.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2es3v6nk4we4o6aadpv0.png)
Second component is called code component also known as thread of execution.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udyatsi4ozwesflqiq9q.png)
_for more details refer Namaste JavaScript_
The Next Greater Element - I
Tags: javascript, leetcode
Published: 2022-10-07 05:58:24

The next greater element of some element x in an array is the first greater element that is to the right of x in the same array.

You are given two distinct 0-indexed integer arrays nums1 and nums2, where nums1 is a subset of nums2.

For each 0 <= i < nums1.length, find the index j such that nums1[i] == nums2[j] and determine the next greater element of nums2[j] in nums2. If there is no next greater element, then the answer for this query is -1.

Return an array ans of length nums1.length such that ans[i] is the next greater element as described above.

 

Example 1:

Input: nums1 = [4,1,2], nums2 = [1,3,4,2]
Output: [-1,3,-1]
Explanation: The next greater element for each value of nums1 is as follows:
- 4 is underlined in nums2 = [1,3,4,2]. There is no next greater element, so the answer is -1.
- 1 is underlined in nums2 = [1,3,4,2]. The next greater element is 3.
- 2 is underlined in nums2 = [1,3,4,2]. There is no next greater element, so the answer is -1.

```js
/**
 * @param {number[]} nums1
 * @param {number[]} nums2
 * @return {number[]}
 */
var nextGreaterElement = function (nums1, nums2) {
  const stack = [];
  const map = {};

  for (let num of nums2) {
    while (stack.length && num > stack[stack.length - 1]) {
      const pop = stack.pop();
      map[pop] = num;
    }
    stack.push(num);
  }

  while (stack.length) {
    map[stack.pop()] = -1;
  }

  return nums1.map((a) => map[a]);
};

```
DevRelX Summit: Elevating the DevRel community, together
Tags: devrel, summit, developersummit, developermarketing
Published: 2022-10-07 05:54:24

The [DevRelX Summit](https://lu.ma/devrelxsummit2022?utm_source=DevRelXSummit_devto&utm_medium=devto&utm_campaign=devrelxsummit) is a community takeover, an opportunity for Developer Marketing and DevRel managers, strategists, practitioners, and enthusiasts to come together.

[SlashData](https://www.slashdata.co/?utm_source=DevRelXSummit_devto&utm_medium=devto&utm_campaign=devrelxsummit), which powers [DevRelX](https://www.devrelx.com/utm_source=DevRelXSummit_devto&utm_medium=devto&utm_campaign=devrelxsummit) and the community behind it, is organising a Developer Marketing/DevRel event for the 7th consecutive year, after the record participation of 1,000+ attendees in 2021. DevRelX is a learning and sharing zone, committed to elevating the understanding of developer audiences and industry trends. A space where regardless of their experience level, everyone gets to access and share knowledge.  

This year’s event is an interactive experience of knowledge and expertise sharing, which puts the DevRelX community at its centre. The DevRelX Summit will take place on October 12 & 13 2022, with:

- Panels
- Community-led sessions
- Lightning talks
- Exclusive sessions and leadership workshops
- Developer-focused professionals are invited to join the 2-day schedule. 

**October 12 | Milestone Day | 8 am PT.**

The first day, “Milestone Day” is invite-only. It is addressed to DevRel strategists, senior managers, seasoned DevRels, and CXOs. Anyone who wants to participate can request an invite via this [link](https://lu.ma/devrelxsummit22-invite-only?utm_source=DevRelXSummit_devto&utm_medium=devto&utm_campaign=devrelxsummit).

The Milestone day will offer participants strategic conversations, master classes, and workshops presented by industry pioneers and experts.

**October 13 | Community Day | 8 am PT.**

The second day, “Community Day”, is open to community advocates at heart. Anyone who believes that a community-centric mindset is the foundation of developer relations can get their ticket via this [link](https://lu.ma/devrelxsummit2022?utm_source=DevRelXSummit_devto&utm_medium=devto&utm_campaign=devrelxsummit).

The Community day will be full of developer community conversations, learning, and connecting with peers.

**Join the DevRelX Summit, for its 7th consecutive year – the best one yet!**

Here is the full agenda:

![DevRelX Summit Agenda](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3q4vtvaovpcesqgja0ac.jpeg)
Difference between Elvis, and Null Coalescing Operators
Tags: php, beginners, programming
Published: 2022-10-07 05:52:44

In this article, I will show you the differences between popular operators in PHP. I hope my short post will help you understand operators better.

**Elvis operator**

The elvis operator **(?:)** is actually the name used for the abbreviated ternary operator (which was introduced in PHP 5.3). The elvis operator is a shorthand operator for the ternary operator. We can also say that it is a modified form of the ternary operator. To understand the Elvis operator in PHP, we need to know the ternary operator and how it works. The ternary operator is a conditional operator used to perform a simple comparison or check of a condition having simple statements. It is a shorter version of the if-else statement.

It has the following syntax:

```
$var ?: false;
```

This is equivalent to:

```
$var ? $var : false;
```

and

```
if ($var) {
    $result = $var;
} else {
    $result = false;
}
```

**Null Coalescing Operator**

The null coalescing operator **(??)** was introduced in PHP 7. The null coalescing operator checks whether the specified variable is null or not, and returns a non-null value from the value pair. The output of the null coalescing operator depends on whether the variable is null.

It has the following syntax:

```
$var ?? false;
```

This is equivalent to:

```
isset($var) ? $var : false;
```

and

```
if (isset($var)) {
    $result = $var;
} else {
    $result = false;
}
```
How To Get Array Length In VueJS
Tags: vue, array, javascript
Published: 2022-10-07 05:48:55

In this article, we will see how to get "array length" in Vue JS and how to get "object length" in Vue JS. we will learn about Vue JS get array length or object length. 

if you worked with javascript or jquery then you know how to get array length. The length property sets or returns the number of elements in an array.

In the VueJS same way, you can get array length or object length. You can count array length or object length in Vue JS. Also, you can check the array length and the object length.

So, let's see how to get an array length in VueJS and how to get object length in Vue JS.

We can use the v-for directive to render a list of items based on an array.