teleren/devto huggingface dataset:
Acra. Features: Database request firewall
Tags: cryptography, security, encryption, database
Published: 2022-02-23 16:03:39

Like in real life, the more coping strategies people have, the bigger opportunities and less friction on their way to the goals they have. So we equipped Acra database security suite with proactive measures against suspicious and malicious database queries.

> *[Use Acra Community Edition for free] (https://github.com/cossacklabs/acra). Check out [Acra Enterprise Edition] (https://www.cossacklabs.com/acra/#pricing) tailored for solutions with high security requirements.*

##6️⃣ AcraCensor—Acra Database Firewall

[Acra Database Firewall (aka AcraCensor)] (https://docs.cossacklabs.com/acra/security-controls/sql-firewall/) is an SQL firewall module for Acra that checks every incoming SQL request. AcraCensor logs SQL requests directed to the database, allows and denies those requests according to the rule list you’ve configured.
 
💡 AcraCensor can be configured for your exact use case, allowing you to set up an allowlist and a denylist for particular tables, columns within a table, regex query patterns, or exact queries. 

![Database Firewall. Acra by Cossack Labs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7duws75qco6dcv7kuusa.png)

Depending on your security goals, **AcraCensor can react in different ways**: reject the query with error, provide forged data in response, or even shut down the whole Acra cluster.
 
> AcraCensor's goal is to protect the database from SQL injections and suspicious SQL queries. It is compatible with SIEM systems, providing logs that can be used for alerts' configuration and anomaly detection.
 
AcraCensor is a SQL firewall, which works on a different level than web application firewall (WAF), but they can work together. Read more about the difference between [SQL firewalls and WAFs] (https://www.cossacklabs.com/blog/how-to-build-sql-firewall-acracensor.html) in our blog.
 
🔥 Defense-in-depth requires multi-vector attention efforts. And when in a big game you open new ways, we provide our security multi-tools to cover you from threats.
fhir-integratedml-example overview
Published: 2022-02-23 15:45:44

Talking with a friend of mine, Machine Learning specialist @renatobanzai , he brought one of the biggest challenges faced by companies nowadays: deploying ML/AI in live environments.
InterSystems IRIS offers IntegratedML. IntegratedML it's a great feature to train, test, and make deploys of ML/AI models.

The hardest part in creating ML/AI is to make the data treatment, clean up, and make them trusted.

This is where we can take advantage of FHIR powerful standard!

The project idea shows how we can create/train/validate ML/AI models with FHIR and utilize them with data from different sources.

We believe that this project has great potential and a few ideas that can be explored:

Reuse/extend DTL transformations in other FHIR databases for custom ML models
Use DTL transformations to normalize FHIR messages and publish ML models as services
Create a kind of models + transformations rules repository for use within any FHIR dataset
Exploring new possibilities with this project, we can imagine data from different sources.

![fhir-integratedml diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ee40db6oosb6owfbubop.png)
 
In the image above, the FHIR Resource, consuming the REST API, can be used with an FHIRaaS.

And not only using FHIRaaS on AWS, but we can also make use of the new service [HealthShare Message Transformation Services](https://aws.amazon.com/marketplace/pp/prodview-q7ryewpz75cq2?sr=0-9&ref_=beagle&applicationId=AWSMPContessa), that automates the conversion of HL7v2 to FHIR® to populate Amazon HealthLake, where you can extract more value from your data.

With these small demonstrations, I see these resources being used very well in larger scenarios, enabling and delivering more easily deploys in production in truly innovative environments, like the [AWS Healthlake](https://aws.amazon.com/healthlake/). Why not?! 😃
Paralleling Code Coverage using Coveralls and Travis
Published: 2022-02-23 15:36:25

Hey developer friends, 

A short one today -- but an important one. 

Let's say you have multiple environments you want to have coverage, first let's enable Coveralls for your repo, so if you haven't done so yet -- head over to coveralls.io and Auth the Coveralls app to up your GitHub account, and then sync your repos with Coveralls. 

You'll want to have a `.travis.yml` file that looks similar to mine: 

```yaml  
sudo: false
language: node_js
node_js:
  - "node"
env:
  global:
    - COVERALLS_PARALLEL=true
jobs:
  include:
    - script: COVERALLS_FLAG_NAME=test-1 make test-coveralls-1
    - script: COVERALLS_FLAG_NAME=test-2 make test-coveralls-2
notifications:
  webhooks: https://coveralls.io/webhook
```
You'll see we are running multiple `COVERALLS_FLAG_NAME`, this is using the Coveralls webhook to parallelize your coverage. If at first you don't see Coveralls covering your code, you may want to add your `env var` from Coveralls to Travis CI and name it something like `COVERALLS_TOKEN`. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7z0wobp256vosvp8dmm4.png)

Here's my repo so you can follow step by step! https://github.com/Montana/coveralls-node-travis
Translating an Azure Serverless App Architecture into AWS
Tags: aws, azure, cloud, serverless
Published: 2022-02-23 15:32:56

In my last post, I made a [cheat sheet to help cloud architects translate services between Microsoft Azure and AWS](https://dev.to/aws-builders/aws-azure-mapping-cheat-sheet-1dom). It was well-received by the community, and I thought of ways how to make these translations more useful for the community.

If you're like me, I've been working between Azure and AWS, and it's starting to feel like working between two programming languages, like JavaScript and Python. I find it a good and useful exercise to keep abreast with the analogous services between the two major cloud platforms. (Multi-cloud folks would have a different opinion on this, but I digress.)

## Azure Reference Architecture

A possible way to make this translation more tangible is to take a look at existing architectures and see what it looks like with another cloud service. I found this [simple and elegant serverless web application](https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/serverless/web-app) architecture from Azure:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2kbro6vwwhucg0yr7wpx.png)

## Translated AWS Architecture

I translated the Azure-based application into AWS and here is what it looks like:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0v6mnz7tlysipe84fzvi.png)

Let's do a quick breakdown of the AWS services:

- **S3** - This is where the static files will be stored, like HTML, CSS, and JavaScript files.
- **CloudFront** - We will use this as our Content Delivery Network to enable caching content and accelerate delivery of content, as well as providing an HTTPS endpoint.
- **Lambda** - The key engine that makes this work.
- **API Gateway** - As the name implies, it will provide as the access point for the application. 
- **RDS** - The application's data store.
- Single Sign-On - This is the equivalent to Azure's Active Directory for user authentication.
- **CloudWatch** - Although not technically part of the application, this helps us monitor the performance and infrastructure data collection.
- **CodeDeploy** - Modern web applications need a seamless and easy workflow. CodeDeploy is the tool for the CI/CD for building, testing, packaging, and deploying.

In closing, I hope this helps you see Azure to AWS translation more than just a conversion, but also provide some insight on how these services integrate.

👉🏻 [Follow me on Twitter](https://www.twitter.com/regnard)
This is how you make numbers more readable in your JS code
Tags: javascript, webdev, beginners, html
Published: 2022-02-23 15:10:59

### Hello Folks 👋
What's up friends, this is **SnowBit** here. I am a young passionate and self-taught frontend web developer and have an intention to become a successful developer.

Today, I am here with a cute and must to know tip for you as a JS Developer.

### Introduction
We all deal with numbers all day, some of them are little and short but some of them are just too large (10000000000)
![big nums](https://c.tenor.com/W6Kst-zxLyYAAAAd/those-are-big-numbers-ryan-bruce.gif)

Don't worry about writing them; you are at the right place. Keep your code clean by using the following tips...

### Let's make numbers more readable
We generally use **comma(,)** to separate digits in a large number. But, this is Javascript you can't just use commas to separate digits.
```js
const largeNumber = 1,000,000
```
If you use commas to separate digits in Javascript, you would have encountered this error 👇
![err](https://cdn.hashnode.com/res/hashnode/image/upload/v1645624480070/uJg--gHq_.png)
![err2](https://cdn.hashnode.com/res/hashnode/image/upload/v1645624576128/DunkfRRMT.png)

---
**Let's separate digits without using commas**

In Javascript, one can use **underscores(_)** to separate digits in numbers. Here's how you can do that.
```js
const largeNumber = 1_000_000
```
![output](https://cdn.hashnode.com/res/hashnode/image/upload/v1645627606810/qL2az4tZE.png)


---
**Are you lazy like me?**

I am too lazy to write all these long numbers while writing my code. So, I have a good idea of writing these long numbers that is a lot beneficial for writing clean code. Let me show you...
```js
const largeNumber = 1e18
const secondLargeNumber = 4e12

const aLargeNumber = 1e18 + 4e12
```
Here, the pattern is
```
const n = [starting number] e [number of zeros]
```

Wanna try this, check out this [fiddle](https://jsfiddle.net/mv6gs7tw/)

--- 

So, these were a few ways to make numbers more readable that you should use in your next project. Feel free to share more crazy ways to write numbers coming to your mind.

Thank you for reading, have a nice day!

**Your appreciation is my motivation 😊 - Give it a like**

- Follow me on Twitter - [@codewithsnowbit](https://twitter.com/codewithsnowbit)
- Subscribe me on YouTube - [Code With SnowBit](https://www.youtube.com/channel/UCNTKqF1vhFYX_v0ERnUa1RQ?view_as=subscriber&sub_confirmation=1)
Emotion Badge for Github
Tags: azuretrialhack, node, azure, github
Published: 2022-02-23 14:50:23


### Overview of My Submission
EmotionBadge is a service of choice. It extracts the emotion from your Github profile photo using Azure Face Api and gives you a bagde using Shields.io for your README.md file.


### Submission Category: 

**AI Aces**


### Link to Code on GitHub

{% github https://github.com/JoyMajumdar2001/EmotionBadge %}

## Usage
It is too easy to use and insert in your README.md
```
https://emotionbadge.onrender.com/emotion/<Your github username>/<emotion>
```
Avilable `emotion` types are 
- `auto`
- `smile`
- `anger`
- `contempt`
- `disgust`
- `fear`
- `happiness`
- `neutral`
- `sadness`
- `surprise`

In `auto` emotion, the emotion which have the most probable value will be displayed automatically and if no face is detected then it'll show this badge 
- ![Auto](https://emotionbadge.onrender.com/emotion/JoyMajumdar2001/auto)

## Example

- ![Smile](https://emotionbadge.onrender.com/emotion/JeroenMols/smile)
- ![Fear](https://emotionbadge.onrender.com/emotion/JeroenMols/fear)
- ![Neutral](https://emotionbadge.onrender.com/emotion/JeroenMols/neutral)

## Scoring system
In this project we are using `Azure Face Api` to detect emotions from the profile picture. It scores the emotion between **0** to **1** upon the Face Api model confidence. It is based on AI so the score may not be satisfatory everytime to users.

If it does not find any face of any user profile picturec then it shows and error badge like ![error](https://emotionbadge.onrender.com/emotion/quantaDot/smile)

## Used Tech

- [Face Api](https://azure.microsoft.com/en-in/services/cognitive-services/face/)
- [Shields.io](https://shields.io)
- [Render](https://render.com/)
- [GitHub Api]
(https://docs.github.com/en/rest)
Paracetamol.js💊| #62: Explica este código JavaScript
Tags: javascript, beginners, spanish, webdev
Published: 2022-02-23 14:46:10

## **Explica este código JavaScript**

```js
const food = ['🍕', '🍫', '🥑', '🍔']
const info = { favoriteFood: food[0] }

info.favoriteFood = '🍝'

console.log(food)
```


-     A: `['🍕', '🍫', '🥑', '🍔']`
-     B: `['🍝', '🍫', '🥑', '🍔']`
-     C: `['🍝', '🍕', '🍫', '🥑', '🍔']`
-     D: `ReferenceError`

Respuesta en el primer comentario.

---

Respuesta:
A: `['🍕', '🍫', '🥑', '🍔']`

Tenemos un arreglo `food` y un objeto `info` independiente uno del otro.

`info` solo tiene la propiedad `favoriteFood` que apunta al índice `0` del arreglo `food`, por lo tanto `info` seria igual a:

```js
const info = { favoriteFood:'🍕'}
```

Posteriormente pisamos o sobre escribimos este valor modifiando el emoji de pizza por uno de spaguetti:

```js
info.favoriteFood = '🍝'
```
Ahora `info` se ve así:

```js
const info = { favoriteFood:'🍝'}
```

En ningún momento modificamos de ninguna manera el array `food`, por ende sigue siendo el mismo: `['🍕', '🍫', '🥑', '🍔']`
#OpenCV – How to convert to grayscale and show a single color an image 🖼️ using Python 🐍
Tags: englishpost, codesample, effects
Published: 2022-02-23 21:03:44

---
title: #OpenCV – How to convert to grayscale and show a single color an image 🖼️ using Python 🐍
published: true
date: 2022-02-23 14:41:47 UTC
tags: EnglishPost,CodeSample,Effects,EnglishPost
canonical_url: 
---

Hi !

Super quick post today with a cool scenario to support my [TikTok videos in Spanish](https://www.tiktok.com/@elbrunomsft) (I know 😀):

#### How to convert to grayscale an image and show a single color using python and opencv

Here is the output with an original photo from my office and a new image with this effect:

![opencv convert to grayscale and show a single color](https://brunocapuano.files.wordpress.com/2022/02/opencv-convert-to-grayscale-and-show-a-single-color.png?w=576)

_ **Disclaimer:** I got this example in my notes from long time ago. I thik I got this code from a blog post or a public repository, however, I can’t find the original source. If you know it, please let me know so I can mention the author._

Sample code:

{% gist https://gist.github.com/elbruno/df049d8ae4ea208e3c3b4b7e9fee5b37 %}


Happy coding!

Greetings

El Bruno

* * *

#### OpenCV and Python

- [Easy way to install OpenCV and TensorFlow with Anaconda](https://elbruno.com/2020/05/12/python-easy-way-to-install-opencv-and-tensorflow-with-anaconda/)
- [Convert an OpenCV frame to PIL image and viceversa](https://elbruno.com/2020/05/12/python-easy-way-to-install-opencv-and-tensorflow-with-anaconda/)
- [Open a video file 🎥 and save each frame as a PNG 🖼 file to a folder 📂](https://elbruno.com/?p=32847)
- [How to add a watermark text to an image 🖼](https://dev.to/azure/opencv-how-to-add-a-watermark-to-an-image-using-python-1op5)
- [How to add a Pencil Sketch effect to an image 🖼 using Python](https://dev.to/azure/opencv-how-to-add-a-pencil-sketch-effect-to-an-image-using-python-3j3b)
- [How to convert to grayscale and show a single color an image 🖼 using Python 🐍](https://elbruno.com/2022/02/23/opencv-how-to-convert-to-grayscale-and-show-a-single-color-an-image-%f0%9f%96%bc%ef%b8%8f-using-python-%f0%9f%90%8d/)
Breathing exercise web app using React, TypeScript & SCSS
Tags: react, typescript, css, javascript
Published: 2022-02-23 14:06:11

Hi all, this is my very first post in Dev.to and I am very excited about it. I always wanted to build a open source project, unfortunately, I didn't find time to do that. 

Recently, because of job switch I happened to have some free time and decided to utilize it for building a open source project. I am always obsessed with meditation and breathing, so I decided to build something related to that. Here is the result - [Breathing Exercise](https://ashobiz.github.io/breath-It/)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jgukbtb2u4n3hojdy9t5.PNG)

It is a Breathing exercise app. As of now, it supports two different types of breathing, simple breathing and box breathing. It is built using Typescript, React and SCSS. You can find the source code @ github[](https://github.com/ashobiz/breath-It).  

I do welcome feedback and comments.

Thank you
Laravel 9 Image Upload Tutorial Step By Step
Tags: laravel
Published: 2022-02-23 14:01:25

Hello All,

This post will give you an example of laravel 9 image upload example. I explained simply step by step image upload in laravel 9. this example will help you laravel 9 upload image to the database.

In this tutorial, we will create two routes one for get method to render forms and another for the post method to upload image code. we created a simple form with file input. So you have to simply select an image and then it will upload in the "images" directory of a public folder.

So you have to simply follow bellow steps and get an image upload in the laravel 9 application.
[Laravel 9 Image Upload Tutorial Step By Step](https://www.codecheef.org/article/laravel-9-image-upload-tutorial-step-by-step)
A KNOWN JOURNEY
Tags: beginners, productivity, career, database
Published: 2022-02-23 13:51:00

Hi, my name is David and I just failed a tech bootcamp entrance exam. I know this is an odd way to start an article but for me, failure is an opportunity for a new start. 

The pass mark for the exam was 85% and I missed it by 2%. I was gutted. Failure is never pleasant and I was even more disappointed considering that I was so close to success. One of the reasons for applying for the bootcamp was to have some accountability as there would have been ample opportunity for mentorship. I believe I need that extra bit of discipline for the up-skill journey I have decided to embark on going forward. However, since plan a didn’t work it is time to adapt, which is a theme that is sprinkled all over my career history.

When I am not annoying my amazing girlfriend, I spend my time as a database developer, who is currently transitioning into backend development. Most of my corporate life was spent writing and building with the Oracle SQL tech stack. A few years out of active corporate work has been spent freelancing – this has afforded me the opportunity to dabble into a diverse number of projects, eventually making me a generalist of sorts. I have worked on legacy IT projects, attained proficiency in different languages to build products, worked in product management and more.

I want to keep learning, so right on brand for a database dev, I always have a backup plan…this!
Since the ‘straight forward’ way hasn’t quite worked out the way I imagined, I want to dedicate myself to documenting my skills development journey as I figure it out going forward. My hope is that it not only keeps me accountable but also educates other techies like me on what their journey might look like and how they can attain success even if they do not take the popular course of action. I will be writing about random thoughts as well as documenting solutions. There will be lots on Oracle – the stack that will always have my heart. Going forward I am also looking at Java as a backend language to adopt or upgrade my PHP skill level. 

I am focused, determined and ready. The plan is to post bi-weekly, so stick around for the ride – it might be a wild one.
Submit Tutorial in top website
Published: 2022-02-23 13:34:51

**Submitting Tutorials** means writing and publishing an tutorial. It is a great way to connect with new readers and get your name out.

## Benefits of Submitting Tutorials:
1. **Introduce your projects, courses, codes and services.** Get more people to know about what you offer.
2. **Show audiences how you can help.** Get more people to see how your expertise, products, or services can solve problems.
3. **Improve visibility on social media.** Get more people to follow and engage with you or your brand on social media.
4. **Boost SEO.** If you have tutorials website or blog then you can increase SEO of your website or blog.
5. **Build industry authority.** Share your expertise to get people to see you as an expert in your industry.
6. **Increase traffic.** Drive more traffic to your website or blog through referral traffic.
7. Increase leads. Generate more leads by reaching new audiences.

You can submit your tutorials [here](https://www.readymadecode.com/free-tutorials-submit/).

Please like, share and give positive feedback to motivate me to write more.
Thanks :)
Happy Coding :)
Content Security Policy with PHP
Tags: php, javascript, security, programming
Published: 2022-02-23 13:30:16

Use X-Frame-Options and Content-Security-Policy with PHP

Most of today's browsers can help protect your site from malicious attacks if you tell them so. A method that is almost universally supported is to set the X-Frame options. If this option is set, the browser does not allow other sites to display your own site in an iframe. This protects against clickjacking attacks and should be used on all sensitive pages such as the login page.

```
// Adds X-Frame-Options to HTTP header so that page can only be shown in an iframe of the same site.
header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+

```

Users who work with a current browser automatically benefit when a website sends a Content Security Policy (CSP) in the header. With a CSP, you can define where JavaScript code is accepted from, which pages are allowed to display your page in an iframe, and many other things. If a browser supports CSP, this can be effective protection against cross-site scripting. [more…](https://developers.google.com/web/fundamentals/security/csp)

The implementation in PHP is very simple, but problems can arise with inline JavaScript. You get the greatest protection if you avoid all JavaScript in the HTML files and instead store them in separate *.js files. In case this is not possible (existing source code), there is an option to allow inline-script.

```
// Adds the Content-Security-Policy to the HTTP header.
// JavaScript will be restricted to the same domain as the page itself.
header("Content-Security-Policy: default-src 'self'; script-src 'self';"); // FF 23+ Chrome 25+ Safari 7+ Opera 19+
header("X-Content-Security-Policy: default-src 'self'; script-src 'self';"); // IE 10+

```