teleren/devto huggingface dataset:
Example SMM Notification Email
Published: 2020-02-22 20:28:10

---
title: Example SMM Notification Email
published: true
date: 2020-02-21 16:12:00 UTC
tags: 
canonical_url: 
---

###   
**Example SMM Notification Email**

  

Notification id: 12f61ec2-11a3-45ba-b7bb-<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>2416d8a1b076,  
Root resource name: ANY,  
Root resource type: CONSUMER,  
Created timestamp: Tue Jan 07 21:13:45 UTC 2020 : 1578431625199,Last updated timestamp: Mon Jan 13 13:09:38 UTC 2020 : 1578920978293,  
State: RAISED,  
  

### **Message:**
Alert policy : "ALERT IF ( ANY CONSUMER MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE >= 1200 )" has been evaluated to true Condition : "MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE>=1200" has been evaluated to true for following CONSUMERS - CONSUMER = "tensorflow-nifi-aws-client" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 308208428 - CONSUMER = "atlas" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 596819269 - CONSUMER = "nifi-gassensor-aws-client" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 310692570 - CONSUMER = "NIFI-TEST-GROUP-1" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 231168806 - CONSUMER = "bme680-nifi-client" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 291113014 - CONSUMER = "JUNIT\_GROUP\_TEST" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 250840173 - CONSUMER = "\_\_smm-app" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 9223372036854775807 - CONSUMER = "nifi-kafka-group" had following attribute values \* MILLISECONDS\_LAPSED\_SINCE\_<wbr style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: small;"></wbr>CONSUMER\_WAS\_ACTIVE = 291111173
RUST - Little Twitch Command-Line Interface
Tags: rust, twitch, cli
Published: 2020-02-21 16:11:05

# Hi all!

