teleren/devto huggingface dataset:
Deploying weekly and... remotely
Tags: productivity, teamwork, product, deploy
Published: 2020-06-26 03:17:54

Some facts:
1. My team is used to deploying to production every week. 
2. My team is **not** used to being remote. 
3. My team now **deploys to PROD remotely**.

------------

We have always been paying a lot of attention to the process of the release cycles, constantly chipping away at the steps, slimming and de-risking it. So, we believe we have a pretty reliable and efficient flow by now. :muscle:

Yet, when the first **COVID-19** lockdown's release day arrived, all of us involved -- engineering, QA and product-- were sweating a lot. I mean, without having everyone within arm's reach at the office, how do you make sure that: 

a. no one misses any migration steps, if they are needed?
b. all environmental variables are in place?
c. you did not reach some mysterious limits on Jenkins?


(Right, we are using Jenkins for deploys.)


------------

These are just some of the things that can go wrong. There can be many more, of course, because our product is very complex with a ton of interdependencies and jobs that have to run in production.

That's why I wanted to share with y'all and also selfishly reflect on how we managed to not screw it all up.:sweat_smile:

###What seemed to have worked:
1. A clear checklist that the lead engineer and I agreed upon and documented;

2. A separate MS Teams channel dedicated to the release communication;

3. Locking in the release window -- just as with space launches -- if we do not make it by the agreed time, we abort;
4. And, my personal favorite, [Blue-Green Deployment](https://medium.com/arabamlabs/blue-green-deployment-with-jenkins-98393bba2327) that uses [Blue Ocean interface](https://www.jenkins.io/doc/book/blueocean/) and makes the new PROD build a simple click of a button (well, a few series of buttons).

To summarize, the combination of _solid team communication, operational preparation, and the work DevOps had put into visualizing the deploy pipeline_, made it possible for us to continuously deliver even after this sudden shift in work style. 


###What still needs improving:
1. **Communication** -- yeah, there can never be enough of it. Now and then, there are threads that get lost in translation or simply overlooked when someone's less than strategically placed comment pushes out critical content;


------------

Ok, so to be fair this stuff is not easy.

I see it as a constant work in progress.

------------

What've your experiences been like? :nerd_face:

What advice do you have for remote CICD during a pandemic?
What are Webhooks?
Tags: webdev, webperf, javascript, github
Published: 2020-06-26 03:16:18

Last night I was wondering whether I need webhooks with my application or not and then I realized that Webhooks with ngrok and Django are actually going to be great. For those of you who didn't understand my last statement specifically because of the usage of 'webhooks', this blog post is going to clarify what it means and by the end, you'll have a basic knowledge of what webhooks are, what their purpose is and how to use them.

Webhooks are essentially a chain of events to manipulate the behavior of a web app with custom callbacks.

Now, what are callbacks?

Callbacks are chunks of code that get executed at a given time and is passed as an argument to some other code.

What is the purpose of Webhooks?

For instance, you update switch your administration server to a different TimeZone specific to your app and save the changes successfully. However, for other servers to inform, you need to execute a webhook immediately telling other servers listening that the TimeZone just got updated.

Webhooks also help in deploying web applications automatically.

In this blog post, I'll walk you through a test webhook response and how a webhook actually works.

### Using Webhook Tester

A Webhook tester would help you generate a unique URL to test, inspect, forward, and script incoming HTTP requests and emails with Custom Actions. A great Webhook tester is [webhook.site](https://webhook.site).

My repository [Daily Code] is already using a Git Guardian webhook for safe code deployment but we'll be adding another webhook for testing purposes.

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

#### The Real Part

Visit [Webhook.site](https://webhook.site)

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

You'd wanna paste that URL from the Webhook Tester in the URL field for the webhook. Also, set the response type to JSON, and narrow your notifications to “Commit comments”. 

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

Once you click on “Add webhook”, GitHub sends us a test request to ensure our server is receiving its POST requests.

Now to test for ourselves, we'd need to go make a comment on a commit.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5gacuxqmn10rxbwltxo1.png)

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

As you can see, we've got our POST request after commenting on a commit like we had specified earlier in the webhook settings. So yeah, this is how Webhooks really work and can actually be used for various operations.

If you liked this article, it would be really nice of you to drop a comment down below, check my other articles, or maybe [support my projects](https://github.com/arthtyagi)?
PolyFriends, a New Twitter Bot
Tags: showdev, python, bot, news
Published: 2020-06-26 02:59:13

Hey all! Over the past few days I've been working on a new Twitter bot, and thought I should make a quick post here. [PolyFriends](https://twitter.com/polyfriendsbot) is a bot that creates little unique polygon characters with their own name and hobby. Though they're quite simple looking, I honestly like the way it turned out. You can find the source code on [Github](https://github.com/Visual-mov/PolyFriendsBot) if you're interested.

Some tweets from the bot:
{% twitter 1276258927554904065 %}
{% twitter 1275619810492071936 %}
使用 esp32.RMT 設計不同頻率的 PWM
Tags: eps32, micropython, pwm, rmt
Published: 2020-06-26 02:37:52

由於 ESP32 的 MicroPython 實作中所有的 PWM 通道 (channel) 都是使用同樣的頻率, 如果需要用在不同的情境, 例如用 D26 和 D27 同時控制不同的喇叭發聲, 就沒有辦法做到了。不過在 esp32 模組中, 有個 [RMT](http://docs.micropython.org/en/latest/library/esp32.html#rmt) 類別,雖然原始用途並不是拿來做 PWM, 但卻因為設計上的巧合, 剛好可以用來變造成可**自訂不同頻率的 PWM**。

RMT 是 **Remote Control Module** 之意, 原本是為了能控制紅外線元件發射/接收特定**高低電位交替**的波形而設計, 另外像是 HC-SR04 超音波測距模組、DHT 系列溫濕度感測器在使用時也需要發送/接收類似的訊號, 因此在 ESP32 上就有這樣的功能, 可以依照指定的時間長度, 依序發出高低電位交替的訊號。

### 建立 RMT 物件

要使用 RMT, 首先要從 `esp32` 模組中匯入並建立 `RMT` 類別：

```python
>>> from esp32 import RMT
>>> from machine import Pin
>>> r = RMT(0, pin=Pin(26), clock_div=80)
```
- 第 1 個參數是 RMT 通道 (channel) 編號, 有 0~7 共 8 個通道。
- 具名參數 `pin` 是腳位, 可使用任意腳位。
- 具名參數 `clock_div` 是**時脈除頻器 (clock devider)**, 可用的值為 1~255。預設的時脈是 **80MHz**, 除以時脈除頻器就可以得到真正的頻率, 計算出單一週期的時間。以上例來說單一週期就是 1000000us / (80Mhz / 80) = 1us。

### 傳送訊號

建立好 RMT 物件後, 就可以使用 `write_pulse()` 送出信號, 例如：

```python
>>> r.write_pulses((10, 30, 10), start=1)
```
- 第 1 個參數必須是**串列**或是**元素組 (tuple)**, 指定交替高低電位的持續時間, 可以是 0~32767, 時間單位就是剛剛建立 RMT 物件時計算所得的單一週期。以上例來說, 因為單一週期是 1us, 所以高低電位交替信號持續時間就分別是 10us、30us、10us。
- 具名參數 `start` 是指定第 1 個訊號要從高電位 (1) 還是低電位 (0) 開始, 沒有指定則預設為 1。以上例來說, 因為 `start` 為 1, 所以依序會送出 10us 的高電位、30us 的低電位、10us 的高電位, 訊號送完後會自動回復成低電位。

如果需要知道脈波序列是否已經發送完畢, 可以使用 `wait_done()`:

```python
>>> r.wait_done()
True
```

如果想讓訊號反覆不斷發送, 可以使用 `loop()`：

```python
>>> r.loop(True)
```
只要傳入 `True`, 就會反覆發送訊號, 傳入 `False` 即停止發送。

請注意:在 1.13 版的韌體, `loop(True)` 要在 `write_pulses()` 前執行才會生效。

### 利用 RMT 客製 PWM

綜合上述, 只要結合 loop(), 我們就可以利用 RMT 來設計 PWM。舉例來說, 如果想要讓喇叭發出 261Hz 的音頻, 可以計算出週期為 1000000us / 261 = 3831.418us, 以佔空比 (duty cycle) 為 50% 讓喇叭震幅最大聲, 也就是 3831.418us / 2 = 1915.709us 為高電位與低電位各自持續的時間, 以下的程式就可以發出 261Hz 的 Do：

```python
>>> r.loop(True)
>>> r.write_pulses((1915, 1915), start=1)
```
以下的完整程式就可以唱出嗡嗡嗡囉：

```python
from machine import Pin
from esp32 import RMT
from utime import sleep

def sound(freq):
    if freq == 0:
        sleep(0.5)
    else:
        ticks = int(1000000/freq/2)
        r.loop(True)
        r.write_pulses((ticks, ticks), start=1)
        sleep(0.25)
        r.loop(False)
        sleep(0.25)
        
r = RMT(0, pin=Pin(26), clock_div=80)

notes = (
    392, 329, 329, 0,
    349, 293, 293, 0,
    261, 293, 329, 349, 392, 392, 392)
for note in notes:
    sound(note)
r.deinit()
```
由於 RMT 有 8 個通道, 所以我們就等於有 8 個可**隨意自訂頻率的 PWM** 可以使用了。

相關功能可以參考我所撰寫的 [esp32_rmt_pwm](https://github.com/codemee/esp32_rmt_pwm) 程式庫。
Introducing AiSara the next generation of Artificial Intelligence
Published: 2020-06-26 02:35:40

Did you guys ever thought of an AI that can automatically find patterns to make prediction in your numerical data ? 

Some people are having a hard time doing this because different dataset might need a different prediction model. 

This is why [AiSara](https://www.aisara.ai/) is here to help you. AiSara is an algorithm that are specialized in predicting any kind of numerical data.

The more data you feed to the [AiSara](https://www.aisara.ai/) the more accurate it will become.

Soon, there will be a trial version of AiSara where you can try them out using your own dataset and try to make prediction out of it. 

Visit our official page Here > [AiSara](https://www.aisara.ai/)
Day 25 - #100DaysofCode - Intro to Rails
Tags: 100daysofcode, codenewbie
Published: 2020-06-26 02:32:52

Today I began to read the documentation for <a href="https://guides.rubyonrails.org/"> rails </a> and work on some of the required lessons for my bootcamp. I did not get far because this week has been very unstable and difficult, but I will explain what I learned for those of you just beginning too. 

First I had to install rails by writing ``gem install rails``, which if you have an older Macbook like myself can take a while. I had to get a few extra updates but once I got it up and running I was able to easily create new application by running ``rails new new-app``. 

My lesson advised me to create a database and then run my application on my local server. 

Unlike Sinatra, I did not have to set up my database manually or set up my models. I simply typed, ``rake db:create`` and then ``rails s`` and went to http://localhost:3000/. 

And just like that, I was connected. I was amazing at how easy it was to get rails set up after spending weeks learning Sinatra, ActiveRecord, and SQL. Now, all that work (which was important to learn) was easily generated by running ``rails new APP_NAME`` I look forward to learning more and building my first Ruby on Rails project in the near future. 

Thank you for reading. 

Sincerely,
Brittany

<center> <b> Song of the day </b> </center>

{% youtube 35AWgksymtA %}
Having hard time to get the right learning rate and number of layer for your model ? 
Published: 2020-06-26 02:23:01

Having hard time to find the right configuration for your model ? AiSara is now capable to help you solves the problem by giving you the right combination of learning rate and number of layer for you to focus more on accuracy rather than learning process !

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/lwjc0r01tjnp8slbvcdf.png)
Days 17 & 18
Tags: 100daysofcode
Published: 2020-06-26 02:10:55

I totally forgot to post about what I did yesterday!

**June 24, 2020**
I did Codecademy's lessons on queues and began learning about hash maps. I also did a couple of fCC exercises on objects.

**June 25, 2020**
I did JavaScript30's lesson *Custom HTML5 Video Player*. On Codecademy, I'm still learning about hash maps. I'm finding it all really confusing (I'm not a huge fan of a bunch of text-only lessons without exercises) so I'm going to need to do something else to understand it.

I started fCC's exercises on functional programming but got pretty confused and stopped for the day!
Flutter #1 : Bottom Navigation Bar Template
Tags: flutter, dart, mobile, ux
Published: 2020-06-26 02:09:12

# Background
Recently I am learning about creating front end design with Flutter. The language used is Dart. Anyway I created this post because I realized that I always use this structure whenever I make a new app. The design is simple. One page with tab navigation bar. 

Since I do not touch Flutter everyday, I keep forgetting how to make this kind of UI. I made this base template, so that I can only care about adding the service and other logics to the app.


# Github
[Source code](https://github.com/ninankara/myTemplateRepo/tree/master/flutter_btmnavbar)

# Preview
![Bottom Navigation Bar](https://dev-to-uploads.s3.amazonaws.com/i/fhyahj2d2r80zcrb4u4l.jpg)
Wireguard overlays made simpler with Drago!
Published: 2020-06-26 02:08:37

Hi there!

I’m working on a tool for dynamic configuration of Wireguard (https://www.wireguard.com/) network overlays which might be especially interesting to the Golang enthusiasts. 

It has many different applications, but is originally meant for establishing hybrid virtual clouds spanning different providers and edge devices.

Check it out here: https://github.com/seashell/drago, and don't forget to leave a star ;)

Any feedback is much appreciated.

Cheers!
JavaScript Decrypt Code Errors
Tags: javascript, raspberrypi, node, vscode
Published: 2020-06-26 01:46:15

Hi Everyone, I want to run JavaScript Decrypt Code on Raspberry Pi but my code shows these errors, if anyone have any idea please let me know. Same code is successfully running on Visual Studio Code but in Rpi not. Thanks in advance.

module.js:340
throw err;
^
Error: Cannot find module 'node-aes-cmac'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/pi/naveed/LoraPD3/LoraTest/mic.js:27:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Vintage Electronic music to code to
Tags: cyberspace
Published: 2020-06-26 01:38:13

---
title: Vintage Electronic music to code to
published: true
description: Electronic music to help you be more productive and feel electric.
tags: cyberspace
//cover_image: https://direct_url_to_image.jpg
---
A person may regard this global network as the internet or such but soon for calming reasons you may regard it as a cyberworld or cyberspace. The term "internet" is vague and has little personal emotional relativity. Cyber refers to the common effect and reaction to this electric world. Tons of information to dive into. Content in formats of mp4, mp3, png, jpeg.
When browsing cyberspace, consider interpretability and accessibility as number one.

## Vintage commercials
 Glimpse of the times and the common perceptions of certain ages 1950s 1940s. Maybe the present news and media is always popping up with new things. With cyberspace you can always go back in time. To go forward in time is futuristic neofuturism.
![](https://www.oldradioworld.com/images/coca%20cola%20ads.jpg)

# VaporWave
![](https://images-na.ssl-images-amazon.com/images/I/711fQ6VM5ZL._AC_SL1500_.jpg)
This stuff is a kind of subgenre of electronic music. Hypnotizing stuff. Mixture of elements from the 80s and 90s. This post is in year 2020.


## Virtual Environments
Thanks to the creator of these subgenres.
Virtual environments can teleport you to different times and areas and adjust your perception and expectation to a contextual subject. Example Tokyo japan virtual environment, city traffic environments, quiet cafe even sometimes with chatter in the background. So this keeps you not-lonely.
Docker running inside a VM, how do I access?
Tags: docker
Published: 2020-06-26 01:34:38

Have you ever struggled to get Docker running on your local host?
Only to realize that once you have it all figured out, the actual scenario requires you to repeat the exercise but now inside a virtual machine (possibly running a Linux flavor).

Or what if docker daemon was best running at only one place instead of two?

I want to share a small learning around the docker daemon start options and how to leverage it for our benefit.

##How to "run inside a Linux VM"?
Start docker daemon to listen on multiple sockets (TCP as well as Unix)

###Edit the Docker service configuration
*/etc/systemd/system/docker.service.d/override.conf*

`sudo systemctl edit docker
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:50000 -H unix:///var/run/docker.sock`

###Reload the changed configuration
   `sudo systemctl daemon-reload`

###Verify the changed configuration
`sudo systemctl cat docker | grep ExecStart
OR
sudo systemctl show --property=ExecStart docker
`
###Restart Docker Daemon Service (using systemctl or service)
`sudo systemctl restart docker
OR
sudo service docker stop
sudo service docker start`

###Check the docker daemon logs or process to verify TCP binding
`sudo systemctl status docker
OR
ps faux | grep docker`

###Finally, access docker on the host using DOCKER_HOST
*Assume your VM host alias name is "myVMHostAlias"*

`export DOCKER_HOST=myVMHostAlias:50000
docker images
`

##Tried the above, but its not working
If the above fails to achieve the end-objective, then you can always stop the dockerd service and start one manually
`sudo service docker stop
sudo /usr/bin/dockerd -H tcp://0.0.0.0:5000 -H unix:///var/run/docker.sock >> /tmp/dockerd.log 2>&1 &`
Day 162: Sad
Tags: hiphop, code, coding, lifelongdev
Published: 2020-06-26 00:42:50

_liner notes_:
- Professional : I was able to get the Web Component I've been working on to load on CodePen. Had our larger team meeting. Good to see everyone. Also had a meeting with my manager to talk about goals for the 3rd quarter.

- Personal : Last night, I submitted the radio show for this week to play on the radio station airwaves. Also went through a bunch of tracks for this week's internet show. Also started up the starter project for a new side project. I'll be using Sapper which uses Svelte.

![Looking up at the night sky through some trees in Lapland, Finland](https://dev-to-uploads.s3.amazonaws.com/i/wrghw8jw0p3jimck048l.png)

Sigh...Saw the video with Elijah McClain. Makes me sad. Found out that it happened LAST YEAR! Makes me furious! Learned nothing happened to the police officers. Doesn't surprise me.

Have a great night and be safe!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube zqGSMcgut6U %}
Few Rules of Studying Every Developer Should Follow
Tags: software, developer
Published: 2020-06-26 00:35:40


> Being a self-taught programmer, We already knew what we had to do and how to learn efficiently and quickly. In this post, I will go over a few rules that we should follow whenever we have to learn something new.

---
### 1. **Recall what you’ve just learned**
> After going through a chapter or coding exercise, do something else and remember the main ideas of what you learned.
Try recalling them when you are doing mundane activities like doing the dishes, going out to the store, or taking a shower.
The ability to recall new things you learned will help you cement them in your mind much more easily.

---
### 2. **Train your mind like you would train your body**
> Spread out your learning a little every day, just like a bodybuilder. The brain is like a muscle – it can handle only a limited amount of exercise on one subject at a time.

> Try to split your learning routine into something similar to muscle groups:

* **Database management day (SQL/NoSQL)**
* **REST API day**
* **Web Design / Web Apps**
* **Functional JavaScript day**

---
### 3. **Write the code by using your own logic**
> Write out the code as you go along with the tutorial you are watching or reading. If you cannot keep up with the pace, press pause, solve the issue or coding challenge, and then resume the video.
> So better start practicing instead of giving more time to watch the tutorials.

---
### 4. **Chunk the ideas and problems**
> The idea of chunking is to understand and practice with an idea or solution to a problem to the point where you can recall it in a split second.

> Once you have learned a new programming concept, take some time to repeat it and this repetition goes every day until you won't master into a particular language.

---
### 5. **Take some break**
> Sometimes you get frustrated that you've been stuck on a problem for so long, and it seems like you cannot figure it out. This is the ideal moment to take a break.

**Let your mind relax for a while.** 

---
### 6. **Always keep encouraging yourself**
> Sometimes you feel like the work you are putting in is not getting you anywhere. This happens to everyone from time to time. You are not to blame, honestly.

> If you want to stay motivated, make yourself feel like you are making progress.No matter what’s happening in your life, always have one thing you’re making progress with, so you feel good about it and yourself.
The most fun way to teach yourself frontend is free and was made by me
Tags: webdev, javascript, html, css
Published: 2020-06-26 00:34:50

#[Fix-a-function!](http://freecodegame.com) is an online game that you can play once each day

- 5 challenges
- Pick your language: HTML, CSS or JS
- Pick your difficulty: Easy, Normal or Hard
- Aim for a perfect score: 15

...and remember, each challenge only requires one change. So don't overthink it!

##Play today at [freecodegame.com](http://freecodegame.com)

When you finish, use the twitter icon to share your score!