teleren/devto huggingface dataset:
GoogleSpreadSeet add-on GenerateMarkdownTable is convenient
Published: 2021-03-13 06:15:58

---
title: GoogleSpreadSeet add-on GenerateMarkdownTable is convenient
published: true
description: GoogleSpreadSeet add-on GenerateMarkdownTable is convenient
tags: 
//cover_image: https://direct_url_to_image.jpg
---

- GenerateMarkdownTable
  - https://workspace.google.com/u/0/marketplace/app/generatemarkdowntable/23306117760?hl=ja&pann=sheets_addon_widget

1. menu->Add-on->Get Add-on-> GenerateMarkdownTable

2. Select range to convert markdown
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr564zyf5e2qnad30iqd.png)

3. menu->Add-on->GenerateMarkdownTable→Convert selected range to Markdown Table

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/untofo1atbg2ej22llzg.png)

4. copy to clipbord
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g67re68icy8dtmg4nczo.png)

5. Sounds good.

| No. | AAA | BBB | CCC |
| --- | --- | --- | --- |
| 1 | foo | bar | baz |
| 2 | hoge | fuga | piyo |
| 3 | あああ | いいい | ううう |
Black with Docker
Tags: docker
Published: 2021-03-13 06:12:06

_Photo by_ [_Jan Kopřiva_](https://unsplash.com/@jxk?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) _on_ [_Unsplash_](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

# Fromatting Python code remotely with PyCharm

I'm sure you've heard about [Black](https://black.readthedocs.io/en/stable), a formatter for Python. It's opinionated, but really good. One thing I disagree with - is double quotes everywhere. I prefer single. But that is disable-able.

So, what's Docker doing here? Well, you can run Black as a service. Meaning you can skip installation on a local machine and deploy straight with containers.

# Dockerfile

I've published a final [image](https://hub.docker.com/r/ceeveeya/blackd) so you can just pull that from dockerhub. Or build it yourself. Here we go with a multi-stage build to make our container slim.

```
FROM python:3.9-slim AS builder
RUN apt update && apt install -y git build-essential \
    && pip install --upgrade pip setuptools wheel black[d]

FROM python:3.9-slim
COPY --from=builder /usr/local/ /usr/local/
EXPOSE 45484
ENTRYPOINT ["blackd", "--bind-host", "0.0.0.0", "--bind-port", "45484"]
```

First we build a `builder` image, installing dependencies and Black itself. Then we just copy what we need from `builder` to the final image. That way we'll have around 160 Mb in size.

Now you can build with:

```
docker build . -t blackd:latest
```

# Container

Let's go to "Containers" side-menu in [Portainer](https://www.portainer.io) and smash the "Add container" button. Set:

- name: blackd
- image: blackd:latest OR ceeveeya/blackd:latest
- publish port: 45484:45484

A handy screenshot:
![Blackd create container](https://raw.githubusercontent.com/c-v-ya/con-con/master/screenshots/Blackd.png "Blackd create container")

And press "Deploy".

# Usage

Now when we have working Black service all is left - to use that.

## Pycharm

Add [BlackConnect](https://plugins.jetbrains.com/plugin/14321-blackconnect) plugin and set config as on the screenshot below.

![BlackConnect config](https://raw.githubusercontent.com/c-v-ya/con-con/master/screenshots/BlackConnect.png "BlackConnect config")

## VSCode

Unfortunately, I couldn't find a similar extension for this IDE. But I'm not using VSCode for python development so.. ¯\\\_(ツ)\_/¯ Let's hope somebody will make something like BlackConnect one day :sweat_smile:

---

Now your code should be formatted every time you save it!
#nestjs. Type Array in column with array NOT NULL error #825

Published: 2021-03-13 06:10:35

How can i fix this?

import { Entity, Column, PrimaryGeneratedColumn, OneToMany, CreateDateColumn } from 'typeorm';

@Entity()
export class Student {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  firstName: string;

  @Column()
  lastName: string;

  @Column()
  username: string;
  
  @Column()
  country: string;
  
  @Column()
  city: string;
  
  @Column()
  school: string;
  
  @Column()
  address: string;
  
  @Column()
  dob: string;
  
  @Column()
  gender: string;

  @Column()
  mobile: string;

  @Column()
  email: string;

  @Column()
  qualification: string;
  
  @Column("text")
  title: string;


  @Column('text', { array: true, default: "{'-1'}" })
  perferedLanguages: string;

  @Column('text', { array: true, default: "{'-1'}" })
  pastExperience: string;
  
  @Column('text', { array: true, default: "{'-1'}"})
  goodSkills: string;
  
  @Column('text', { array: true, default: "{'-1'}"})
  weakSkills: string;

  @CreateDateColumn()
  date: any
}
[Nest] 5584   - 03/13/2021, 11:05:05 AM   [ExceptionHandler] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'array NOT NULL' at line 1 +4ms
QueryFailedError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'array NOT NULL' at line 1
    at new QueryFailedError (/Users/m.tahir/projects/projects/education/education/node_modules/typeorm/error/QueryFailedError.js:11:28)
    at Query.onResult (/Users/m.tahir/projects/projects/education/education/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js:216:45)
    at Query.execute (/Users/m.tahir/projects/projects/education/education/node_modules/mysql2/lib/commands/command.js:30:14)
    at PoolConnection.handlePacket (/Users/m.tahir/projects/projects/education/education/node_modules/mysql2/lib/connection.js:425:32)
    at PacketParser.onPacket (/Users/m.tahir/projects/projects/education/education/node_modules/mysql2/lib/connection.js:75:12)
    at PacketParser.executeStart (/Users/m.tahir/projects/projects/education/education/node_modules/mysql2/lib/packet_parser.js:75:16)
[11:06:25 AM] Starting compilation in watch mode...
CSS variable chapter three "local variable" 😮
Tags: css, codenewbie, tutorial, todayilearned
Published: 2021-03-13 06:07:15

Hello my dear friends 

In the last DEV post, we have learned about "CSS override"

{% link https://dev.to/atulcodex/chapter-two-how-to-override-css-variable-5djd %}

In this DEV post, we'll learn about CSS local variable, it means which is not **:root** global variable :)

CSS local variable is used to make changes locally at some specific section of the web pages.

Aaaaaab, Imagine like we want to change our navbar colour only by a local variable. So to do this we have to create a local variable for the navbar like this.

```
#navbar {
    --nav-green: green;
}
```

And use like this
```
#navbar a {
    color: var(--nav-green);
}
```

Note: keep in mind that we can use this variable only of navbar means for local.

To clear your all confusions play around with this codepen project.

{% codepen https://codepen.io/atulcodex/pen/OJbrwwd %}

Ok, that's it for this DEV post and in the next DEV post, we will learn about "theming" in the CSS variable.

If you have any questions or doubts about CSS local variable you can comment below, maybe we can learn something new from your doubts.
node js express error (node:16508) UnhandledPromiseRejectionWarning: TypeError: Cannot read property(solution)
Tags: node, express
Published: 2021-03-13 05:37:49

trying to working with insert data into MongoDB and it was tasted by the POST Man testing tool but it shows me the below error:
(node:16508) UnhandledPromiseRejectionWarning: TypeError: Cannot read property
at this time I was not sure why this has happened then I was trying to search to find out it after a couple of time I find what was my mistake. the mistake I did which is I did not import middleware in my index file. so to solve this I goto this index.js file and import middleware there which is like below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h34tahjn5ha6jxoldntp.PNG)
after importing this now everything is okay.
now my postman is like below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k6mt3cns6ll60zwas4c5.PNG)
.
that's it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer💻
Join my game jam on itch.io
Published: 2021-03-13 05:31:57

Hi, it's CoderBroDev here. For past 5 years, I have been into coding and game development and the first itch.io release helped me to improve my rusty game development skills. Today it marks the day of my 5 year game development anniversary and I continue on and on. As a present from my side, I hosting my very first game jam internationally for everyone to take part in.
Topic will be announced tommorow
For the jam, I'll try to pick a crazy and unconventional topic, pushing you to the limits of your creativity. Note, that the topic is meant for those who want to challenge their design skills. Following the topic is not a requirement!

Link to the jam-https://itch.io/jam/cyber-jam-1
Get PMP Certification Training Online
Tags: projectmanagement
Published: 2021-03-13 05:13:19


Project Management Professional certification courses are the most sought industrial recognition certification courses for project managers all across the globe. PMP certification program enhances the skill levels required for project management with the latest guidelines of the PMI and offered professional certification for management practitioners.

https://www.careerera.com/project-management/pmp-certification-training
Post Graduate Program in Data Science
Tags: datascience
Published: 2021-03-13 05:07:46

Post Graduate Program in Data Science course gives you wide coverage to main ideas and techniques from Python, Data Analysis to Machine Learning, and more. Careerera helps to equip your career PGP program in Data Science.

https://www.careerera.com/data-science/post-graduate-program-in-data-science
Azure ML workspace
Tags: azure, azureml
Published: 2021-03-13 03:47:47

Azure ML has a top-level component which is the **Workspace**. The workspace contains all the components of the Azure Machine Learning space.  

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vi0un3grhigep5fthle4.png)
 

The workspace is associated with  

* Azure subscription  
* Azure Key Vault
* Azure Application Insights  

It is associated with the following **assets**  

* Datasets  
* Experiments  
* Pipelines
* Models
* EndPoints  

The workspace **manages** the following

* Datastores
* Compute  

The workspace can be used for authoring

* Notebooks  
* Automated ML
* Designer

You can implement via **code** 

```
import azureml.core
print(azureml.core.VERSION)
```
```
from azureml.core import Workspace
from azureml.core.authentication import InteractiveLoginAuthentication

sid = <your-subscription-id>
forced_interactive_auth = InteractiveLoginAuthentication(tenant_id=<your-tenant-id>)
ws = Workspace.create(name='azureml_workspace',
            subscription_id= sid, 
            resource_group='rgazureml',
            create_resource_group = True,
            location='centralus'
            )
```
Show Dev: A Hugo Theme That Feels Like a Milligram
Published: 2021-03-13 03:44:27

No hugo theme out there satisfied my itch, so I had to build it myself.

![mita first](https://raw.githubusercontent.com/vinliao/mita/master/images/mita-1.png)

![mita second](https://raw.githubusercontent.com/vinliao/mita/master/images/mita-2.png)

For demo, you can go https://vinliao.com

For github repo, https://github.com/vinliao/mita
The luck of the covid draw from a long hauler
Published: 2021-03-13 03:04:38

---
title: The luck of the covid draw from a long hauler
published: true
description: a tale about covid, long covid and a bit about life.
tags: 
//cover_image: https://direct_url_to_image.jpg
---
Luck is a funny thing. Sometimes you have it. Sometimes you don't. And even sometimes when you don't have you are still luckier than others. Isn't that still luck?

It is March. One year since the quarantine started. I remember how excited I was for my yearly Spring Training trip to Arizona when everything shut down. If I was traveling one week earlier, I would have made it. My brother did and posted some great happy pics with his friends. I love that for him, but...

Move forward to June and I start to feel sick. I knew it couldn't be covid since I hadn't been anywhere. Well, to the grocery store but that was with a mask, washing hands and all the things.

Still sick two weeks later, the doctor sent me for a covid test. I'd've lost a lot of money if anyone bet me on that as it was positive.

There starts:

 * three months of a fever
 * problems breathing
 * no energy - really no energy, I could barely get out of bed
 * pain - some severe - in all parts of my body 
 * eye problems
 * head fog and memory challenges - how do you go from remembering most things to not remembering words or what someone just said? I never related more to "Squirrel!" in my life. 

<img src="https://media.giphy.com/media/NoHe3HpB1Mg8w/source.gif"><p><a href="https://giphy.com/gifs/movie-up-NoHe3HpB1Mg8w">via GIPHY</a></p>

And the list goes on and on, with multiple infections, cough, insomnia, losing my voice, and oh so much more. Never has the question "How are you feeling?" been so hard to answer? I have become a living game of whack-a-mole!

<img src="https://media.giphy.com/media/NoHe3HpB1Mg8w/source.gif"><p><a href="https://giphy.com/gifs/movie-up-NoHe3HpB1Mg8w">via GIPHY</a></p>

Coming back to luck, even though I am still extremely limited and new symptoms keep appearing, I still feel luckier than many. Who else gets to go to a special doctors area where they dress as if I am a leper!

<img src="https://media.giphy.com/media/S6BBa18eSQpAEIwWrr/source.gif"><p><a href="https://giphy.com/gifs/GetMonero-monero-hazmat-xmr-S6BBa18eSQpAEIwWrr">via GIPHY</a></p>

I have my moments where I allow myself a little pity party but then I have to shake it off. 

Covid doesn't define me. I am lucky I am here. I have more empathy and understanding for others who are suffering from things like memory loss. I will get better and I will just keep on this journey one step (or crawl, depending on the day) at a time.
Generate Different Background color based on ul depth using css variable
Tags: css, webdev
Published: 2021-03-13 02:54:12

So Recently i have come across a requirement where i had to create separate background-color based on ul deptt, i had html like this 

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

To do so i used two CSS Magical things. For Background color when we use *hsl* to define a color we can control a color based on a number. like this 

***
  background-color: hsl(100, 100%, 50%);
***

HSL is literally stands for Hue, Saturation, Lightness, so does the parameters. So changing hue will change the color. 

Now second part is to figuring out dynamic number. Thanks to CSS variables we can define variables in css now. but i don't wanted to define hue number in css rather wanted to do using depth number which we can then convert to hue number using another css magic function which is calc. let me show you what i mean.

***
html {
     /* Define a variable */
     --depth:0;
}
ul {
     /* Define background color */
     background-color:hsl(calc(100 + var(--depth, 1) * 40 ), 100%, 50%);
}
***

here calc returns ***100*** for ***--depth:0*** and ***140*** for ***--depth:1***.

Now css part is done, in html we will override --depth variable value based on ul depth. 

so now html would look like this

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8seqd94rkgf7duefi38c.png)


thats it. You will see different background colours all done in css. 

You can check working snippet here. 
https://codepen.io/jiteshdhamaniya/pen/NWboMKZ

Let me know if anyone does have better solution. See you next time. 

P.S. - was having hard time, formatting ul, li code here, hence did the images.
please tell me "why"
Tags: webdev
Published: 2021-03-13 02:06:57

I am currently in a phase, where I am sort of reflecting on my past 1,5 years of web development. I am trying to see how things went and what decisions I could make to improve.

Sometimes, thinking about what libs and frameworks to use is so hard. There is so much abundance, it is overwhelming. And it just keeps growing.

I just read [this tweet](https://twitter.com/dan_abramov/status/1368710730812432389) from  Dan Abramov:

> "Hell is other people's abstractions"

Made me laugh. It is just so true :joy:.

Committing to fundamental abstractions is one of the things I believe one needs to be most careful about: you will literally get used to thinking in them. I still mourn about the many people who were sold into one of the biggest hoaxes of computer science: "inheritance for code reuse" - The 3 Amigos made some decent cash by selling dogs that "woof" and ducks that "quack".

I decided for myself, that from now on I will only try out and possibly commit to abstractions if I can see a strong "why". I need to see strong reasons, conceptually, that something is a really good idea. Minimalism and low-key are not just nice, but an absolute must-have.

I was happy to see, that there can be libs that fulfill my ideals when I discovered [jotai](https://github.com/pmndrs/jotai) and [zustand](https://github.com/pmndrs/zustand) for React state. On the very first time I looked into them, I was able to infer this "why". I was able to project into the future, if I write code like that, the experience of doing so will be pleasant and things will turn out well.

When I looked into Redux it was more like: "Yeah, I get it, it's by no means bad engineering, but I can't see a possible reality where I write code like that." :sweat_smile:

I wish, that docs would focus on this "why" aspect more often. Usually, they only tell you "how". There's the obligatory introduction (like the counter sample) and then there are recipes of various sorts. 

But the "how" is only interesting after you committed to the abstraction. Outside the "mental box" of the abstraction, it has no relevance. The "why" is important to decide whether to step into this "mental box" or not. 

Docs rarely provide really strong and convincing support for the "why" (if they do, instant trust explosion). So please tell me "why" more often :pray:.
OVH Strasbourg: Halt and Catch Fire, Data Uploaded to the Cloud
Tags: news, datacenter, jokes
Published: 2021-03-13 01:21:15

> This post is originally published on yoursunny.com blog https://yoursunny.com/t/2021/OVH-halt-and-catch-fire/

2021-03-10, an OVH Cloud data center in Strasbourg, France caught on fire.
Thousands of servers have been destroyed by fire.
Thousands more are currently unavailable due to power cut, and will remain offline for several more days.

Data stored in those servers have been uploaded to the cloud via black smoke.
![a building is burning with black smoke rising to the sky](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rt3eavens1syfbvutdmd.png)

According to Hacker News, a Dev mistakenly invoked the [Halt and Catch Fire](https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_%28computing%29) instruction on an Uninterrupted Power Supply unit, causing this incident.

Chairman of OVH cloud advised clients to activate their disaster recovery plans, such as restoring off-site backups to a new cloud server.
Some clients are crying because they did not have backups, or they stored their backups on another machine in the same data center.
Other clients experienced no downtime because they designed their systems for datacenter scale redundancy.
[![datacenter scale](https://imgs.xkcd.com/comics/datacenter_scale_2x.png)](https://www.explainxkcd.com/wiki/index.php/1737:_Datacenter_Scale)
Welcome to Perl Fine Channel!
Tags: perl, youtube, webdev
Published: 2021-03-13 01:15:59

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

This is my first introduction of my Japanese Perl Programming Channel.

https://www.youtube.com/watch?v=L4sRR7UiW4Y

Perl is good at Text Processing and Regular Expression.

Perl resolves your daily works quickly.

Perl is useful for Web Development.

Enjoy!
Where can I host PostgreSQL with custom extensions for cheap (or free)?
Tags: postgres, database, help, devops
Published: 2021-03-13 01:04:58

Of course, I can easily host on DigitalOcean, but there will be price per month; and at least half a hundred USD per year.

I can host on Heroku, but not only that there are limited 10k rows, but also **no custom extensions**.

I open-sourced the repo, anyway; and one can use it to make Anki. But I want to service further, and get more audience. (But I won't want to cost my wallet too much.)

{% github patarapolw/cjclub no-readme %}

What extensions? You can see my Dockerfile.

```dockerfile
# Based on debian-slim
FROM postgres:12

RUN mkdir -p /app
RUN apt-get update

# pgroonga extension
# Does not officially support alpine
RUN apt-get install -y wget
RUN wget https://packages.groonga.org/debian/groonga-apt-source-latest-buster.deb
RUN apt install -y -V ./groonga-apt-source-latest-buster.deb
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get update
RUN apt-get install -y -V postgresql-12-pgdg-pgroonga
RUN apt-get install -y -V groonga-tokenizer-mecab
RUN apt-get install -y -V groonga-token-filter-stem

RUN apt-get install -y git make

# postgres-json-schema extension
WORKDIR /app
RUN git clone --depth 1 https://github.com/gavinwahl/postgres-json-schema.git
RUN cd postgres-json-schema && make install

# groonga-tokenizer-friso extension
# WORKDIR /app
# RUN apt-get install -y build-essential automake libtool libgroonga-dev
# RUN git clone --depth 1 https://github.com/kenhys/groonga-tokenizer-friso.git
# RUN wget -c https://github.com/lionsoul2014/friso/archive/v1.6.4-release.tar.gz -O - | tar -xz
# RUN cd friso-1.6.4-release/src && make && make install
# RUN cd groonga-tokenizer-friso && ./autogen.sh && ./configure --with-friso=/usr --with-friso-ini=../friso-1.6.4-release/friso.ini && make && make install

# pg_jieba extension
WORKDIR /app
RUN apt-get install -y cmake build-essential postgresql-server-dev-12
RUN git clone --depth 1 https://github.com/jaiminpan/pg_jieba.git
WORKDIR /app/pg_jieba
RUN git submodule update --init --recursive
RUN mkdir build && cd build && cmake -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/12/server .. && make && make install
```