I recently started learning Rust in my free time, and I love it!
So i started with a little cli program with [Twitch](https://twitch.tv "Twitch Link") API.

The goal is to be able to connect to the Twitch API to be allowed to make queries and get Top Games or User info for exemple, juste make `cargo run info-user=5588994` and the program returns the information from the target user.

Repo link : [github.com/RustTwitchCli](https://github.com/loicngr/RustTwitchCli)

For the future, maybe restart with a [clap](https://docs.rs/clap/2.33.0/clap/)  crate. Feel free to tell me the things I'm doing wrong (there's probably a lot of them) :D.
Friday Night Deploys: #12 The Incredibly Peculiar World Of Job Titles In Tech
Tags: podcast, jokes, webdev, career
Published: 2020-02-21 16:06:02

It's Friday which means a new episode of Friday Night Deploys! It also means it's time for Phil to promote last weeks episode because Phil has been behind in promoting these episodes! Whoops!

It does mean that if you finish listening to this episode and for some reason want more, you can jump to this weeks episode right away. That was definitely 100% my intentions from the start so don't get it twisted.

Last week the DevPlebs talk about: Our 22 followers on Spotify! Our terrible financial situations! What we would do if we woke up beside a strange, large sack of cash! The Canadian $1000 bill! Drug money! Our awful podcast hosting service! Iceland's government selling the country's DNA! Being taller than 5'8"! Being tech adjacent! Not bothering to compete with technical podcasts! Thousands of people listening to this episode! The time Phil was a Lead E-Commerce Developer! EXTREME PROGRAMMING! The new Star Wars trilogy killing the Jedi job title! Large amounts of cringe! Becoming an alchemist! Phil actually being Star Wars kid! Phil almost throwing a metal pole like a javelin through the skull of a customer! Thomas Hobbes being kind of a dick! Phil becoming a Magento Solutions Architect! A lot (I mean a LOT) of hate for Magento 2!

## Listen to The Full Episode!
{% spotify spotify:episode:0c2Ga52by1ZO4TPNeSjfrY %}

**We're also on...**
**Apple Podcasts:** https://podcasts.apple.com/us/podcast/12-the-incredibly-peculiar-world-of-job-titles-in-tech/id1485252900?i=1000465600697

**Google Music Podcasts:** https://play.google.com/music/m/Dmvzgaiqnitzdruen4hhnactn5a?t=12_The_Incredibly_Peculiar_World_Of_Job_Titles_In_Tech-Friday_Night_Deploys

**Our Website:** https://www.devplebs.tech/friday-night-deploys/12-the-incredibly-peculiar-world-of-job-titles-in-tech/

## Get In Touch With Us!
If you would like to share some wacky tech job titles you've come across that you want us to read out in the next episode you can reach us at the following...

**Twitter:** [@DevPlebs](https://twitter.com/DevPlebs).
**Email:** deadbeats@devplebs.tech

## Follow Our Twitters... If You Want!
[DevPlebs](https://twitter.com/DevPlebs).
[Keith Brewster](https://twitter.com/brewsterbhg).
[Phil Tietjen](https://twitter.com/phizzard).

You can also ask questions or give us some feedback about the show!
I made a commandline python script to glitchify images and make GIFs!
Published: 2020-02-21 16:03:56

Make glitched GIFs and images from the comfort of your commandline!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lsdg9p7gs2hw2jeoglip.gif)

Check it out [here](https://github.com/TotallyNotChase/glitch-this)!

The `README` contains the full quickstart guide.

Please consider starring, if you like it!
Introducing The Loosely Coupled Show: Architecture And Design Video Chat / Podcast
Tags: webdev, architecture, podcast
Published: 2020-02-21 16:03:23

---
title: Introducing The Loosely Coupled Show: Architecture And Design Video Chat / Podcast
published: true
description: The Loosely Coupled Show is a new video chat / podcast that will help introduce advanced software design and architectural topics in a conversational format.
tags: #webdev #architecture #podcast
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/aj5c0scz1ityghg598lx.PNG
---

Are you an intermediate or senior web developer? 

Do you recognize that learning about more higher-level and advanced design topics around structuring your software systems, software design, distributed systems, etc. are important and are required if you want to level-up in your career?

For example, our industry is quickly migrating all web-based software to "the cloud."

Do you know how to take advantage of the cloud? How would you even begin to start thinking about how to migrate an existing system to the cloud? Or design a new system well?


Derek Comartin (@codeopinion) and I have started a new video chat / podcast that will help introduce these topics in a conversational format.

We'll have friendly chats about these topics, talk about our own experiences, maybe do some mock design use-cases and, of course, will chat with recognized industry experts from time-to-time.

Check out our first introductory episode, like it and subscribe if you're interested in joining us!

[Check it out here!](https://www.youtube.com/channel/UCNX9EQV4aEfa6fa9o6qcdEQ)
Visualization in Jupyter
Tags: jupyter, visualization, amcharts, techanjs
Published: 2020-02-21 15:55:44

Recently, I tried to load techan.js (http://techanjs.org/) in a Jupyter notebook javascript kernel. However, it failed to load since techan.js is made in commonJS format. Jupyter javascript kernel inherently uses requirejs(https://requirejs.org/) which support es6 based modules. 

One of good PRs is https://github.com/andredumas/techan.js/pull/220 which converts the current commonJS system to ES6 module system. Therefore, I cloned it and changed some codes in order to be compatible with requirejs.

{% gist https://gist.github.com/hkmoon/baa4926c5650638cbec7fe5d6693103a %} 

The output of the above cell is the cover image.


In addition, I noted how to embed amcharts(https://www.amcharts.com/) which is quite useful for visualization in Jupyter notebook as well.

{% gist https://gist.github.com/hkmoon/aa4041d59f297560e1a65ac2ee124c72 %} 

The output of the amChart cell in Jupyter:

![AMChart in Jupyter](https://dev-to-uploads.s3.amazonaws.com/i/edpzx2t9rrdfiit7rmrb.png)

Please, enjoy the visualization in javascript inside Jupyter notebook.

Also, let me know if you need any helps to embed nice modules in Jupyter notebook.
Random nummers in Python (Dutch)
Tags: python, beginners, dutch, nederlands
Published: 2020-02-21 15:53:05

In <a href="https://python.org">Python</a> kunt u met de random module willekeurige getallen genereren. Om deze module te laden gebruikt u de regel

```python
    import random
```

Voor het genereren van 10 getallen tussen 1 en 10 kunt u gebruik maken de `randint` method:

```python
import random

for x in range(10):
    print(random.randint(1,11))
```

*dit zijn pseudo-random getallen*

Het laagst mogelijke getal hier is 1 en het maximum getal 10. De for loop wordt gebruikt om dit 10 keer te herhalen.

Als je in plaats van random gehele getallen, komma getallen wilt, kun je de method uniform() gebruiken zoals in <a href="https://pythonbasics.org/random-numbers/">dit voorbeeld</a>

## Random voorbeelden

Om een groter aantal random getallen te krijgen, kunt je de for-loop gebruiken. Bv  je wilt 20 nummers genereren:

```python
import random

for x in range(20):
    print(random.randint(1,11))

```

Voor 50 nummers te genereren:

```python
import random

for x in range(50):
    print(random.randint(1,11))
```

Om getallen tussen 1 en 100 te krijgen kunt je gebruik maken van `randint()`:

```python
print(random.randint(1,101))
```

of in een oplossing met een for loop

```python
import random

for x in range(50):
    print(random.randint(1,101))
```

**Gerelateerde links:**
* <a href="https://docs.python.org/3.8/library/random.html">Python documentatie over de random module</a>
* <a href="https://pythonspot.com/random-numbers/">Meer random voorbeelden</a>
* <a href="https://pythonspot.com/">Learn Python</a>
Adding a Phaser game to an Angular App
Tags: angular, phaser, gamedev, typescript
Published: 2020-02-21 15:49:04

A few months ago, I posted a tutorial to Medium walking through how to setup [Phaser](https://phaser.io/) in an [Angular](https://angular.io/) application.

{% medium https://medium.com/@braelynnn/using-phaser-in-an-angular-8-component-53644a2280e3 %}

Since then, I have added 2 more pieces to the series: 

{% medium https://medium.com/@braelynnn/phaser-game-settings-using-localstorage-1cf6a9fa6f2c %}

{% medium https://medium.com/@braelynnn/extending-a-phaser-class-to-make-reusable-game-objects-93c11326787e %}

After realizing how obnoxious the Medium paywall can be, I have disabled it for my stories and they are free to read for everyone.

Feel free to let me know what you think!
Using Context processor in Django to create dynamic footer
Tags: django, python, beginners
Published: 2020-02-21 15:39:45

##Intro to Context Processor

Hi all,

We can all agree that we have come across request.user in a django project. Have you ever wondered what it was ? Well, its an inbuilt context processor.

A context processor is a function that accepts an argument and returns a dictionary as its output. In our case, the returning dictionary is added as the context and the biggest advantage is that, it can be accessed globally i.e, across all templates. While this might seem too complex or hard to achieve, its actually not the case and it is very simple to implement.

So, today we will look into building a dynamic footer using the context processor - a footer which can render the year dynamically, pretty convenient, when you dont have to change your source code every year. I'm assuming you have a django project and an app already built.

###Building a dynamic footer using context processor

First, you need to create a file named context_processors.py. Here we will add the following code.

```python
import datetime

def get_current_year_to_context(request):
    current_datetime = datetime.datetime.now()
    return {
        'current_year': current_datetime.year
    }
```


Second, you need to specify your context processor in your settings file.

```python
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                'myapp.context_processors.get_current_year_to_context', # <-- Add your context processor
            ],
        },
    },
]
```

Thats it. Your context processor is now ready to be used in your templates and it can be accessed using the key that we specified 'current_year'. So, to create a dynamic footer section, all i need to do is.

```html
    Copyright {{ current_year }} - Heinek Halwin
```

Run your project and you can see that the year is now visible as the current year. Have fun using this in your projects.

Have a great day !
Improving Testing through Testing Debt Quadrants
Tags: testing, devops, agile
Published: 2020-02-21 15:34:52

In this article, I'll talk about the testing debt concept and how you can visualize it using the Testing Debt Quadrants.

The quadrants are used as a starting point for discovery and discussion about your testing "pains"; it's also a framework to find some possible solutions and prioritize them, thus improving your overall testing.

https://www.sergiofreire.com/post/improving-testing-through-testing-debt-quadrants
Verschil tussen Null, Nul en None (Dutch)
Tags: python, beginners, dutch, nederlands
Published: 2020-02-21 15:27:35

De keywords *Null* en *None*. Als je nieuw bent in de wereld van het programmeren, denkt je misschien dat Null en None hetzelfde betekenen, maar dat is niet het geval. Op het eerste gezicht lijken ze op elkaar, dus wat is het verschil?

In veel programmeertalen (C, Java, SQL, JavaScript) is er een Null waarde. Soms is het expliciet geschreven als NULL of null. 

In <a href="https://python.org">Python</a> bestaat er geen `null` waarde.

```python
>>> x = null
Traceback (laatste oproep):
  Bestand "<stdin>", regel 1, in <module>
NameError: naam 'null' is niet gedefinieerd
>>> 
```

## Het None type

In plaats daarvan is er het None-object (de komische benaming niet object). None betekent in feite dat er geen waarde is (of dat het "leeg" is). In principe is NoneType een gegevenstype, net zoals int, float, etc.

U kunt een type zien met behulp van de functie `type()`

```python
    >>> print(type(int))
    <class 'type'>
    >>> print(type(float))
    <class 'type'>
```

Dat zie je ook bij het type None:

```python
    >>> print(type(None))
    <class 'None-type'>
```

## Wijs geen waarde toe

U ziet hierboven een <a href="https://pythonbasics.org/class/">object (klasse)</a>, in Python heeft dit None-object nooit functionaliteit. Laten we een variabele definiëren met de None waarde

```python
    twaalf = None
    print(twaalf is None)
```

Bekijk het resultaat

```python
    >>> twaalf = None
    >>> print(twaalf is None)
    True
    >>> 
```

None betekent geen waarde, niet de waarde nul is.

```python
    >>> print(twaalf == 0)
    False
```

## Verschil tussen None en nul 

Hoewel er geen null waarde is in Python, kun je None als null gebruiken. 

```python
    >>> x = None
    >>> if x None is:
    ...     print ('x is null')
    ... else:
    ...     print('x is niet null')
    ... 
    x is null
```

## None, is dat altijd niks?

Kun je None herdefiniëren om een waarde te hebben? Nee, dat kan niet.

```python
    >>> None = 1
      Bestand "<stdin>", regel 1
    SyntaxError: kan niet worden toegewezen aan trefwoord
```

Wees gerust, de waarde van None is altijd leeg/niks.


**Gerelateerde links:**
* <a href="https://docs.python.org/3.8/library/constants.html?highlight=none#None">Python docs over null en none</a>
* <a href="https://pythonbasics.org">Learn Python</a>
How I made a simple landing page with nextjs, react and typescript
Published: 2020-02-21 15:23:08


### Corporate Landing Page in React

Note I'm aware this website is less than optimial on mobile devices, I think this is a microsoft issue, or I imported the wrong fabric css files.
#### Lessons Learned

* CSS in js
* Animations
* Nextjs + Typescript
* Intersection API (love react-intersection-observer)
* More complex Typescript based React Components (See Carousel)

Although I had experience using Typescript on the backend, Typescript + React had a bit of a learning curve.

The is mainly a learning project for me, learning how to add key animations and use css in js via react.
Learned don't use git lfs if you are serving files from a static site generator, only binaries, not required to run repo.


Using microsoft fabric and server side rendering is a bit of a pain. I learned that you need to use commonjs for server side rendering so that the node environment and the browser environment can interpret the code.

#### References

Various articles helped me figure out how to do certain things

* [Adding Aliases in typescript Project](https://dev.to/oahehc/how-to-config-react-project-with-next-js-typescript-tslint-and-jest-11l0)
* [Using Context API as a Theme Provider](https://codeburst.io/global-state-with-react-hooks-and-context-api-87019cc4f2cf)
* [Should have read before spending 3 hours trying to configure office fabric](https://github.com/OfficeDev/office-ui-fabric-react/wiki/Server-side-rendering-and-browserless-testing)


See https://github.com/FriendlyUser/react-corp-page


See the example at https://react-corp-page.now.sh/
Daily Challenge #193 - What's the Real Floor?
Tags: challenge
Published: 2020-02-21 15:22:26

---
title: Daily Challenge #193 - What's the Real Floor?
published: true
series: Daily Challenge
description: Americans are weird sometimes. 
tags: challenge
---
###Setup
Americans can be weird sometimes. The first floor of a building is typically referred to as the ground floor. In some American buildings, there is no 13th floor because of old superstitions. 

Implement a function that takes an American floor passed as an integer and returns the actual floor number. Your function should also work for basement floors.

###Examples
getRealFloor(1) == 0 
getRealFloor(0) == 0
getRealFloor(5) == 4
getRealFloor(15) == 13
getRealFloor(-3) == -3

###Tests
getRealFloor(3)
getRealFloor(7)
getRealFloor(20)
getRealFloor(1)
getRealFloor(-6)

Good luck!

***
_This [challenge](https://www.codewars.com/kata/574b3b1599d8f897470018f6) comes from acadet 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!_
Helm & Nexus: Steering Towards Faster Deployments in 3.21
Published: 2020-02-21 15:16:18

The Nexus team is fully rigged as we steer into a big year for new features and releases in 2020! We are excited to announce the official release of Nexus Repository 3.21, stacked with new formats including native support for Helm in both Nexus Repository Pro and our free version Nexus Repository OSS. Nexus Repository now offers the ability to configure both hosted and proxy Helm Chart Repositories.

The Helm Package Manager allows you to manage Helm Charts which are collections of files that describe a related set of Kubernetes resources. The portability and extensibility of Kubernetes in automating containerized application deployments has effectively enabled organizations and DevOps teams to trade in their sails for a 3,000 horsepower turbojet.

//Nexus Universal Binary Management for Helm Charts

Focused on supporting developers in the most popular ecosystems for universal binary access and control, the Nexus team continues this journey by centralizing and simplifying operations for Helm and Kubernetes users. By using Nexus to proxy or host Helm Chart repositories, you can now gain all of the benefits of using a binary repository manager for your CI/CD workflows.

A Helm repository in Nexus Repository allows users to configure, share, and deploy Helm Charts across the organization. When Nexus users create proxy or hosted repositories for Helm Charts on Nexus Repository, developers are no longer dependent on getting these components from the public Helm registry. Storing Helm Chart repositories with Nexus Repository provides the benefits of:

*Increased build performance from locally caching your Helm Chart dependencies
*Extensive search capabilities for finding Helm packages
*Sharing Helm packages across internal teams with hosted Helm Chart repositories
*Removing the need for network connection between external Helm packages

//Open-Source and Built for Enterprise

Sonatype is well respected in the industry for being stewards of open-source software. We maintain and support the Central Repository and provide one of the most robust open-source binary repository managers, Nexus Repository OSS. For teams and organizations needing high-performance availability, dynamic storage capabilities, enhanced component intelligence for security vulnerabilities, and enterprise support, Nexus Repository Pro will be the central core to scale your organization for truly automating open-source governance.

//Cruising From Community to First-Class Support

In addition to Helm support, the release of Nexus Repository 3.21 now also supports P2 and NuGet V3 proxy repositories for both Nexus Repository Pro and our free version Nexus Repository OSS. Both Helm Charts and P2 repositories were originally supported via community extensions, but the Nexus product team is continuing to invest in our developer ecosystems to deliver the highest quality native support for these formats.

For further Nexus release details and any questions you may have, refer to www.sonatype.com and head over to the Nexus community!


Cheers!
Sonatype Nexus Team
Feb. 21, 2020: What did you learn this week?
Tags: weeklylearn, discuss, weeklyretro
Published: 2020-02-21 15:14:59

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

![Show host saying "Never stop learning!"](https://media.giphy.com/media/xT0xest8YPRcpugzQs/giphy.gif)

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}

And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{% link https://dev.to/jess/what-was-your-win-this-week-1o9d %}

![Little kid on Jeopardy answering a question correctly](https://media.giphy.com/media/2sXf9PbHcEdE1x059I/giphy.gif)