teleren/devto huggingface dataset:
(Dead) Snakes on a… Debian System
Tags: python, linux, devops, debian
Published: 2020-03-10 14:18:37

> *Build Python 3.6 / 3.7 / 3.8 Debian packages for both Stretch and Buster*

The [Deadsnakes PPA](https://github.com/deadsnakes) project originally built older Python versions for Ubuntu, so you could e.g. run unit tests on a new Ubuntu release using a Python version found on older releases (i.e. the ‘dead’ snakes).

Nowadays, the project also builds *newer* Python versions ahead of what a certain release offers as its default.

The packages contain the minor Python version in their name (e.g. `python3.6`) and can thus be installed concurrently to the default `python3` ones. Originally based on the Debian source packages, they can also be used on Debian and not just on Ubuntu.

The build script and Dockerfile [found here](https://github.com/jhermann/ezpy/tree/master/deadsnakes#readme) build packages for some Debian releases in their related Docker base images.

Based on this, *Python 3.6* can be installed for all of Stretch, Buster, and Xenial, as a set of the usual core Python packages (`python3.6`, `python3.6-venv`, `python3.6-dev`, …). Note that Bionic comes with 3.6 as a default.

The same goes for *Python 3.7*, with Buster having it as a default.

*Python 3.8* is an add-on for all the (old-)stable releases (as of March 2020). Using this version makes the most sense to me, unless you have special needs forcing you to go to 3.7 or 3.6. Being an add-on everywhere ensures a similar experience regarding any quirks you encounter, and it is (right now) the newest stable version of Python. It also fits best what you get when using Docker's `python:3-slim-buster` right now.

> *[This post originally appeared on my personal blog.](https://jhermann.github.io/blog/python/deployment/2020/02/26/deadsnakes_on_debian.html)*
On.NET Episode: Building up open source developer communities in the Dominican Republic
Tags: dotnet, community, opensource, caribbeandevelopers
Published: 2020-03-10 14:15:17

User groups are an essential part of software development culture. Starting a user group and building a community is not an easy task. Keeping your group running can be even harder.

In this episode, Scott chats with Andres Pineda about getting started with open source and how he helped kickstart the .NET user groups in the Dominican Republic.

> Why not leave a comment below and tell the dev.to community about your experiences in your own developer communities 😊

{% youtube 5U2s47IAQlQ %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [.NET Meetups and User groups](https://dotnetfoundation.org/get-involved)
* [Become a social Developer](https://getinvolved.hanselman.com/)
* [Caribbean Developers Conference](https://cdc.dev/)
Antai - Anti AI
Tags: python, machinelearning, opensource, gitlab
Published: 2020-03-10 14:11:48

# Introduction

Welcome to Antai, which is a word that I conveniently made up by mashing **Anti** and **AI**. What it is, is basically just that, Anti-AI.

The story begins in the final years of my study. I had moved to Amsterdam and was pursuing an MS in Particle Physics and Cosmology. I was working on my graduate thesis (using python and Golang) when I was introduced into machine learning and the associated problems with it. Suffice to say, mathematics was _not_ one of them. 

Many of my classmates were integrating their physics based knowledge to the new kid on the block, ML and designing generative models for neural networks. Thankfully, I got drawn into their discussions with these systems. Most of these discussions had moral and ethical undertones. Some of the questions that came up during those times were:

1) The NN is a black box. We do not really understand each and every aspect of the model, then how can we be sure that things do not go wrong ?
2) If most of the technologies that we use (Pytorch, Tensorflow etc.) are maintained by giant corporations with a profit motive, how can we bring accountability to such technologies?
3) AI and ML is here to stay. How can we make it future proof? and also pave the way for next generation state-of-the-art NN models?
4) How to make ML accessible (safely) to the general public?

My answer to all the above was [Antai](https://antai.nl/). The only way we could even think about safely going forward with AI systems is to have a centralised, open source entity to regulate, check and even break AI systems. 

Being Open-source brings trust from the users, the ability to break AI systems brings accountability to such systems with the added benefit of knowledge. 

# Outlook

Currently, the main repo of the project is hosted on Gitlab and the website is on Github. There I explain the various goals of this project.

To make this project viable, usable and accountable, we need more people to work on it, contribute and or complain about our ideals and help us grow into one of the standards of the internet.

To contribute:
- the Antai website repo: https://github.com/antai-nl-base/antai-web **update** the website is down due to lack of usage and resources :sweat:

- the Antai core repo: https://gitlab.com/athulmul/antai
Deploy a castlemock mockserver on Kubernetes with helm.
Tags: helm, kubernetes, castlemock, macos
Published: 2020-03-10 14:01:57

---
title: Deploy a castlemock mockserver on Kubernetes with helm.
published: true
description: Tutorial about helm and castlemock mockserver on MacOs
tags: helm, kubernetes, castlemock, macOs
---

## Table Of Contents
   * [What is a mockserver?](#mockserver)
   * [Docker/Kubernetes on MacOs](#macOS)
   * [Install castlemock with Helm](#installhelm)
   

_This is my first post ever_

### What is a mockserver? <a name="mockserver"></a>

A mock server is actually a fake API that simulates a real server response. There are many articles about certain open source solutions like [mockserver](https://medium.com/billie-finanzratgeber/mock-server-save-time-and-money-during-development-and-testing-bf1d74364d84) or about the general concept of [mocking APIs](https://medium.com/@kapil.aggarwal1/api-mocks-and-why-should-we-care-418b24c35c25)

Why should a team use a mock server in their development lifecycle? There could be two good reasons :
- Simplify testing
- Decoupling development teams

After we noticed a tight coupling behavior between a product team and my team, I decided to deploy a mock server to reduce the dependencies between the team. The mock server should have the following properties:
- could be used for automation tests as well as for manual tests
- Easy setup and maintenance by the business analyst
- can process REST as SOAP requests

I found out that there are a lot of open source solution for mocking api. From [mock-server](http://mock-server.com) to [castlemock](http://castlemock.com)

### Install Docker and Kubernetes on MacOs <a name="macOS"></a>

This is pretty easy. 
The following steps can help you with:
- Download [Docker-Desktop](https://www.docker.com/products/docker-desktop)
- Install Kubernetes from Docker-Desktop

When that's done, all you have to do is pull the latest version of castlemock from Docker Hub :
   
     docker pull castlemock/castlemock

If everything works, install Helm using the following commands :

     brew install helm

It's all.


### Install castlemock with helm <a name="installhelm"></a>

Assuming Docker, Kubernetes and Helm are install and running. Do the following steps: 
- git clone https://github.com/3logy/castlemock-helm
- helm install castlemock ./castlemock/

So easy it's when working with [Helm](http://helm.sh/).


Many thanks to Muhammad Hewedy :+1: , who helps me on Twitter to get into Castlemock deployment on Kubernetes.
Easy refactor ternary conditions to if else
Tags: ternary, javascript, babel
Published: 2020-03-10 13:51:27

---
title: Easy refactor ternary conditions to if else
published: true
description: Tool for helping you refactor ternary conditions to if else
tags: ternary, javascript, babel
---

Have you ever had a pain on understanding ternary conditions put in the code by others colleagues that have left the project?

Well, if you think understanding a simple ternary it's easy for you, look at the following example:


```js

const [a1, a2, a3] = [true, 3, true];

const a4 = 0;
const [a5, a6, a7] = [false, 2, false];

const result = a1 ? a4 : a2 ? a4 : a5 ? a6 : a7 ? a4 :
  a5 ? a6 : a7 ? a4 : a5 ? a6 : a7 ? a4 : a5 ? a6 : a7;

console.log(result);

```

What will be the value of `result`?
Take your time....
.............
...........
.........
.......
.....
...
..
.
R: `0`

Now imagine that we have a lot more expressions and not just numbers and booleans. Yeah, not the best day of changing something in the old codebase.

But there is a package that auto refactors to an `IIFE(Immediately Invoked Function Expression)` easy and more readable.

[Its a babel plugin wrote a while ago](https://opengg.github.io/babel-plugin-transform-ternary-to-if-else/)

Now, after using ternary to if else we get:

```js
var a = function () {
  if (a1) {
    return a4;
  }

  return function () {
    if (a2) {
      return a4;
    }

    return function () {
      if (a5) {
        return a6;
      }

      return function () {
        if (a7) {
          return a4;
        }

        return function () {
          if (a5) {
            return a6;
          }

          return function () {
            if (a7) {
              return a4;
            }

            return function () {
              if (a5) {
                return a6;
              }

              return function () {
                if (a7) {
                  return a4;
                }

                return function () {
                  if (a5) {
                    return a6;
                  }

                  return a7;
                }();
              }();
            }();
          }();
        }();
      }();
    }();
  }();
}();
```


Enjoy and keep on coding!
What I learned from GSI Maps Vector style.json
Tags: unvt
Published: 2020-03-10 13:44:26

Here are quick notes from what I learned from [GSI Maps Vector style.json](https://dev.to/hfu/style-json-of-gsi-maps-vector-2oak).

# Sources
- Vector tiles are from https://maps.gsi.go.jp/xyz/experimental_bvmap/{z}/{x}/{y}.pbf
- Font data (glyph) are from https://maps.gsi.go.jp/xyz/noto-jp/{fontstack}/{range}.pbf, which means they are using noto-jp.
- From separate research, the icons (sprite) are from https://maps.gsi.go.jp/vector/sprite/std.json and https://maps.gsi.go.jp/vector/sprite/std.png

# Fonts used
`NotoSansCJKjp-Regular`. Because they are using a relatively old version of the Mapbox GL JS, the font data are downloaded and then rendered. 

# Layers
A lot of layers are there. 

# Style
They are not using modern expressions. With modern expressions, you can rewrite filters like 
```
filter: [
  "all",
  [
    "==",
    "ftCode",
    7541
  ]
]
  
```
into
```
filter: [
  "match",
  [
    "get",
    "ftCode"
  ]
  [
    7541
  ]
  true
  false
]
```
Azure AD / .NET Core 3.1 / Web API
Tags: azure, angular, netcore31
Published: 2020-03-10 13:33:58

If you are struggling with .NET Core 3.1 and Azure AD hookup (Cloud Authentication) in a Web API solution, [here's the answer](https://stackoverflow.com/questions/60571942/azure-active-directory-asp-net-core-3-1-we-couldnt-sign-you-in-please-try-aga/60618456#60618456). 

Don't feel bad, because as of 3/10/2020 there are no examples and the configuration services tool is not updated yet (so don't use it to replace the Startup.cs file).  Then keep in mind that anything Security related is a career unto itself.

**Note**
Core 3.1 no longer uses Services configurations of type ADDMVC or MVC routing. You must use the new ADDENDPOINTS construct.

The Web API templates do not yet use the proper startup templates. You must manually change the startup configs.

You must add this assembly to the solution 

*Microsoft.AspNetCore.Authentication.AzureAD.UI;*

Just look for Azure AD in Nuget.

If you use the built in "Connected Services helper" do not click yes to "want to update startup.cs".  Just follow the article above.

Finally, good luck if you can't get it to work because debugging these types of issues is a long painful slow endeavor.  After all, it's all secret..
Check a DNS record value on macOS using the command-line
Tags: dns, letsencrypt, cli
Published: 2020-04-19 01:34:36

---
title: Check a DNS record value on macOS using the command-line
published: true
date: 2020-03-10 13:28:30 UTC
tags: DNS,Let's Encrypt,CLI
canonical_url: https://ianwalter.dev/check-a-dns-record-value-on-macos/
---

![Check a DNS record value on macOS using the command-line](https://images.unsplash.com/photo-1531547629769-f2e504fe4521?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=2000&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ)

I was manually renewing a SSL certificate with Let's Encrypt using DNS verification and needed to verify that the DNS record had been updated before continuing the process:

```
host -t TXT <domain>
```

Make sure to change `TXT` to whatever record type you're looking for, e.g. `CNAME`, `A`, etc.
Codeigniter4 Requirements
Tags: codeigniter, php, programming
Published: 2020-03-10 13:19:20

[Codeigniter4](https://codeigniter4.github.io/userguide/index.html) is officially launched with major changes on 24.02.2020

**Codeigniter4 Server Requirements**

Codeigniter now requires [PHP 7.2 ](https://www.php.net/releases/7_2_0.php)or newer version

**Extensions**

Codeigniter4 requires *php-json*, *php-mbstring*, *php-mysqlnd*, *php-xml* extensions installed on server.

**Libraries**

To use [CURLRequest](https://codeigniter4.github.io/userguide/libraries/curlrequest.html), [libcurl](https://www.php.net/manual/en/curl.requirements.php) should be installed.

[Read more posts on](https://twitter.com/shoiabakbar/status/1237362396739624961)
Useful "advanced" commands in 2 minutes - Git Bisect
Tags: git, beginners, codenewbie, debugging
Published: 2020-03-10 13:16:29

Hey 👀✨

Welcome to Useful "advanced" commands in 2 minutes. Let's be quick about this. Have you ever introduced a bug, and noticed 5 commits after, without knowing where did you put added that bug to the code?

That's where **git bisect** will help you (a lot!).

![Let's GO](https://i.giphy.com/media/l0HU2DVgTzcuh2WT6/giphy.gif)

So, how does this work?:

First, you need to go to the last commit where you have this bug present somewhere around the code, let's say you are in the *master* branch.

Then you are going to write in your console:

`git bisect start`

Nothing will happen after you tell the system the hash of the commit that has the error, by saying: 

`git bisect bad hashofthebadcommitas489sf0`

and you also need to tell the system a commit where the code was working as expected, like:

`git bisect good hashofthegoodcommiteoiwi30ea`

Bisect then will prompt a message like this:

`Bisecting: 3 revisions left to test after this (roughly 2 steps)
[cc6a1e3f00cf5360c3bae687fdcf21f1c111accd] Commit message that you wrote`

Now, it's time to test, go to that part of the website/app where you have the error, and check whether you still have the error or not.

If you don't have the error, you will write `git bisect good`, if you DO have the error, write `git bisect bad`

![Bad boy bisect](https://media.giphy.com/media/lzjFRULTTw8mY/giphy.gif)

After you choose one of these options, git bisect will automatically checkout to another commit, where you'll have to do the check again, is everything good? bisect good, else, bisect bad.

Until you reach the last possible commit to check, where, after you make the last decision, git will tell you this.

`ed4d268d1ec7039bc6b5e4ee7c4ce28sbc3af30 is the first bad commit
commit ed4d268d1ec7039bc6b5e4ee7c4ce28sbc3af30
Author: Antonio Djigo <antonio@greatest-developer.eu>
Date:   Tue Mar 10 11:59:06 2020 +0000`

`Add new functionality where for sure I won't break anything`

And there you have it! Now you know which commit was the first one that introduced the bug, so you can fix it ASAP!

![Ahá!](https://media.giphy.com/media/3orieUe6ejxSFxYCXe/giphy.gif)

You can follow me so you are tuned to whenever I post something through my [Twitter](twitter.com/brownio) account, hope you liked it!
Applying Classes Conditionally in React
Tags: react, javascript
Published: 2020-03-10 13:10:06

in this example, I have an iterated list of data and i want to apply a class if the index of iteration is even. 

so, here is a solution,

```javascript
data.map((item, index) => {
   return (
     <p key={index} className={ index%2==0 ? "filled" : "no-filled" }> 
       {item.name}
     </p>
   );
})
```
The Building an Indie Business- How to Live-Streaming Podcast Recordings
Tags: podcast
Published: 2020-03-10 13:09:24

In this episode I discuss live-streaming podcast recordings. In the episode I go over why people should live-stream their podcast recordings, how to live-stream, tips to creating a better live-stream experience, and problems I have discovered while live-streaming

https://overcast.fm/+RG5iW5e4U
[Revenue Research](https://revenueresearch.co/)
[Episode Page](https://baib-podcast.com)
iterate the data in list using reactjs
Tags: react, javascript
Published: 2020-03-10 13:03:27

let's suppose you have an array of objects contains the data.

javascript es6 onwards have .map() method that actually works like magic for you to iterate, filter and much more to do. so

```javascript
 data.map((item, index) => {
   return (
     <p key={index}>{item.name}</p>
   );
})

```
Regulated hybrid securities and digital assets exchange
Tags: blockchain
Published: 2020-03-10 13:02:06

Regulated hybrid securities and digital assets exchange

The challenge

The Adara team came to us with the idea of creating an intelligent blockchain ecosystem, which enables anyone to easily buy, trade and sell a range of altcoins and tokenized services. Our task was to develop web service that would allow the startup to conduct ICO campaign to raise funds for a new project.

https://evrone.com/adaraio
Paradox of scale: why Netflix couldn't build Netflix
Tags: todayilearned, startup, architecture, programming
Published: 2020-03-10 13:00:23

*TL;DR notes from articles I read today.*

### [The paradox of scale](http://bit.ly/2TD8Eri)

> Gall’s Law: A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system.

- What works for small simple systems is significantly different for what works for large complicated systems. 
- Things that seem crucial for building high-quality production systems, like the ones large tech companies use, are mostly not required when you are starting out building new products. 
- To build large systems, you need to start with small steps to build small systems. ‘Think big, start small, find a foothold and start journeying’ is how any large system starts getting built. 
- Looking at what the giants do and trying to copy it is only a good way to fail. Instead, learn lessons from how they started, what they did along their journeys (and why they did it) 

*[Full post here](http://bit.ly/2TD8Eri), 4 mins read*

---

### [The cracking monolith: the forces that call for microservices](http://bit.ly/2TSNMLx)

- Overweight monoliths exhibit degrading system performance and stability, or slow development cycles, or both.
- Single points of failure are typical of large monolithic apps and when they come under pressure, your team spends too much time solving technical issues instead of on development. For example - outages in non-critical data processing that bring down the whole system. Or all time-intensive tasks grouped into the background and becoming so unstable as to need a dedicated team. Or changing one part of the system affects others that should logically be unrelated. 
- If shipping a hotfix takes weeks or months, you will have a problem with slow development. To know when it is a good time to break the monolith, you should watch out for:
    - CI builds that take longer than 10 minutes (though a good CI tool should help it by splitting or auto-sequencing tasks).
    - Slow deployment, due to many dependencies and multiple app instances, especially when containerized.
    - Slow onboarding of new staff as it may take them months to get comfortable enough to make a non-trivial change to the codebase. Veteran team members becoming a bottleneck as reviewers because too many developers are waiting for their inputs.
    - New use cases and problems are not easily addressed with existing tools, and software updates are being put off, indicating you are dependent on outdated technology.    

*[Full post here](http://bit.ly/2TSNMLx), 6 mins read*

---

*[Get these notes directly in your inbox every weekday by signing up for my newsletter, in.snippets().](https://mailchi.mp/appsmith/insnippets?utm_source=devto&utm_medium=post08&utm_campaign=is)*
Daily Developer Jokes - Tuesday, Mar 10, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-03-10 13:00:13

---
title: "Daily Developer Jokes - Tuesday, Mar 10, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Tuesday%2C%20Mar%2010%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258884db70.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What do you call a busy waiter?

___A:___ A server.
 -->
AWS Session Manager: Get rid of SSH Bastion Hosts, cut costs and improve remote-connection security
Tags: aws, bastion, sessionmanager, cloud
Published: 2020-03-10 12:52:50

---
title: AWS Session Manager: Get rid of SSH Bastion Hosts, cut costs and improve remote-connection security
published: true
description: How to get rid of SSH Bastion Hosts, cut costs and improve remote-connection security
tags: AWS, bastion, sessionmanager, cloud
cover_image: https://assets.mkdev.me/posts/covers/000/000/012/original/mkdev_article.png
---

In this video Kirill Shirinkin will talk about AWS Session Manager: you will see how it can help you to reduce costs, maintain fewer servers while improving overhaul security and observability of your infrastructure.

{% youtube ztxljFc2h2U %}

***

*You can always hire [our DevOps mentors](https://mkdev.me/en/specializations/devops) and learn directly from them!*