teleren/devto huggingface dataset:
Reverse Engineering the Corona Virus
Tags: python, tutorial, showdev, programming
Published: 2020-12-09 10:00:34

In this post we will be analyzing the Corona Virus 2 aka SARS-CoV-2 from first principles.

# Let’s Talk Molecular Biology
![DNA to protein](https://miro.medium.com/max/512/1*u2wvvV4Pi2s-8cyGYlg_RQ.png)
At a high level we can think of DNA as blueprints, RNA as the instructions, and Proteins as functions. From High school Biology class we can remember that DNA is made up of 4 nucleic acids guanine, adenine, cytosine and thymine; in RNA, uracil is used in place of thymine in a process called transcription. There are 20 common Amino acids each defined by a sets of three mRNA nucleotides (A, U, G and C). Proteins are a sequences of amino acid chains which fold into a specific shape to define its function.
{% gist https://gist.github.com/tenexcoder/7b1efae579ca0c623af0ce5c065abf15 %}
Lets summarize what we learned from the interactive notebook above. We obtained both the genome and protein structure from the NCBI data bank. First we analyzed the annotation from the genome and dicover that its taxonomy is virus and that it molecular type is single stranded RNA. From there we explored its genome and throught the transcription and tranlsation process to obtain its amino acid sequence. To expedite the process we used the metadata to retrieve its protein coding sequences (CDS). 

The 10 main CDS are A Chain of Proteins (ORF1ab), Spike Protein (S), Escape Artist (ORF3a), Envelope Protein (E), Membrane Protein (M), Signal Blocker (ORF6), Virus Liberator (ORF7a), Mystery Protein (ORF8), Nucleocapsid Protein (N), Mystery Protein (ORF10). The two important proteins to remeber are ORF1ab which funtion as the payload and S which is the exploit. The rest of the proteins assist to make everythig happen. Lastly, we visualized a 3d model of the main protein structure.

For a visual walkthrough visit [The New York Times Infographic]
(https://www.nytimes.com/interactive/2020/04/03/science/coronavirus-genome-bad-news-wrapped-in-protein.html)
Complex SQL programming in Java
Tags: java, oop
Published: 2020-12-09 09:50:36

Java and SQL have come a long way. SQL is an "old", yet established and well-understood technology. Java is a legacy too, although its platform JVM allows for many new and contemporary languages built on top of it. Yet, after all these years, libraries dealing with the interface between SQL and Java have come and gone, leaving JPA to be a standard that is accepted only with doubts, short of any surviving options.
ObjectiveSQL has come to fill this gap.

### Features

- With one annotation your Class has fully featured capabilities of SQL programming
- Easy to relational(has_one, has_many and beglongs_to) query and paged query
- Writing SQL expressions(arithmetic, comparison and logical) with Java syntax

Java codes:

```java
// SQL programming with Java syntax without losing the features of SQL syntax
Order.Table orderTable = Order.asTable();
Select select = new Select();

select.project(sum(orderTable.amount) / sum(orderTable.quantity) * 100)
        .from(orderTable)
        .where(orderTable.quantity > 30 &&
            orderTable.salesAt.between("2020-10-10 00:00:00", "2020-10-30 23:59:59"))
        .groupBy(orderTable.productId);
```

SQL generated:

```java
-- SQL syntax is the same as Java syntax
SELECT ((((SUM(`T0`.`amount` ) / SUM(`T0`.`quantity` ) )) * 100))
FROM `orders` AS `T0`
WHERE ((`T0`.`quantity` > 30) AND 
       `T0`.`sales_at` BETWEEN '2020-10-10 00:00:00' AND '2020-10-30 23:59:59')
GROUP BY `T0`.`product_id`
```
Tech Exceptions new Episode - Stop wasting your time with Old-School Logging
Tags: career, azure, startup, techtalks
Published: 2020-12-09 09:45:40


🎙️ Jonah Kowall, CTO of [Logz.io](https://logz.io/freetrial/?utm_source=microsoft_youtube&utm_medium=referral&utm_campaign=tech_exceptions%C2%A0), joins [Adi Polak](https://twitter.com/AdiPolak) to discuss his career path transition from engineering, an analyst at Gartner and all the way to becoming CTO of Logz.io. 

 

Logz.io recently closed the latest funding round which brings the total capital raised to a whopping $120 + million greens 🤑 .
That includes $74 million raised over the last 18 months. That amount of available capital allows the company to accelerate product development initiatives around AI and Machine Learning, expand headcount and propel go-to-market activities around the globe. 

 
📊 Fun fact, Logz.io is built on Open Source alone, they built the platform to be completely cloud-agnostic. 
However, for their machine learning purposes, they use [Bing Search API](https://docs.microsoft.com/en-us/azure/cognitive-services/bing-web-search/?WT.mc_id=techexceptions-11139-adpolak) to enrich the data, which gives you 1000 transactions free per month to search for images, news, videos, visuals, and general web search.


If you are interested to learn how to deploy ELK (Elastic, Logstash, and Kibana) stack on Azure, check this link [here](https://azure.microsoft.com/en-us/overview/linux-on-azure/elastic/?WT.mc_id=techexceptions-11139-adpolak).

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

## Alright,
Grab your favorite drink and get ready to be enlightened ✨


## [Watch Now!](https://aka.ms/AAadtr0)
![](https://media.giphy.com/media/3oxHQoNY93SgETHh2E/giphy.gif)


We hope you will enjoy it and happy to take your career and startup questions at [@adipolak](https://twitter.com/AdiPolak) and [@TechExceptions](https://twitter.com/TechExceptions)
What DBs would you recommend to master in 2021?
Tags: watercooler, database
Published: 2020-12-09 09:36:54

---
title: What DBs would you recommend to master in 2021?
published: true
description: 
tags: watercooler, database
cover_image: https://miro.medium.com/max/3840/1*ikuJuYk7INiHdgX_9qaNWQ.jpeg
---
Databases are something I always wanted to explore more and get better at. Thus the question, what DBs would you recommend learning for 2021? Which ones do you see holding future potential?

As of now, I like PostgreSQL for relational and MongoDB for all the non-relational stuff. Both seem to be solid for their purposes.
What are the things that an Asp.Net developer should know in 2020 ?
Tags: dotnet, career, computerscience, tutorial
Published: 2020-12-09 09:28:11

Whether you are a beginner or veteran ASP.NET developer, You would focus on the following items:

ASP.NET Core 1.0
ASP.NET MVC Core 1.0
EF Core 1.0
ASP.NET WebAPI
SignalR Core

ASP.NET Core 1.0
It’s faster, sleeker, and the RTM just came out. It changes how Microsoft developers will write web applications.

ASP.NET MVC Core 1.0
The biggest change here is on the Middleware pipeline currently in place at startup. This allows you to define your software requirements upfront and focus on your application. It’s also completely asynchronous now.

EF Core 1.0
Entity Framework has come a long way (especially the jump from 1.0 to 4.0 :-p ). The ORM now includes Batch processing of SQL Statements and Asynchronous operations.

ASP.NET WebAPI
Since Software is still eating the world, API’s are an absolute must to know. ASP.NET WebAPI is similarly based on the MVC model, so once you know ASP.NET MVC, you can easily translate that knowledge into writing WebAPIs.

SignalR Core (scheduled for this year since Core RTM was released)
SignalR was introduced almost 5 years ago and has changed how I look at AJAX calls. SignalR Core isn’t out yet, but this will be a game-changer when coupled with ASP.NET MVC Core. I talk about it on my site all the time.

Click here to become an Asp.Net Developer : https://nareshit.com/asp-net-mvc-online-training/
Free Agency Landing Page Templates
Published: 2020-12-09 09:18:46

So you've finally decided to take the plunge and set up your own agency. Now, to start building your brand, one of the very first things you'd need is a kick-ass website that not only looks good, but is also functional and easy to use. But websites cost money - even more so if they are built from scratch. So how do you go about balancing your budget and developing your website just right? Simple - you just get one of our **[ABSOLUTELY FREE React landing page templates](https://startuplanding.redq.io/)**!

We've got not one or two, but **FIVE** free React landing templates built specifically with agencies in mind. [Agency Classic](https://startup-agency-classic.vercel.app/), [Agency Modern](https://startup-agency-modern.vercel.app/), [Agency Minimal](https://startup-agency-minimal.vercel.app), [Agency Creative](https://startup-agency-creative.vercel.app/) and [Agency Alpha](https://startup-agency-alpha.vercel.app/) are all free landing page templates suitable for different types of agencies.

These free React landing templates pack a powerful punch when it comes to features and functionality. Alongside React, these landing templates are also built using Next JS and Gatsby, making them super fast, SEO friendly and also secure. On top of that, there's also Mailchimp integration to help make managing leads and communicating with clients that much easier!

Functionality aside, these free React landing page templates are designed with the perfect combination of simplicity and elegance. This translates to a clean, visually pleasant look that's guaranteed to improve user experience and add to the credibility of your brand.

Oh and did I mention that new templates are added weekly to the existing range? So keep [watching this space](https://startuplanding.redq.io/) for more!!

👉 Check them live here: https://startuplanding.redq.io/
👉 Check them on Github: https://github.com/Startup-Landing/Startup-Landing
👉 Check them on Producthunt: https://www.producthunt.com/posts/startup-landing
How to access API keys from environment variables in front-end application using Serverless Functions of Netlify
Tags: serverless, javascript, tutorial, webdev
Published: 2020-12-09 09:17:12

Please read the previous [post]() first if you are not aware of the terms API, environment variable, netlify.

### **How to access API keys from environment variables in Netlify?**
In the previous post, I explained how to setup your API key as environment variable in Netlify. You can easily access them in your application by appending the keyword to `process.env`
```javascript
process.env.SERVER_API_KEY
```

### **But I cannot access `process.env` in my JavaScript application!**
You will not be able to access `process.env` directly in your front-end application without using a package.

### **I don't want to use any package. Is there any other way?**
Yes! This is the part where *Serverless Function* comes into play.

### **What is a Serverless Function?**
> Conventionally, serverless functions are single-purpose, programmatic functions that are hosted on managed infrastructure. These functions, which are invoked through the Internet, are hosted and maintained by cloud computing companies.

Read more about it [here](https://www.pubnub.com/blog/what-is-a-serverless-function/)

### **How to create a Serverless Function in Netlify?**
First, please click [here](https://docs.netlify.com/functions/build-with-javascript/) to read the documentation on Netlify to understand the general syntax.

Now, this is how you would setup your serverless function:
1. Create a path where you will keep all your serverless functions. I have created `.netlify/functions/`

2. Inside that path, create a js file which will hold the code for your serverless function. I have named it `api.js`

3. Finally, put your code inside the file:
```javascript
exports.handler = async (event, context) => {
    return {
        statusCode: 200,
        body: JSON.stringify({
        api: process.env.SERVER_API_KEY
        }),
    }
}
```
In the above code, I have attached the key `process.env.SERVER_API_KEY` of my environment variable to a keyword *"api"* which we will use at the time of extraction.

That's all! Now head back to your app.

### **How to access the API Key using the Serverless Function?**
In your main js file where you want the API Key, write this simple fetch with the path to your api.js:
```javascript
let serverURL;

fetch(".netlify/functions/api")
.then(response => response.json())
.then(json => {
    serverURL = json.api;
})
```
In the above code, we parse the *response* to *json*, then we are extracting *api*, which was our keyword holding `process.env.SERVER_API_KEY` in the Serverless Function. As we know, at runtime `process.env.SERVER_API_KEY` is replaced with the actual value of the environment variable. Now you can use it in your program.

That's all folks! If you want to learn how to setup your API Key in Nelify, read this [post](https://dev.to/irohitgaur/how-to-secure-api-key-by-storing-it-as-an-environment-variable-in-netlify-189).

#### **If you have any queries, get in touch with me on [Twitter](https://twitter.com/iRohitGaur)**
How to secure API key by storing it as an environment variable in Netlify?
Tags: netlify, security, webdev, javascript
Published: 2020-12-09 09:16:50

### **What is an API key?**
It is a unique identifier used to authenticate the API requests of a project.

### **Why to keep an API key private?**
Let's say you are consuming an API in your application which uses an API key. You would want to keep that key away from the reach of other people. If someone with a malicious intent gets hold of your API key, they could use it for their own personal chores and you might end up getting billed for something you did not consume. Even if it is not a paid API, you could face privacy and/or personal data leak. There are many security threats attached with unsecure API keys, make sure to read more about it.

### **What is an environment variable?**
It is a set of key-value pair, stored outside the program; in the server.

### **Why to use an environment variable?**
There are multiple use-cases for an environment variable, I will address them in context of a front-end application.
* As they are stored outside the program, they are safe from prying eyes and an attacker won't be able to just browse through your source code and get your API key.

### **What is Netlify?**
> Netlify is a San Francisco-based cloud computing company that offers hosting and serverless backend services for web applications and static websites.

### **How to store API key in environment variables?**
To continue, you will have to host a website on Netlify first. You can do that for free as well. [Click here](https://www.netlify.com/) to open Netlify.

If you already have a website hosted with Netlify, you can follow these steps:

1. Go to Site overview and select *Site settings*
![Site settings](https://dev-to-uploads.s3.amazonaws.com/i/ajlkz5947mb1yw7il5wa.png)

2. On the left panel, under *Build & deploy*, select "Environment", then select "Edit variables"
![Environment](https://dev-to-uploads.s3.amazonaws.com/i/f75awm43gknwm9nb5in2.png)

3. You can now enter a keyword in the *Key* field (eg: SERVER_API_KEY) and the API key (eg: abcdefghijklmnopqrstuvwxyz) in the *Value* field and *Save*
![API Key](https://dev-to-uploads.s3.amazonaws.com/i/oanki958ibna9ye39sxc.png)

You have successfully saved an API key as environment variable in Netlify.

[Click here](https://dev.to/irohitgaur/how-to-access-api-keys-from-environment-variables-in-front-end-application-using-serverless-functions-of-netlify-432c) if you are interested to know how to access the API key (stored as environment variable in Netlify) in your front-end application using Serverless Functions.

#### **If you have any queries, get in touch with me on [Twitter](https://twitter.com/iRohitGaur)**
How to align DevOps and ITIL
Tags: devops, itil
Published: 2020-12-09 09:07:04

What unites ITIL and DevOps? For sure, continual improvement.
ITIL followers concentrate on delivering value through beneficial outcomes, while DevOps followers' focus is on upgrading technical practices for it. We consider services and products as related things so we can say that both ITIL and DevOps are working for a common goal-to deliver value to a customer. 

The main question the head of the product should ask his team that wants to achieve its goals is: *“Do my team's methods or capabilities align with the service team's methods or capability?”*

The connection is important.A flow of updated knowledge should move from the service organization so as service operations can assist customers and provide value quickly. And vice versa, service operations should overcome issues, provide more information about them, process complaints and monitor trends. The data stream should become a feedback loop that helps developers and technology operations team improve their own capabilities and processes.

If you want to learn more about aligning DevOps and ITIL, you may read <a href="https://exceed-team.com/tech/how-to-align-devops-and-itsm">the article</a> to the end.

DevOps engineers, what is your experience of working with ITIL practitioners?
How does troll (tech) become cute?
Tags: qt, history, discuss
Published: 2020-12-09 08:34:57

BTW, [is Qt pronounced as "cute", "cutie" or something else?](https://en.wikipedia.org/wiki/The_Qt_Company)

How did it earn such a nice naming?

What are other instances of [Troll](https://en.wikipedia.org/wiki/Troll)-like naming become later famous? (But maybe not expected to go that far the first place?)
Remove Blank Lines in Word Document in Java
Tags: java, word, paragraph
Published: 2020-12-09 08:26:05

There may be some blank lines/empty paragraphs left in the process of processing our Word documents, and it must be time-consuming if you manually remove these blank lines. Therefore, this article will introduce a simple solution to batch remove these blank lines/empty paragraphs with Free Spire.Doc for Java.

**Installation**
**Method 1:** Download the [Free Spire.Doc for Java](https://www.e-iceblue.com/Download/doc-for-java-free.html) and unzip it. Then add the Spire.Doc.jar file to your Java application as dependency.

**Method 2:** You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.
```xml
<repositories>
   <repository>
      <id>com.e-iceblue</id>
      <name>e-iceblue</name>
      <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
   </repository>
</repositories>
<dependencies>
   <dependency>
      <groupId>e-iceblue</groupId>
      <artifactId>spire.doc.free</artifactId>
      <version>3.9.0</version>
   </dependency>
</dependencies>
```

**Below is the sample document which contains many blank lines:**
![](https://dev-to-uploads.s3.amazonaws.com/i/745pjsesrwnj3g8ey07c.png)

**Code Snippet**
```java
import com.spire.doc.*;
import com.spire.doc.documents.*;

public class removeBlankLines {
    public static void main(String[] args) {

        //Load the sample document
        Document document = new Document();
        document.loadFromFile("sample2.docx");

        //Traverse every section in the word document and remove the null and empty paragraphs
        for (Object sectionObj : document.getSections()) {
            Section section=(Section)sectionObj;
            for (int i = 0; i < section.getBody().getChildObjects().getCount(); i++) {
                if ((section.getBody().getChildObjects().get(i).getDocumentObjectType().equals(DocumentObjectType.Paragraph) )) {
                    String s= ((Paragraph)(section.getBody().getChildObjects().get(i))).getText().trim();
                    if (s.isEmpty()) {
                        section.getBody().getChildObjects().remove(section.getBody().getChildObjects().get(i));
                        i--;
                    }
                }
            }
        }

        //Save the document to file
        String result = "removeBlankLines.docx";
        document.saveToFile(result, FileFormat.Docx_2013);
    }
}
```

**Output**
![](https://dev-to-uploads.s3.amazonaws.com/i/ls5fs99mx7mfayqlh9c4.jpg)
How to fix php memory limit errors
Tags: php
Published: 2020-12-09 07:57:54

<h3> If you are having composer memory limit issues </h3>
`COMPOSER_MEMORY_LIMIT=-1 composer install`
This will temporary remove the php memory limit. -1 (infinite memory usage) is not recommended if the server is running a site/sites that is/are live as it could overload the server. In this scenario use a different memory size e.g.`COMPOSER_MEMORY_LIMIT=512M`. If the server is in maintenance mode then -1 should be fine to use, just be cautious. To find your current memory limit setting run: `php -i | grep "memory_limit"`

<h3> Memory limit issues in scripts </h3>
Put the following 
`ini_set('memory_limit', '64M');`

<h3> Useful commands on Mac </h3>
To find your php.ini file run:
`php -i | grep "Loaded Configuration File"`

or:
To find all php.ini files on your machine:
`sudo find / -name php.ini`
kill the process after the main process has finished using Ctrl + C. 

To get the memory limit:
`php -i | grep "memory_limit"`

<h3> Useful commands on Linux </h3>

To view locations of all of your php ini files (on linux only - To install do: `sudo apt install mlocate`):
`locate php.ini`

`php -i` gives a print out of the ini php which your php is using. 
To find he location of this ini file run:
`php -i | grep "Loaded Configuration File"`

Sometimes a there are two php.ini files -> like in Laravel Forge where there is one for the CLI and one for the FPM.
To view how much space is allocated in your CLI php ini file:
`php -i | grep "memory_limit"`

To view how much space is used in your FPM ini file (change to php version):
`grep "memory_limit" /etc/php/7.3/fpm/php.ini`

to view peak usage in a script:
`var_dump(memory_get_peak_usage()/1024);`

Normal directory:
cd /etc/php/7.4
Floating Point Operations | Shell Scripting 
Tags: linux, bash, tutorial, beginners
Published: 2020-12-09 07:12:05

**This is a multipart blog article series where I am going to explain the concepts of shell scripting and how to write a shell script in Linux, UNIX or Mac based systems. You can also follow this tutorial blog using windows but for that you have to install a bash from.**

_We cannot solve floating point numbers using simple arithmetic operations. So in this article we will see that how we solve floating point numbers._

We cannot perform arithmetic operations on decimal using previous methods, it will give an error. For that we use `bc` which stands for basic calculator.
- We can use bc command in this way `echo “20.5+5” | bc`
- But there is a problem with division that it will not show the values after decimal. So to remove that we have to define a variable scale like this `echo “scale=2;20.5+5” | bc`
- Here we can see the value till `2` decimal places.
- We can also solve/calculate square root of some number and can also solve trigonometric equations using the `bc` keyword.
- If you want to use variables then the syntax becomes `echo “$<variable_name1>+$<variable_name2>” | bc`. Here num1 and num2 are variables which have some value in it.
- We can calculate the square root of a number in this way `echo “scale=2;sqrt($<variable_name>)” | bc -l`
- To calculate we have to use a function called sqrt and pass the variable name to it, whose square root we want to calculate.
- But sqrt function is a math function and we need to call. To call math function we use `-l` command.
- We can also calculate power of any number like this `echo “scale=2;3^3” | bc -l`
- You can get more information about `bc` command by just typing `man bc` in terminal.

[Reference code file for this article](https://github.com/rahulMishra05/shell-scripting/blob/main/video11.sh)

_So this was all about performing arithmetic operations on floating point numbers. Hope you liked it and learned something new form it._

If you have any doubt, question, quires related to this topic or just want to share something with me, than please feel free to contact me.

### 📱 Contact Me

[Twitter](https://twitter.com/r_mishra10)
[LinkedIn](https://www.linkedin.com/in/rahul-mishra-66210b185)
[Telegram](https://t.me/rahul_mishra10)
[Instagram](https://www.instagram.com/rahul_mishra10/?hl=en)

### 📧 Write a mail
<rahulmishra102000@gmail.com>

#### 🚀 Other links

[GitHub](https://github.com/rahulMishra05)
[HackerRank](https://www.hackerrank.com/rahulmishra10201)