teleren/devto huggingface dataset:
Democratizing Access to Artificial Intelligence
Tags: twiliohackathon, machinelearning, datascience, africa
Published: 2020-04-24 01:14:12

Hello, Twilio hackers! I'm a little late to the party, but there's still a week left in the hackathon. So why not put a submission in? 

While I was traveling to visit my family in Sénégal, West Africa, the whole Covid-19 mess happened. Instead of sitting idle and not do anything, I decided to do a Machine Learning bootcamp at [Vivadata](https://www.vivadata.org) Dakar cohort and finally add some artificial intelligence to my arsenal. Boy, I'm glad I did!

Professor Andrew Ng was famously quoted for saying "Artificial Intelligence is the new electricity.". It's going to affect and improve every aspect of our lives. But access to this nascent and game-changing technology is fairly limited. It's still very specialized knowledge. What can we do to get it into the hands of the people who need it the most, like here in West Africa?

SMS is a great equalizer. You don't need the internet (only cellular connection is enough), and you certainly do not need a fancy super powerful phone. The idea is to build a simple enough API endpoint to serve Machine Learning models, then leverage the Twilio system to allow for any participants to get results back by sending messages to a specified Twilio phone number. I've seen some seemingly working prototypes out there, but they work like black boxes. We don't really know how they work. 

My goal with this hackathon is to utilize the Machine Learning knowledge I've recently acquired, to build an intelligent SMS system prototype from scratch and to open source it. Since there isn't much time left, let's get to work. 

Happy hacking!

Poster Photo by [Trevor Cole](https://unsplash.com/@trevcole) on [Unsplash](https://unsplash.com/)
A Walk Through of My Terminal Setup
Tags: productivity, webdev, todayilearned, windows
Published: 2020-04-25 04:12:53

---
title: A Walk Through of My Terminal Setup
published: true
date: 2020-04-24 01:05:11 UTC
tags: productivity,webdev,til,windows
canonical_url: https://www.aaron-powell.com/posts/2020-04-24-a-walk-through-of-my-terminal-setup/
---

Recently, I blogged about [how I setup a Windows dev environment](https://dev.to/aaronpowell/how-i-setup-a-windows-dev-environment-4ian) in which I talked about some of the specific tools I install to get things working on both PowerShell and WSL2.

On the back of it I was asked if I could show it off in action so I did a couple of quick videos where I walk through some of the setup that I have.

## WSL2 + VS Code

In this video I show off the basics of how I setup and use [tmux](https://github.com/tmux/tmux/wiki), which is a terminal multiplexer. Basically, this allows me to do a lot of really powerful things from the terminal such as split panes, run nested windows (kind of like tabs) and show some useful information about my machine. I also off the [VS Code Remote WSL](https://code.visualstudio.com/docs/remote/wsl?WT.mc_id=devto-blog-aapowell) extension which I use to do the majority of my work.

{% youtube V64KbADgwis %}

## tmux URL View Plugin

I did this video mainly because I was finding a particular tmux plugin, [urlview](https://github.com/tmux-plugins/tmux-urlview), so amazingly productive I just had to show it off. The plugin scans the terminal output for URLs and then will give you a list of them to launch into a browser (which I configure to be MS Edge back in Windows). I find it super handy if you're working with forks of GitHub repos as I can, with a few keystrokes, launch into the ‘New Pull Request’ screen one I push changes to my fork!

{% youtube 0tOuGXyOjDo %}

## Wrap Up

Like many of us, I'm starting to play around with streaming and other forms of “snackable” video content, so if there's anything you've been wondering about how I do dev, or any tools you've seen my show off in presentations that you want to know more about, do reach out and let me know as I'm happy to throw together a video that covers it off.
Gitlab CI script to deploy a Azure Function
Tags: azure, gitlab, dotnet
Published: 2020-04-24 00:52:58

Here is the `.gitlab-ci.yml` that I use to deploy my **.NET Core 3.1 azure functions** in Gitlab CI/CD.

Variables that I use in the scripts:
- **$APPLICATION_ID**
- **$APPLICATION_SECRET**
- **$TENANT_ID**
- **$FUNCTION_APP** your function app's name in azure

```yml
stages:
  - deploy

deploy:
  stage: deploy
  image: mcr.microsoft.com/dotnet/core/sdk:3.1
  script:
    - curl -sL https://aka.ms/InstallAzureCLIDeb | bash
    - apt-get install curl && curl -sL https://deb.nodesource.com/setup_12.x | bash -
    - apt-get install nodejs
    - npm install -g azure-functions-core-tools@3 --unsafe-perm true
    - az login --service-principal -u $APPLICATION_ID -p $APPLICATION_SECRET --tenant $TENANT_ID
    - func azure functionapp publish $FUNCTION_APP --csharp
  only:
    - master
```

Hope it's useful
Curso JSON - 6.1 Operaciones CRUD: Arreglos
Tags: spanish, vscode, node, javascript
Published: 2020-04-24 00:39:26

{% youtube Vet7CUaVhhg %}

Curso sobre JSON de novato a experto (**versión GRATIS**)
Presentación: https://slides.com/equimancho/json/#/6/7

Repositorio:
https://github.com/equiman/playground-json

Contadores (Mr. Timer):
https://www.youtube.com/channel/UCYo5An-3L_eOd1l5WQdU3oQ

---

**That's All Folks!
Happy Coding** 🖖

[![cerveza](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zle20oa7anpfjvap8n.png)](https://github.com/sponsors/deinacademy)
Curso JSON - 6. Operaciones CRUD: Propiedades
Tags: spanish, vscode, node, javascript
Published: 2020-04-24 00:37:16

{% youtube n01vlm2mV6w %}

Curso sobre JSON de novato a experto (**versión GRATIS**)
Presentación: https://slides.com/equimancho/json/#/6

Repositorio:
https://github.com/equiman/playground-json

Contadores (Mr. Timer):
https://www.youtube.com/channel/UCYo5An-3L_eOd1l5WQdU3oQ

---

**That's All Folks!
Happy Coding** 🖖

[![cerveza](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zle20oa7anpfjvap8n.png)](https://github.com/sponsors/deinacademy)
Curso JSON - 5.1 Objetos Literales
Tags: spanish, vscode, node, javascript
Published: 2020-04-24 00:32:19

{% youtube hjKDh-iCJtY %}

Curso sobre JSON de novato a experto (**versión GRATIS**)
Presentación: https://slides.com/equimancho/json/#/5

Repositorio:
https://github.com/equiman/playground-json

Como crear objetos desde variables:
https://dev.to/equiman/how-to-create-properties-from-variables-in-json-55of

Truthy & Falsy:
https://www.sitepoint.com/javascript-truthy-falsy/

Guía completa de desestructuración:
https://codeburst.io/es6-destructuring-the-complete-guide-7f842d08b98f

Contadores (Mr. Timer):
https://www.youtube.com/channel/UCYo5An-3L_eOd1l5WQdU3oQ

---

**That's All Folks!
Happy Coding** 🖖

[![cerveza](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zle20oa7anpfjvap8n.png)](https://github.com/sponsors/deinacademy)
Curso JSON - 5. Propiedades
Tags: spanish, vscode, node, javascript
Published: 2020-04-24 00:29:06

{% youtube ODGBmIIjarA %}

Curso sobre JSON de novato a experto (**versión GRATIS**)
Presentación: https://slides.com/equimancho/json/#/5

Repositorio:
https://github.com/equiman/playground-json

Curso recomendado de Visual Studio Code (Fernando Herrera):
https://cursos.devtalles.com/courses/visual-studio-code

Contadores (Mr. Timer):
https://www.youtube.com/channel/UCYo5An-3L_eOd1l5WQdU3oQ

---

**That's All Folks!
Happy Coding** 🖖

[![cerveza](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zle20oa7anpfjvap8n.png)](https://github.com/sponsors/deinacademy)
Curso JSON - 4.2 Conversiones: Parse
Tags: spanish, vscode, node, javascript
Published: 2020-04-24 00:27:34

{% youtube 2HzPNW2IUuU %}

Curso sobre JSON de novato a experto (**versión GRATIS**)
Presentación: https://slides.com/equimancho/json/#/4/12

Repositorio:
https://github.com/equiman/playground-json

Contadores (Mr. Timer):
https://www.youtube.com/channel/UCYo5An-3L_eOd1l5WQdU3oQ

---

**That's All Folks!
Happy Coding** 🖖

[![cerveza](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zle20oa7anpfjvap8n.png)](https://github.com/sponsors/deinacademy)
Curso JSON - 4.1 Conversiones: Stringify
Tags: spanish, vscode, node, javascript
Published: 2020-04-24 00:27:22

{% youtube iQXQdtv_iXc %}

Curso sobre JSON de novato a experto (**versión GRATIS**)
Presentación: https://slides.com/equimancho/json/#/4/6

Repositorio:
https://github.com/equiman/playground-json

Contadores (Mr. Timer):
https://www.youtube.com/channel/UCYo5An-3L_eOd1l5WQdU3oQ

---

**That's All Folks!
Happy Coding** 🖖

[![cerveza](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zle20oa7anpfjvap8n.png)](https://github.com/sponsors/deinacademy)
Elm Calculator Part 7 - Add Dirty State
Tags: elm, webdev, beginners, codenewbie
Published: 2020-04-24 15:22:39

---
title: Elm Calculator Part 7 - Add Dirty State
published: true
date: 2020-04-24 00:00:00 UTC
tags: elm, webdev, beginners, codenewbie 
canonical_url: https://pianomanfrazier.com/post/elm-calculator-book/07-dirty-state/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/u26mai0h3j5xcrz6tbis.png
series: Elm Calculator
---

_This post is part of a series. To see all published posts in the series see the tag ["elm calculator book"](https://pianomanfrazier.com/tags/elm-calculator-book/).If you wish to support my work you can purchase the book on [gumroad](https://gum.co/NwMtt)._

**This project uses Elm version 0.19**

- Part 1 - Introduction 
- Part 2 - Project Setup 
- Part 3 - Add CSS 
- Part 4 - Basic Operations 
- Part 5 - Adding Decimal Support 
- Part 6 - Supporting Negative Numbers 
- **_Part 7 - Add Dirty State (this post)_**
- Part 8 - Support Keypad Input 
- Part 9 - Combination Key Input 
- Part 10 - Testing 
- Part 11 - Netlify Deployment 

* * *

This allows users to overwrite the input area with a new number if the calculator is in a dirty state.

- **_browse:_** [https://gitlab.com/pianomanfrazier/elm-calculator/-/tree/v0.7](https://gitlab.com/pianomanfrazier/elm-calculator/-/tree/v0.7)
- **_diff:_** [https://gitlab.com/pianomanfrazier/elm-calculator/-/compare/v0.6...v0.7](https://gitlab.com/pianomanfrazier/elm-calculator/-/compare/v0.6...v0.7)
- **_ellie:_** [https://ellie-app.com/72p3SNcV8Fva1](https://ellie-app.com/72p3SNcV8Fva1)

The way it works is if a user has just entered a number in, the input area is now dirty. Users can press enter again to keep pushing that same number on the stack. Or they can start typing a new number and it will over-write the existing number.

![Dirty State](https://pianomanfrazier.com/img/elm-calculator/dirty-state.png)

We need to add another piece of state to our model.

```elm
type alias Model =
    { stack : List Float
    , currentNum : String
    , error : Maybe String
    , dirty : Bool
    }

initialModel : Model
initialModel =
    { stack = []
    , currentNum = "0"
    , error = Nothing
    , dirty = False
    }
```

In the model update we need to add some logic around when the input field is dirty.

We need to do this to the `Clear`, `Enter`, `InputOperator`, `SetDecimal`, `SetSign`, and `InputNumber` messages.

_Note: When I initially wrote the code I forgot to flip the flag on `SetDecimal` and `SetSign`. The Master branch has this fix. v0.7 does not._

```elm
Clear ->
    { model | currentNum = "0", dirty = False }

Enter ->
    ...
    { model
        | ...
        , dirty = True
    }

InputOperator operator ->
    ...
    { model
        | ...
        , dirty = True
    }

InputNumber num ->
    ...
    else if model.dirty then
        { model
            | ...
            , dirty = False
        }
```

The next chapter is going to add support for users to enter numbers into the calculator using their number pad on their keyboard.
Use DDEV to locally develop with Drupal
Tags: drupal, docker, devops, php
Published: 2020-04-25 17:16:17

---
title: Use DDEV to locally develop with Drupal
published: true
date: 2020-04-24 00:00:00 UTC
tags: drupal,docker,devops,php
canonical_url: https://jonesrussell.github.io/blog/web-development/2020/04/24/ddev-for-drupal.html
---

I’ve been developing with Drupal for over 10 years. It’s never been known to be quick and easy to install, but with the rise of containers it’s now as easy as executing a few commands in a terminal.

## Prerequisites

Installing the prerequisites is beyond the scope of this post but here is a linked list of what you need installed on your system:

- [Composer](https://getcomposer.org/download/)
- [Docker](https://docs.docker.com/get-docker/) version 18.06 or higher
- [Docker Compose](https://docs.docker.com/compose/install/)
- [DDEV](https://ddev.readthedocs.io/en/latest/#installation)

## Download & Install Drupal

1. 

_composer_ has become the de-facto standard package manager of PHP projects and the Drupal recommended way to manage a Drupal installation:

```
# use composer to download Drupal
composer create-project drupal/recommended-project my-drupal-site \
    && cd $_ # $_ will contain 'my-drupal-site'

```

2. 

_DDEV_ is a wrapper for _Docker Compose_ that spins up containers configured to serve PHP projects with an SQL database:

```
# create a ddev config and settings.php for Drupal
ddev config --docroot web --project-name $_ --project-type drupal8

```

3. 

Start the containers:

```
ddev start

```

Once the containers successfully start a link will be displayed to visit your site:

```
Successfully started my-drupal-site
Project can be reached at http://my-drupal-site.ddev.site http://127.0.0.1:32780

```

4. 

Before Drupal is usable it must be installed. You can click through the install wizard or use _drush_, a command-line utility for Drupal, that comes installed with _DDEV_:

```
ddev exec drush site-install -y --account-name=admin --account-pass=my-password

```

That’s it! Drupal is installed and running at http://my-drupal-site.ddev.site.

## Login

You can [login](http://my-drupal-site.ddev.site/user/login) with the following credentials:

```
username: admin
password: my-password

```

## Further Reading

Documentation: https://ddev.readthedocs.io/en/latest/

DDEV includes some handy functionality, like running composer and [drush](https://www.drush.org/) within the web container to download and install new modules.

You can easily import/export your database, or tap into [ngrok](https://ngrok.com/) to share a browse-able link to your project accessible from the internet.

Happy developing! Gabekana.
JavaScript Quiz Question #3: Deep Object Mutability
Tags: javascript, challenge, webdev, programming
Published: 2020-04-23 23:50:26

---
title: JavaScript Quiz Question #3: Deep Object Mutability
published: true
description: Consider the following object representing a user, Joe, and his dog, Buttercup. We use Object.freeze to preserve our object and then attempt to mutate Buttercup's name. What gets logged?
tags: javascript, challenge, webdev, programming
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/gffod695zp2c6pr0k3ie.png
---

Consider the following object representing a user, Joe, and his dog, Buttercup. We use `Object.freeze` to preserve our object and then attempt to mutate Buttercup's name. What gets logged?

```javascript
const user = {
  name: 'Joe',
  age: 25,
  pet: {
    type: 'dog',
    name: 'Buttercup'
  }
};

Object.freeze(user);

user.pet.name = 'Daffodil';

console.log(user.pet.name);
```

A) Daffodil
B) Buttercup
C) An error is thrown

Put your answer in the comments!
Agility CMS vs Contentful: Which Headless CMS is Right for You?
Tags: headlesscms, cms
Published: 2020-04-23 23:30:22

[Agility CMS](https://agilitycms.com) and [Contentful](https://www.contentful.com) are two of the top CMS platforms available on the market today. They both advocate for a Content-First, or Headless, approach to managing digital content. The benefits of this are many and varied - including the ability to reuse content across multiple screens and channels, such as websites and mobile apps, and better workflows.
Content-First also has become the new industry standard for organizations seeking to revolutionize their online strategy and digital presence. 

These solutions start with a cloud-hosted content service such as (Agility CMS or Contentful) that allows editors and marketers to manage the content on their digital properties, and for developers to consume that content using standardized APIs to create great online customer experiences. 
The ability to reuse the same content over time as technology quickly evolves and as new digital channels emerge is key to being successful with any content strategy, and both Agility CMS and Contentful ascribe to this approach.

While they are both similar in their Content-First approach, Agility CMS and Contentful are rivals in the industry and have differing opinions on how to implement that approach. This guide will illustrate those differences and help customers decide which platform is best for them.

Want to learn more?  

[Read the full piece](https://agilitycms.com/resources/guide/agility-vs-contentful-which-headless-cms-is-right-for-you)
Improving your workflow with aliases! 🚀🚀🚀
Tags: alias, git, terminal, bash
Published: 2020-04-23 23:20:21

# Improving your workflow with aliases! 🚀
### 🤔 But what are aliases?
Aliases are a great way to shave off time spent when jumping around the file system via the terminal or working with git. At their core, aliases are custom strings/names (usually short in length) that are set to one or more commands (usually longer in length). You define these custom alias names in a .bash_alias file (more on this later) and then can enter them in the terminal.

You can get really creative when defining aliases to help cut down the amount of time you spend typing long chained commands out. This might seem like a minor improvement but it adds up over time! 

### 🤯 Aliases sound awesome... how can I get started?
I use macOS so that will be the environment I center my steps around. Here are initial steps to get started:
1. Open Terminal.
2. In Terminal, navigate to your users root directory and create a new .bash_profile file by:

```
cd ~
touch .bash_profile
```
You now have the ability to add custom aliases (each on a new line) in the .bash_profile file. Be sure to restart your Terminal application after any updates made to this file. Also, if you're looking for the file in Finder, you need to show all hidden files (hit shift+command+. while in Finder).

### 💻 What are some useful aliases I can get started with?
#### Navigating Folders
workspace='/Users/_your username_/workspace/'
alias home='cd $workspace; pwd;'
alias documents='cd $workspace; cd ../Documents/'
alias external='cd $workspace; cd /Volumes/_name of external drive_'
alias myrepo='cd $workspace; cd myrepo'
alias vs='code .'

#### Git Shortcuts
alias gf='git fetch --all -p'
alias gpom='git pull origin master'
alias gb='git branch'
alias gl='git gl'
alias grh='git reset --hard'
alias gsl='git stash list'
alias gspop='git stash pop'

### ❓Alright, I'm convinced and ready to create some aliases for my Terminal workflow... but are there any negatives of using aliases?
This all sounds great and aliases are very convenient, but of course there is a _potential_ negative with aliases and that is you may rely on them and forget what the original commands are. It's helpful to only use aliases on one of your computers if you have the luxury of multiple computers. If not, I personally recommend mixing in the actual commands from time to time so you don't end up in a bind if you need to work on a different machine!



Drop a comment below with any useful aliases that you can think of incorporating into your workflow! 😃
Testing React Components: How to mock imports with Jest
Tags: react, testing
Published: 2020-04-23 23:14:05


*Thanks to [Black Illustrations](https://www.blackillustrations.com/) for this cover image!*

Recently, I was writing some tests for a few React components at work, and  I had to mock a module from another part of my app in order to properly set things up. 
The following is a short guide for how to mock a module with Jest...written for myself as a reference for the next time I have to do this so I don't need ask the senior dev on my team again. I still find testing React components challenging, so any help for future me (or other interested folks!) is a good thing.
For anyone unfamiliar: [Jest](https://jestjs.io/) is shipped automatically with create-react-app, so it is a commonly used testing framework in React apps, and it's what I'm using at work.  

**Three steps to mock an import:**
1) Import what you need as a module object: 
```javascript
import * as FooModule from '../relative/path/to/foo'; 
```

2) Tell Jest to watch the path to that module. Above your 'describe' block, add: 
```javascript
jest.mock('../relative/path/to/foo');
```

3) In the test, access the exported function that you need from the module (they are all replaced with mock functions now) and tell it what to return or assert if it has been called:
```javascript
FooModule.methodName.mockReturnValue(); // or .mockImplementation()
```

When using mocks, you typically want to mimic the original behavior of the function.

**Final notes:** 
Make sure to clear the mocked module in a beforeEach block:
```javascript
beforeEach(() => {
      FooModule.methodName.mockClear();
    });
```

...and clear all mocks in an afterEach block: 
```javascript
afterEach(() => {
      jest.restoreAllMocks();
    });
```
Link to more information about [Jest module mocks](https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options)

Interesting side note: I was seeing strange, intermittently failing tests after I thought I had properly set everything up to mock the module in question. Turns out I had a sneaky, hidden dependency in several child components! I was testing an overly large component which had several child components depending on the module I needed to mock. I was mocking it in the child component tests, but not in the parent's test because the parent component did not use the module. Once I mocked the module in the parent's spec file, all seemed well. What a great argument for smaller components!
SwiftUI Inspector for Figma 
Tags: swiftui, xcode, development, figma
Published: 2020-04-23 22:46:30

---
title: SwiftUI Inspector for Figma 
published: true
description: Enhance your development workflow by copying and pasting element styles from your Figma files into your Xcode project.
tags: swiftui, Xcode, development, Figma
---

![SwiftUI Inspector for Figma](https://dev-to-uploads.s3.amazonaws.com/i/m9jj59u0g51ph0zuilv3.png)

I love launching products. And this one is by far the most rewarding. Not only does this help designers transition to iOS development and prototyping, but it is also helping teams bridge the gap between design and code quicker. 

We just released a big update to SwiftUI Inspector for Figma. You can now export all colors from your document as Xcode asset catalog items.

Supported: 
- Colors
- Text Labels
- Basic Shapes
- Drop Shadows
- Gradients
- Components 

We are also introducing monthly subscriptions. 
https://swiftui.ai

Would love your thoughts.
From 'A' to 'Z'
Tags: experience, development, company, startup
Published: 2020-04-23 22:27:21

---
published: true
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/mm53lzsf95htufp39gbm.jpg
title: From 'A' to 'Z'
description: My experience from a big multinational company to a little startup
tags: Experience, Development, Company, Start-up
---

Hey, I hope you are well and healthy.

In this post, I wanted to tell you about my experience in changing from a large company to a small start-up.

A year and a half ago I moved to Spain from Italy And I started working in a large multinational company, I happened on a project for a fairly important insurance company. A technological hell (**working with java 6 in 2019 is anachronistic**), managing and transmitting information between us and the customer.

After a year and three months, I changed companies, moving to a small start-up of about 15 employees.

The best choice I could make for my professional career right now, excellent projects, with decent technologies and with confusional but coherent management

---

###*And you? Do you have any positive or negative experience with big company changes?*