teleren/devto huggingface dataset:
Generate utterances for Amazon Alexa Skills
Tags: chatbot, javascript
Published: 2019-11-12 14:07:43

---
title: Generate utterances for Amazon Alexa Skills
published: true
date: 2019-11-11 01:09:30 UTC
tags: chatbot, javascript
canonical_url: https://boobo94.github.io
cover_image: https://i1.wp.com/boobo94.xyz/wp-content/uploads/2019/11/black-amazon.jpg
---

Generate utterances for Amazon Alexa Skills is the solution for you. If you are a developer, as I am, probably you don’t like to write documentation and this kind of thing. Instead of working on hundreds of sentences, is much simpler to write some schematic sentences like:

```
(/please) tell me a (/funny) joke
```

Using one of the following tools it will generate:

```
please tell me a funny jokeplease tell me a joketell me a funny joketell me a joke
```

Tools:

- [http://www.makermusings.com/amazon-echo-utterance-expander/](http://www.makermusings.com/amazon-echo-utterance-expander/) documentation [here](http://www.makermusings.com/2015/07/21/defining-utterances-for-the-alexa-skills-kit/)
- [https://lab.miguelmota.com/intent-utterance-expander/example/](https://lab.miguelmota.com/intent-utterance-expander/example/)

Good luck there at creating utterances. If you wanna know how to Convert sounds for [Amazon Alexa Skills](https://cmevo.com/chatbots-development/) please read the article.

The post [Generate utterances for Amazon Alexa Skills](https://boobo94.github.io/) appeared first on [boobo94](https://boobo94.github.io/).
The Moments In Between
Tags: css, javascript, animations, transitions
Published: 2019-11-11 01:00:17

Yoga holds a special place in my heart. It helps clear my mind of any negativity and it challenges me both physically and mentally. My journey with yoga has evolved over time. When I was first starting out, I remember focusing on nailing down the poses, completely ignoring the moments in between them. I was always in a rush to get to the next pose, curious to know if there were any major improvements since the last time I practiced. But the more I practiced yoga, the more my energy shifted away from being able to perfect a pose, towards trying to master a smooth and controlled transition between poses. Doing so has made each yoga class that much more enjoyable. I am no longer in a never-ending loop of enjoying a pose and then going through the motions until the next pose. Instead, I am able to find meaning in every movement, from beginning to end.

Yoga poses are no easy feat, and the transitions are just as difficult, if not more intense at times. Typically, a yoga pose will test your strength, balance and flexibility in one static position, while a smooth and controlled transition tests your muscle and joint strength when in motion. 

This parallels my experience with coding. When I was first starting out, I wanted to be able to learn new ways to improve the content I was delivering, but as time passed, I started to truly understand the importance of a seamless transition when the values of an element changes, and the difficulty in getting it just right. (Is it too much? Or not enough?)

Just like the transitions in yoga, transitions in websites are much simpler to code than the content itself, but it helps enrich users’ experiences, making them just as meaningful. It allows all the little moments in between to be as equally enjoyable as the main attraction. It is also a great indicator for users that a change is about to happen. 

There are many different routes one can take when implementing a transition into their project. CSS transitions is a great starting point for your foray into animations. It allows you to create animations between the start and end state of a value change. Another way to inject a smooth transition between values is through CSS animations. This method allows for more control, as you can create multiple key-frames in which the animations occur and has the ability to change the actual values, rather than control only the in-between state. Lastly, you can select one of several JavaScript animation libraries that exist online, the most popular being J Query, to create your desired effect. With JavaScript, the options are endless, and this would be the ideal choice for websites where animations and transitions are crucial.

"The journey is the destination." - Dan Eldon
How YOU can learn to author your first Serverless function using this video
Tags: serverless, tutorial, javascript, webdev
Published: 2019-11-10 23:51:16

---
title: How YOU can learn to author your first Serverless function using this video
published: true
description: 
tags: serverless, tutorial, javascript, webdev
---

Follow me on [Twitter](https://twitter.com/chris_noring), happy to take your suggestions on topics or improvements /Chris

> Serverless is this new concept that everyone is talking about. It lives natively in the Cloud and is extra interesting as it is about running managed code, no need to set up a virtual machine or app server - focus only on writing code. It's also really cheap as it is a resource that is only provisioned when you need it. Whether you are a startup that needs to keep the costs down or an Enterprise company looking to cost-cut or maybe you want to leverage more of your existing presence in the Cloud - this could be for you

This video explains why you should be using Serverless and also explains basic concepts such as Trigger and Bindings. It also takes you through scaffolding a Function app and a function. Additionally, it shows you how to debug locally using VS Code

{% youtube TUj-xGjK5sA %}

## Resources

- [Sign up for a free Azure account](https://azure.microsoft.com/free/?wt.mc_id=devto-blog-chnoring)
To be able to use the Azure SignalR Service part you will need a free Azure account

- [Build a serverless GraphQL API](https://dev.to/azure/learn-how-you-can-build-a-serverless-graphql-api-on-top-of-a-microservice-architecture-233g)
This shows how we build Microservices with Docker and how we use the URLs as part of a GraphQL API

- [Deploying your serverless API to the Cloud](https://dev.to/azure/learn-how-you-can-build-a-serverless-graphql-api-on-top-of-a-microservice-architecture-part-ii-deploy-it-to-the-cloud-26b6)
This shows how we take our Microservices and put them in the container registry. It also shows how we host our API in a Serverless function and deploy it to Azure

- [Build serverless functions using the Azure portal](https://dev.to/azure/serverless-from-the-beginning-using-azure-functions-azure-portal-part-i-28o1)
We get to know the Azure portal and we learn to build our first function

- [Build serverless functions using the Azure portal, advanced usage](https://dev.to/azure/serverless-from-the-beginning-part-ii-getting-to-know-your-portal-ide-101k)
We deepen our knowledge of the portal and build yet another Azure function

- [Build Serverless functions using VS Code](https://dev.to/azure/serverless-from-the-beginning-using-azure-functions-vs-code-part-iii-50j7)
This time we learn how to build an Azure function in VS Code
IP GeoLocation and IP Lookup API?
Tags: webdev, javascript, php, testing
Published: 2019-11-10 23:47:20

A IP Geolocation and IP Lookup API for free with unlimited queries and fast response time? it's actually here.

Today i decided to provide a free IP Geolocation and IP lookup API for every developer with no restrictions. free and fast API which can be used in any web app.

**Goal**

The main goal of this project besides what is stated above, is to create software which is able to process very large amount of data with big amount of queries in responsive time without consuming much of server usage. and i actually successed to make one singal query take less than 3 milliseconds with very low usage. and this is the main idea to provide everyone with free unlimited amount of queries and with very low cost for me.

**Get Started**

The API is online and free for everyone and can be accessed through HTTPs request to this domain, [geoip.adel.dev](https://geoip.adel.dev/) also a documentation should be there for more information.
The efficiency of "SWR: React Hooks for Data Fetching"
Tags: react, javascript
Published: 2019-11-10 23:29:50


When it comes to data fetching, the new swr.now.sh technology is just groundbreaking

![Basic Example](https://thepracticaldev.s3.amazonaws.com/i/eddx4mmy4rmqtfzxj5vo.jpg)
Yeap, that's it. AWESOME, right?

Real life example:
![](https://thepracticaldev.s3.amazonaws.com/i/dbpf7m80g0cixdevqjkv.jpg)
Code: 
https://github.com/gemanepa/react-auth0-login/blob/master/src/components/RandomCuteAnimal/index.jsx

Live Version of the fetching working:
https://react-auth0-login.web.app/
Angular 9|8|7 Routing Tutorial – Sending & Getting Routes Parameters
Tags: angular, angular987, sendinggettingroutes, angularrouting
Published: 2020-02-01 19:06:13

---
title: Angular 9|8|7 Routing Tutorial – Sending & Getting Routes Parameters
published: true
date: 2019-11-10 21:50:46 UTC
tags: Angular, Angular 9|8|7 , Sending & Getting Routes, Angular Routing
canonical_url: https://www.positronx.io/angular-routing-tutorial-sending-getting-routes-parameters/
---

The post [Angular 9 Routing Tutorial – Sending & Getting Routes Parameters](https://www.positronx.io/angular-routing-tutorial-sending-getting-routes-parameters/) appeared first on [positronX.io](https://www.positronx.io).

**In this Angular 9 Routing tutorial, we will learn how to set parameters to routes along with that we will also look at how to access or get parameters from the route using ActivatedRoute’s snapshot and paramMap method.**

[Click here to read more](https://www.positronx.io/angular-routing-tutorial-sending-getting-routes-parameters/)
Do you prefer one-time fee or subscription?
Tags: discuss, billing, startup
Published: 2019-11-10 21:22:01

Currently working on the pricing for my SaaS startup, I wonder about which pricing model to apply. It seems that almost *all* SaaS use subscription billing nowadays and I kind of miss the *old day* when we can buy a software just once. 

Would like to hear what do you guys think, do you prefer one-time fee or subscription billing for a SaaS product?
The hardest won skill in software development
Published: 2019-11-10 21:20:55

If I had to give you one skill that separates an experienced developer from a junior it’s this...

**Realising you’ve gone in the wrong direction and knowing when to backtrack.**

When I look back at my early years I can think of many times where I fell foul of this.  Maybe I was writing an old webform page or whatever and for whatever reason, the code became complex and before long was infested with local variables with names like isInEditMode, hasPopulatedGrid, needToRefreshGrid etc.  Then comes that moment of realisation - this isn’t the best way to code this.  That at some earlier point I made the wrong coding decision and now I’m in a right mess.  

We’ve all been there.  Many times.  Don’t trust a developer who denies it.  The question is rather, did we learn from it?  Sometimes I’ve doubled down and ploughed on.  Perhaps setting the needToRereshGrid in the onItemDataBound event will fix it?  But, Sometimes I’ve backtracked right out and refactored the whole thing despite the sunk cost.  And you know what I’ve learned after all these years?  It overwhelmingly likely that backtracking is the best option. A better way to think of it is you’ve actually spent time working out the best way to do it.  

The sunk cost fallacy is a powerful adversary with many allies.  It can be embarrassing to tell you coworkers that that form you’ve been working on is going to take a couple more days - that you’ve wasted time.  Perhaps a deadline means you can’t spend the time to refactor.  Or the code really is short term and will never need maintaining.  I'm certainly not saying that you should always refactor.  We must be pragmatic and serve the greater goals of the project.  

But, if you can take the time to refactor, you’ll likely find that you’ll finish the task sooner anyway.  There are times where, after ploughing on and finally getting it working where I’ve thought ‘that codes a pile of technical debt and I’d have done it quicker if I’d refactored it two days ago’.  

The counter to the sunk cost fallacy is surely the maxim 'Always leave code in a better state than when you found it".  I hope you work in an environment that understands that sometimes we need a refactor to fix the smallest of bugs.
Stream 11/10/2019 - Overlay Reverse Gravity Command Complete!
Tags: blog, devjournal
Published: 2019-11-10 20:32:33

### Check Out the Stream @ [https://twitch.tv/talk2megooseman](https://twitch.tv/talk2megooseman)

If you're about the working I was doing on today's stream you can check out the project here:

[talk2MeGooseman/twitch-interactive-overlay](https://github.com/talk2MeGooseman/twitch-interactive-overlay)

Also, see all the factoring and implementation details here:

[Reverse gravity by talk2MeGooseman · Pull Request #99 · talk2MeGooseman/twitch-interactive-overlay](https://github.com/talk2MeGooseman/twitch-interactive-overlay/pull/99)

# Today Objective

- [x]  Finish the refactoring and implementation for the Reverse Gravity command

# Notes

Doing the refactoring of logic to the BaseSprite class allowed me to delete a lot of common code especially around managing the timer events. I also took the opportunity to refactor the Coins/Gems classes since they all shared the same logic. Now `Coin` extends `BaseSprite` and the `Gem` extend `Coin` since they are just `Coins` with higher value and different key but same interactions.

I love being to do all of this refactoring because its slowly removing over-engineered parts of the code and pulling together common code across the Sprites.

Now `!reverse_gravity` is a thing!

# Future action items

None, met our goals for the stream today :)
Performance Testing in R using Apache JMeter
Tags: apachejmeter, performancetesting, jmeter, r
Published: 2019-11-13 19:20:56

---
title: Performance Testing in R using Apache JMeter
published: true
date: 2019-11-10 20:23:30 UTC
tags: Apache JMeter,Performance Testing,JMeter,R
canonical_url: 
---

Performance Testing in R using Apache JMeter Couple weeks ago, I stumbled upon an open source project from T-Mobile called `loadtest`. You can check the repository at [GitHub](https://github.com/tmobile/loadtest).

# Why loadtest package?

T-Mobile is one of the largest cellular network in USA. loadtest package has been released by T-Mobile Tech team. The primary objective of the team is to load test the APIs without leaving the R environment.

Just by installing the loadtest – a R package and by writing just a line of code, you can simulate the workload.

To demonstrate the R package capability, team has released a demo website http://teststuff.biz/ which has the API version of MIT DeepMoji project.

DeepMoji converts a string into emojis. You can check this link https://deepmoji.mit.edu/ for more details.

loadtest R package leverages Apache JMeter under the hood.

Now, lets dive into how to setup the R environment for load testing by installing R in Windows 10 and by leveraging R extension in Visual Studio Code.

**Prerequisites** 

Download R 3.6.1 for Windows and validate the checksum
Download R Tools for Windows
Download Visual Studio Code w/ R Extension
Download Pandoc for Windows
Download Apache JMeter (latest version would be preferable), this demo uses JMeter 5.2

For more details, please continue at my blog. 

Performance Testing in R using Apache JMeter](https://qainsights.com/performance-testing-in-r-using-apache-jmeter/) appeared first on [QAInsights](https://qainsights.com).
Daily Challenge #113 - Iterative Rotation Cipher
Tags: challenge
Published: 2019-11-10 19:00:49

---
title: Daily Challenge #113 - Iterative Rotation Cipher
published: true
series: Daily Challenge
description: Implement an IRC with two methods encode and decode.
tags: challenge
---
##Challenge
Your challenge is to implement an *Iterative Rotation Cipher (IRC)*. To complete the challenge, create an object with two methods, `encode` and `decode`. 

`encode` will receive two arguments, a positive integer `n` and a string value. 
`decode` will receive one argument - a string value. 

Each method should return a string value. Encoding and decoding are done by performing a series of character and substring rotations on a string input.

Encoding: The number of rotations is determined by the value of n. The sequence of rotations is applied in the following order:
 Step 1: Remove all spaces in the string (but remember their positions)
 Step 2: Shift the order of characters in the new string to the right by n characters
 Step 3: Put the spaces back in their original positions
 Step 4: Shift the characters of each substring (separated by one or more consecutive spaces) to the right by n

Repeat this process until it has been completed n times in total.
The value n is then prepended to the resulting string with a space.

Decoding: Decoding simply reverses the encoding process.

##Example
<pre>
let quote = `If you wish to make an apple pie from scratch, you must first invent the universe.`;
let solution = `10 hu fmo a,ys vi utie mr snehn rni tvte .ysushou teI fwea pmapi apfrok rei tnocsclet`;
IterativeRotationCipher.encode(10,quote) === solution; //true


/* Step-by-step breakdown:
Step 1 — remove all spaces:
`Ifyouwishtomakeanapplepiefromscratch,youmustfirstinventtheuniverse.`

Step 2 — shift the order of string characters to the right by 10:
`euniverse.Ifyouwishtomakeanapplepiefromscratch,youmustfirstinventth`

Step 3 — place the spaces back in their original positions:
`eu niv erse .I fyou wi shtom ake anap plepiefr oms crat ch,yo umustf irs tinventth`

Step 4 — shift the order of characters for each space-separated substring to the right by 10:
`eu vni seer .I oufy wi shtom eak apan frplepie som atcr ch,yo ustfum sir htinventt`

Repeat the steps 9 more times before returning the string with `10 ` prepended.
*/
</pre>

##Tests
encode:
	[14,`True evil is a mundane bureaucracy.`],
	[22,`There is nothing more atrociously cruel than an adored child.`]

decode: 
	[10 `hu fmo a,ys vi utie mr snehn rni tvte .ysushou teI fwea pmapi apfrok rei tnocsclet`]
	[36 `ws h weA dgIaa ug owh n!asrit git 
msm phw teaI'e tanantwhe reos
s ther! aHeae 'gwadin
t haw n htoo ,I'i sy aohOy`]

Good luck!
***
_This challenge comes from docgunthrop on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Check Host python
Tags: replit, python
Published: 2019-11-10 20:05:01

Check Host using python

view on github:

https://github.com/jojosamass/Check-Host

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ujrgknvq6921vh2yb90c.png)

{% replit @jojosamass/Check-host %}
Intro to Web Workers and Multithreading
Tags: javascript, webworkers, multithreading
Published: 2019-11-10 20:01:51

JavaScript in the browser is a single-threaded environment, meaning it can run only one script at the same time. If you do heavy calculations and DOM manipulation at the same time, the browser will likely throw you a message about the unresponsive page and offer you to kill the script that takes a long time to finish.
To make the user experience better and escape blocking, we can use web workers. It is a system that spawns required worker to execute script in the background threads without interfering with the user interface.

To spawn a new worker, we need to call a constructor `Worker()` and pass URI to the script file, where new worker thread will be created and code executed. A good practice to check if a browser supports workers and handle error:

```jsx
if (window.Worker) {
  const myWorker = new Worker('worker.js');
} else {
  console.log('Browser does not support web workers');
}

```

## Worker Scope

A worker will run in a different context from the current `window` and trying to access it without keyword `self` will throw an error. Using `self` will reference the `window` context.
In a worker, you can run mostly any JavaScript code including `navigotor` object, WebSockets, data storage, `XMLHttpRequest`, extensive set of `window` methods or load other scripts. But you cannot directly manipulate the DOM.

## Communication With a Dedicated Worker

Communication between the main page and worker is happening through method `postMessage` and event handler `onmessage`.
For example, to send data to a worker, we call a method:

```jsx
// main js file
const myWorker = new Worker('worker.js');
myWorker.postMessage('Giggity');
```
Passed data between the main page and workers is copied, not shared, and can be of any type or Javascript object

To handle received data in the worker, we need to declare an event handler. The worker has access to event handler and method, and can be set up directly calling them:

```jsx
// worker.js file
onmessage = (event) => {
  const { data } = event;
  const transformedData = doSomeHeavyWork(data);
  
  postMessage(transformedData);
}
```
Event handler `onmessage` runs a function every time it receives a message, with access to `Event` object, which holds the sent message in the `data` attribute.

To receive the message from the worker, we also declare `onmessage` event handler on the main page:

```jsx
// main js file
const myWorker = new Worker('worker.js');

myWorker.postMessage('Giggity');

myWorker.onmessage((event) => {
  const { data } = event;
  doSomethingWihtIt(data);
})
```

And in any case you need to terminate the worker from the main thread, it can be done immediately calling `terminate` method:

```jsx
myWorker.terminate()
```

## Conclusion

That was a basic intro to the Web Workers. You can start using them in your application to enhance user experience. 
Any intense computation can be set to run on workers, like processing large data sets, prefetching and cashing, multimedia analyze or real-time text formatting.