teleren/devto huggingface dataset:
go apps + jaeger tracing
Tags: go, observability, sre, devops
Published: 2020-04-11 18:53:59

So I've been playing with Jaeger tracing over the last two days a little, to distract me from usual work and thought I'll share what I've put together.

This isn't a tutorial or such, as I still don't know enough about how opentracing / jaegertracing works, so enjoy the code on github, happy to try and help if anyone's got a question (and if I can provide an answer).

TL;DR

The final code works "well", with traces spanning more than one app, with errors, comparing traces, etc. 

Github: [go-trace-example](https://github.com/alex-leonhardt/go-trace-example)

Here some screenshots..

![img1](https://github.com/alex-leonhardt/go-trace-example/raw/master/media/screenshot1.png)

![img2](https://github.com/alex-leonhardt/go-trace-example/raw/master/media/screenshot2.png)

![img3](https://github.com/alex-leonhardt/go-trace-example/raw/master/media/screenshot3.png)

![img4](https://github.com/alex-leonhardt/go-trace-example/raw/master/media/screenshot4.png)
Discover Morocco
Tags: codepen
Published: 2020-04-11 18:45:19

<p>A home page and animate it with JavaScript.</p>

<p>For the animation, I use the Greensock library which allows you to do a lot of things in terms of Javascript animations!
I also use Flexbox and CSS Grid for the CSS part of this mini-project.</p>

{% codepen https://codepen.io/aljagne/pen/zYvxLVq %}
Update⚠️: Official government communications through WhatsApp bot.
Tags: twiliohackathon, laravel
Published: 2020-04-11 18:43:29

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)


## What I built
If you haven't been following, start from here then fall back ...
[Link to first post](https://dev.to/saidiali/official-government-communications-on-whatsapp-6lf)
I’ve now put some functionality to the app. You can now ask for helplines, check for how to prevent the disease and it’s symptoms. It’s quite very basic but it’s a step to something bigger. 
I’ve also applied for a twitter developer account so I can integrate it in the app to fetch tweets from the twitter account of the Ministry of Health Uganda since this is where official communication is passed.
## Demo Link
 
[whatsapp link to the bot](https://wa.me/14155238886/?text=join%20chicken%2Dmix)
Click on the link and send the pre-filled message to connect to the bot. Then send ‘help’ to get started and get instructions on how the bot can help you.

## Link to Code
https://github.com/SaidiAli/covid-19-autoresponse-whatsapp-bot

## How I built it (what's the stack? did I run into issues or discover something new along the way?)
- Laravel for backend services 
- twilio WhatsApp api

## Additional Resources/Info
I deployed the app on heroku for free ☺️. 
Great platform for deploying apps.
How long does it typically take you to go from ... to ...?
Tags: discuss, watercooler
Published: 2020-04-11 18:37:11

Consider any tasks (automated or manual) and the total rough estimate of how long it takes to go between the following stages:
1. Commit to pull request (think of git hooks that may run).
2. Open PR (once all your code is pushed) to PR reviewed & merged.
3. Merged PR to code deployed to production.

I'm curious to learn timings but also takes each of you perform.

Thank you!

Context: A friend's similar tweet (https://twitter.com/peterhry/status/1245757542011109377)
The Internet After This
Tags: webdev, discuss
Published: 2020-04-11 18:32:29

The web experience is constantly evolving. Every year we not only advance the technologies that make it better linearly, we also *expand* the number of technologies that can be made better making it better *exponentially*.

Very few fields work like this: forecasting the state of the internet from the state of its parts is like counting the number of people in a room of moving people. But let's try anyway!

**What web technology do you think will most significantly change/improve the world? What is being understated or overstated?**

<li>*It's my Interwebs, and I need it NOW!* - Consider the impact of a tech everyone gets today vs most people won't see for 5, 10 years. Many people still don't know VR even exists!

<li>*Back in my day...* - Consider whether this tech might make our experience unrecognizable over time. Remember life before GUI? The world doesn't.

<li>*With our powers combined...* - Consider a combination of techs that is greater than the sum of its parts. What do they make possible together?

Here are some nominees (or introduce your own!):

<h3>Godspeed</h3>
*5G* and *fiber optics* will greatly increase download and upload speeds. But who will get it when? Limits on rollout mean many people won't feel the difference for a while, but what about those who get this supercharge?
<h3>Quantum Leap</h3>
*Quantum computing* similarly moves computational power to new heights. If you think big data is juicy today wait until the quantum interpretation. Access will be limited to big players for a while; personal quantum computing might be many years off.
<h3>The Invasion</h3>
*Progressive Web Apps (PWA)* are moving the online offline. The perks of native programming might not qualify it for survival as the tech powers that be channel innovation into web tech. It's already here though, and is splashing more like a Magikarp at the moment.
<h3>Speaking My Language</h3>
*Web Assembly* is bringing all the languages under one roof. The web is poised to become a melting pot welcoming all the advantages and diversity of the entire world of programmers and programs in the browser.
<h3>According to Protocol</h3>
*HTTP/3* and *QUIC* is upgrading the bridge between server and client to new levels. This mass of changes will improve security, speed, and traffic management for everyone who uses it, and will be especially impactful in areas with less reliable and fast coverage at no additional cost.

Tell us what you think! 

PS bonus points for sharing about equity and accessibility :*
Quarantine Counter From A Python Noob
Tags: python, twitter
Published: 2020-04-11 18:20:51

I decided to make use of the self quarantine, work from home time to start learning some skills on the side. I started looking at Python (again) and did a tutorial to relearn the basics of the Python. I am one of those people who is always in **tutorial purgatory**, who often sees tutorials on various things and end up forgetting about it completely due to not doing any hands on practice. Half way through the tutorial, I realized that I am manually posting a tweet thread to Twitter, which could be automated easily.

The tweet thread is simple, a [daily reminder](https://twitter.com/iamkalai2/status/1244667264734904328) of the number of days **since I wore pants**. Here is [draft version](https://github.com/iamkalai/PythonSnippets/blob/master/LockDownCounter.py) of the code if someone wants to skip reading this blog.

What I love most about Python ecosystem is that there is always some library written by someone for most of my common needs. I found that [tweepy](https://www.tweepy.org/) was the easiest way to tweet using Python.

I registered a [twitter developer account](https://developer.twitter.com/en/apply-for-access) and found [this site](https://docs.wpwebelite.com/social-network-integration/twitter/) to guide me in creating the app for interacting with Twitter. This site also lists out steps to create similar apps for other sites such as Facebook, LinkedIn.

Now coming back to the Python script, it uses 2 text files for now (remember that I am still half way doing the tutorial :))

- First for storing the counter of number of days since I wore my pants.
- Second for storing the tweet id that is being posted. You will need to have the id of the tweet if you want to reply to it. I wanted to maintain the tweet chain that I already had and post the new tweets as a reply to last tweet. I decided to store id of the tweet instead of doing a get request every time to Twitter to find my last tweet. This made sense to me as the design decision.

All of the logic is split into individual functions so that I can rewrite those as I learn more about Python. Most of the code is self explanatory. There are functions for reading from file, writing string to file, reply to a existing tweet and a function to increment to days counter.

The script when executed works as below,

- Reads the counter from the text file.
- Increments the counter and writes it back to the same file.
- Message is formed using the days count.
- Last tweet id is read from another file.
- Tweet is posted and id of the new tweet is saved back to the file for next tweet.

The script still needs rework to move the Twitter app details outside of the script, find a better way to store counter and tweet id and do some basic error handling. I am hoping to do this as I complete pending tutorial.

**Bonus**: I automated the execution of this using Crontab. This [site](https://crontab.guru/) helps you create a cron schedule expression if you have problem understanding it's format. And, if you don't know how to create crontab, then see this [video](https://www.youtube.com/watch?v=kL5rmcxwgSs&t=331s)
PHP Tips : Pourquoi utiliser "continue" ?
Tags: php, codequality, beginners, french
Published: 2020-04-11 18:12:15

Hello world !

Je vais vous présentez ici un petit tips en PHP mais qui peut facilement être adapté et utilisé dans d'autres langages qui va vous permettre d'avoir un code plus lisible lorsque vous utilisez des conditions à l'intérieur de boucles. 

C'est bien évidemment l'utilisation du mot clé [continue](https://www.php.net/manual/fr/control-structures.continue.php), comme indiqué dans le titre !

Donc `continue` est utilisé pour passer à l'itération suivante dans une boucle. 
L'avantage premier de ce mot clé est ainsi d'aplatir le code quand il est utilisé avec une `condition inversé`. 
Souvent il nous arrive d'avoir des conditions à l'intérieur d'une boucle mais la logique qu'on désire effectuer se trouve également dans cette condition. Le souci est alors d'avoir un niveau d'indentation élevé qui pourrait être évité avec l'utilisation de `continue`.

Voici un exemple ci-dessous : 

```php
// On veut afficher le nom des héros s'ils sont définis
$heroes = [
  ['name' => 'T Challa'],
  ['name' => 'Tony Stark'],
  ['name' => 'Bruce Wayne'],
  ...
];
// sans continue                 // avec continue
foreach($heroes as $hero) {    | foreach($heroes as $hero) {          
  if (isset($hero['name'])) {  |   if (!isset($hero['name'])) { // condition inversé
    echo $item['name'];        |     continue;
    ...                        |   }
  }                            |   echo $item['name'];
}                              |   ...
                               | }
```

Ici on voit qu'en utilisant une `condition inversée` + `continue`, on a la possibilité de sortir notre logique de la condition et donc d'avoir un niveau d'imbrication en moins. Ainsi, le code devient plus lisible surtout s'il y a plusieurs niveaux d'imbrication.


Merci d'avoir pris le temps de lire mon premier post 😃
Codeur M
Tentativa de quebrar CAPTCHA usando Python - Mais um experimento de fim de semana
Published: 2020-04-11 16:47:10

E nesses finais de semana sem muito o que fazer e sem poder sair de casa, nada melhor do que testar os conhecimentos em algumas coisas aleatórias. Dessa vez a ideia foi tentar quebrar alguns CAPTCHAS que me tiraram do sério em consultas rotineiras que precisava fazer no trabalho. Coisa pouca: só algumas centenas (claro que o que pôde ser automatizado, foi).

Como há alguns meses atrás eu já havia feito algumas coisas utilizando processamento de imagem (bem superficialmente), achei que seria legal tentar ver o que de bom poderia sair ao tentar resgatar o que aprendi na época. E o resultado até que foi legal para uma madrugada.

Até agora cerca de 80 linhas de código (ainda não refatorado) e que já produzem um resultado aproximado:

{% youtube uqHhLTrEU9U %}

Como dá pra ver no vídeo, em quase todas as tentativas apenas uma letra da imagem não é reconhecida corretamente. Ainda estou fazendo diversos testes  e adaptando o algoritmo pra tentar corrigir isso. Quando o código estiver mais organizado, pretendo compartilhar com vocês no GitHub.

As ferramentas que estou utilizando são: Python, Pillow, Tesseract e Matplotlib.

Não espero com esse projeto atingir 100% de sucesso no reconhecimento dos caracteres. Quero apenas ter a base desse conhecimento para, quem sabe, aplicar em outras demandas.

Se alguém aí já tentou a mesma coisa parecida e teve algum resultado interessante, só comentar aí que a gente vai trocando ideias.

Até o próximo post!
LeetCode Challenge: Move Zeroes
Tags: computerscience, beginners, leetcode, problemsolving
Published: 2020-04-11 17:32:11

If you've been following this series so far, then this problem should be a piece of cake.

# Problem
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.

__Example:__
```
Input: [0,1,0,3,12]
Output: [1,3,12,0,0]
```

__Note:__
You must do this in-place without making a copy of the array.
Minimize the total number of operations.

# Approach 1

__Algorithm:__
1. Initialize variable zeroCount to store count of zeroes
2. Initialize result to store the final array
3. Iterate through all elements of the array
4. If the element is zero then increment zeroCount
5. Else append to the result array
6. Append zeroCount number of zeroes to the result
7. Replace elements of original array with result

__Code:__
```python
def approach1(nums):
    zeroCount = 0
    result = []

    for i in range(len(nums)):
        if nums[i] == 0:
            zeroCount += 1
        else:
            result.append(nums[i])
    
    for i in range(zeroCount):
        result.append(0)

    for i in range(len(nums)):
        nums[i] = result[i]
    
    return nums
```

__Complexity analysis:__
```
Time complexity: O(n) Always n operations
Space complexity: O(n)
```

# Approach 2

__Algorithm:__
1. Initialize variable nextIndex to store the next index of non zero element
2. Iterate through all elements of the array
3. If the current element is not zero then put it at nextIndex and increment it
4. Once step 2 ends iterate from nextIndex to the end of the array and assign zero at those indices

__Code:__
```python
def approach2(nums):
    nextIndex = 0

    for i in range(len(nums)):
        if nums[i] != 0:
            nums[nextIndex] = nums[i]
            nextIndex += 1
    
    for i in range(nextIndex, len(nums)):
        nums[i] = 0
    
    return nums
```

__Complexity analysis:__
```
Time complexity: O(n) with near minimum operations
Space complexity: O(1)
```

# Approach 3

__Algorithm:__
1. Initialize variable nextIndex to store the next index of non zero element
2. Iterate through all elements of the array
3. If the current element is not zero then swap it with the element at nextIndex and increment it

__Code:__
```python
def approach3(nums):
    nextIndex = 0

    for i in range(len(nums)):
        if nums[i] != 0:
            nums[i], nums[nextIndex] = nums[nextIndex], nums[i]
            nextIndex += 1

    return nums
```

__Complexity analysis:__
```
Time complexity: O(n) with minimum operations
Space complexity: O(1)
```

# Summary
This problem was more of tricky thinking rather than algorithmic thinking.

Here's the replit
{% replit @13point5/LeetCode-Move-Zeroes %}
Ε4: To Be a Successful UX Designer Give up these 15 Things
Tags: ux, ui, designer, design
Published: 2020-04-11 17:08:11

💪Success is different for everyone, and along the way, you need to learn which habits to keep and which ones to give up. You need to become good at giving up to focus on doing the good stuff that’s going to help you become a great designer.⬇️

Previous episodes:
- [Are You New to UX? Here Are The Best 5 Tips (And How To Actually Make Them Work)](https://dev.to/eleftheriabatsou/e2-are-you-new-to-ux-here-are-the-best-5-tips-and-how-to-actually-make-them-work-4id4)
- [Should Designers Learn To Code & Why It's Not A Good Question] (https://dev.to/eleftheriabatsou/e1-should-designers-learn-to-code-why-it-s-not-a-good-question-860)
- [7 Practical & Effective Methods To Improve At Visual/UI Design](https://dev.to/eleftheriabatsou/3-7-practical-effective-methods-to-improve-at-visual-ui-design-3480)

👋Hello, I' m Eleftheria, an app developer, master student, freelancer, public speaker, and chocolate lover.

This is a new series on my channel and I'm going to be talking about UX and UI.
This is the 3rd episode out of 8.
If you have any feedback, please do share it with me. Thank you.



😎Top 3 list:
- How to stay motivated | A developer's edition | @BatsouElef: https://youtu.be/qMvEtb5OxNo
- How to be a Better Problem Solver | Tips and solutions: https://youtu.be/dELt7yKIxIA
- Simple Tips to Build a Personal Brand as a Developer (+ personal examples): https://youtu.be/7s0o1gi0iP0

🥰If you liked this video please share

🍩Would you care about buying me a coffee? You can do it here: [paypal.me/eleftheriabatsou](paypal.me/eleftheriabatsou) but If you can't that's ok too!


**************************************

🙏It would be nice to subscribe to my [Youtube](https://www.youtube.com/c/EleftheriaBatsou) channel. It’s free and it helps to create more content.

🌈[Youtube](https://www.youtube.com/c/EleftheriaBatsou) | [Codepen](https://codepen.io/EleftheriaBatsou) | [GitHub](https://github.com/EleftheriaBatsou) | [Twitter](https://twitter.com/BatsouElef) | [Site](http://eleftheriabatsou.com/) | [Instagram](https://www.instagram.com/eleftheriabatsou/)
Finding total lines of code in your project
Tags: git
Published: 2020-04-11 17:05:29

You may be a new joiner to your organization or someone who is already working in a firm for many years. One day you're sitting on your chair and suddenly one thought came into your mind.

### How many lines of code are in my project? 🤔

One challenge could be that you might be relying on external packages, preferably open-sourced, or some code coverage folder might be already present from the last time you have run your test. You can delete them, fair point but then you have to create the coverage or install all of the dependencies again. Only if there is a way adhere my `.gitignore` rules then the world could have been a little more perfect.

Turns out, there is a way out 💡

### Entering `git`, like always!

`git ls-files | xargs cat | wc -l`

Running this command will give you the total number of lines in your project.

There are two parts in this process, well, as you can see there are three parts but you can think the last two commands as singular. The last two commands are there basically to count the number of lines only. The first command is a kind of interesting one which lists all the files that currently present in your repository and excludes the one who is ignored in your `.gitignore` file. So there you have it.

You can also tweak [git ls-files](https://git-scm.com/docs/git-ls-files) command to check the lines for specific extensions.

[Image Courtesy](https://unsplash.com/photos/F-Bq5wB5RY0)
Public Service Announcement: The Star Wars API (swapi.co) Is Down!
Tags: swapi, starwarsapi, javascript, api
Published: 2020-04-11 17:02:47

---
title: Public Service Announcement: The Star Wars API (swapi.co) Is Down!
published: true
description: The fall of a behemoth?
tags: swapi, star wars api, javascript, api
---

As the title says, this is more an alert than a full-fledged post.

As a lot of us know, this was a great tool to quickly test some async / API behavior! (Not to mention it's used in hundreds (maybe thousands?!) of existing tutorials and in examples of repositories!

Does anybody know the maintainer or what happened? Or if it will come back anytime soon? That thing's been around as long as I've been a dev...
Top Mac Apps for becoming more productive 💪
Tags: productivity
Published: 2020-04-11 16:52:04

Thousands of apps have been made for mac. I am going to list a few that I use on a day-to-day basis to help you become more productive and save some time.

## [Rectangle](https://rectangleapp.com/)

Move and resize windows in macOS using keyboard shortcuts or snap areas

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

## [HazeOver](https://hazeover.com/)

Too many windows to manage? Large display? Or sometimes getting lost in multiple monitors? HazeOver is for you! This app automatically highlights the front window by fading out all the background windows.

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

## [Recordit](https://recordit.co/)

Recordit is a screencast tool for Mac and Windows operating systems. Recordit is a GIF-based screencast tool that provides desktop clients for both Windows and Mac. It allows users to record desktop screen for as long as five minutes.

![https://recordit.co/images/recordit.gif?v=1](https://recordit.co/images/recordit.gif?v=1)

## [Flycut](https://github.com/TermiT/Flycut)

Clean and simple clipboard manager for developers. Every time you copy a code piece, Flycut stores it in history. Later, you can paste it using Shift-Command-V even if you have something different in your current clipboard. You can change the hotkey and other settings in preferences.

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

## [Itsycal](https://www.mowglii.com/itsycal/)

It is weird that Mac doesn't have a calendar in the menu bar if you want to have a quick look at the dates. If you want to have a quick look for the date next Friday, you would have to open up the calendar application on Mac, which is time consuming.

Itsycal is a tiny menu bar calendar. If you want, it will display your events as a companion to the Mac Calendar app. 

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


These were some of the apps that I use regularly. 
What other apps do you think should be on the list? Comment below 👇
100daysofcode Flutter
Tags: 100daysofcode, flutter
Published: 2020-04-11 16:49:51

day 33/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today imolements about drawer, send data with argument,intl package, Date time
https://github.com/triyono777/100-days-of-code/blob/master/log.md