teleren/devto huggingface dataset:
YugabyteDB: list failed commands
Tags: yugabytedb, postgres
Published: 2022-12-09 11:19:36

This is an introduction to a new function in YSQL version 2.17. YSQL is YugabyteDB's enriched PostgreSQL version. The name of the function is `yb_pg_stat_get_queries()`. This new Yugabyte specific view lists failed (terminated) executions, for example (in `ysqlsh`):

Create a situation where an error results in terminated execution:
```sql
yugabyte=# set temp_file_limit to 0;
SET
yugabyte=# set work_mem to 64;
SET
yugabyte=# select * from generate_series(1,1000000);
ERROR:  temporary file size exceeds temp_file_limit (0kB)
```
Then query `yb_pg_stat_get_queries()`:
```sql
yugabyte=# select * from yb_pg_stat_get_queries(null);
 db_oid | backend_pid |                query_text                 |                termination_reason                 |          query_start          |           query_end
--------+-------------+-------------------------------------------+---------------------------------------------------+-------------------------------+-------------------------------
  13288 |        3808 | select * from generate_series(1,1000000); | temporary file size exceeds temp_file_limit (0kB) | 2022-12-09 10:39:38.558119+00 | 2022-12-09 10:39:38.562892+00
```

The termination reason can also be (external) process termination, because the termination is registered by the the stats collector YSQL/PostgreSQL process. Obviously if the stats collector, or the parent of the stats collector (the postmaster) is terminated, the collected termination information is gone. For example a backend that was terminated using `sudo kill -9 PID`:

```sql
yugabyte=# select * from yb_pg_stat_get_queries(null);
 db_oid | backend_pid |                query_text                 |                termination_reason                 |          query_start          |           query_end
--------+-------------+-------------------------------------------+---------------------------------------------------+-------------------------------+-------------------------------
  13288 |        3808 | select * from generate_series(1,1000000); | temporary file size exceeds temp_file_limit (0kB) | 2022-12-09 10:39:38.558119+00 | 2022-12-09 10:39:38.562892+00
  13288 |        3808 | select pg_backend_pid();                  | Terminated by SIGKILL                             | 2022-12-09 10:43:15.044661+00 | 2022-12-09 10:43:30.604219+00
```

There is a nice technical detail here: if a PostgreSQL backend is terminated "externally", such as using a termination signal (kill command) or via the out of memory (OOM) killer, it will be detected and as a result the postmaster will restart all backend processes to avoid corruption.

As of version 2.17, YSQL does not perform this restarting. The reason we don't need to do this, is because any significant change to data is not done locally, but in our DocDB layer, which keeps consistency of any data change, which is outside of the backend process.
Adding a git commit message using vi on macOS
Published: 2022-12-09 11:18:58

You must have already gone through the situation of having entered vi at the time of a commit and not knowing how to finalize it, below I leave a sequence that will help you with that

```bash
1 - Type i
2 - Write your message
3 - Type the ESC key
4 - Type :wq

DONE!
```
How to dockerize Symfony (2022)
Tags: php, docker, symfony, compose
Published: 2022-12-09 11:14:46

---
title: How to dockerize Symfony (2022)
published: true
description: Read how easy it is to dockerize a Symfony application with this step-by-step tutorial

tags: php, docker, symfony, compose
cover_image: https://anastasionico.uk/img/blog/how-to-dockerize-symfony.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2022-12-09 11:13 +0000
---
In this post, I am going to show you how to set up an entire local environment using Nginx, MySql and Symfony in just a few minutes.

 

In fact, I use the file displayed here for every project I start.

 

Let's get started with a question:

 

How long does it take to make a website?

 

To answer this question let me tell you a story.

 
Many years ago I was living in a little village at the border of London (UK).

 

Almost every evening, after work, I used to go up the hills outside the city center to look at the light of London’s skyscrapers.

 
My dream was to get a job as a web developer in one of that buildings.

 

To do so I had two goals:

 

improve my skills, thus my CV;
display my skills in creating a brand new portfolio website;
 

The plan worked out very well and after exactly 12 months I was living and working in the heart of London.

 



 

Since then many things have changed.

 

I got new jobs, acquired other skills, and created many connections in the field.

 

Yet, one thing has stayed the same all this time.

 

My website has been the same since then.

 

It only took 5 years but I finally decided to update my personal website.

 

I’ll do it using Symfony 6 and Docker.

 

How can you do it too?

 

Easy answer! 

[The solution is in this article.](https://anastasionico.uk/blog/how-to-dockerize-symfony)
How to deploy angular universal on IIS
Published: 2022-12-09 11:14:01

Can someone help me to deploy angular universal build on IIS server?
I have integrated angular universal in existing angular 13 project and its working fine. but my problem with deployment on IIS when deploying build as website it's working for example on root (https:www.domain.com) but I want this to deploy as application not website (https:www.domain.com/myapp).
Where **myapp** is application which is under sites.
Facing issues like MIME type or unexpected syntax error for CSS/JS files.

Can someone please help me on this
5 Tips for Improving as a Software Developer
Published: 2022-12-09 11:12:11



Are you looking to improve your skills as a software developer? Here are five tips that can help:

1. Practice, practice, practice: The more you code, the better you will become at it. Try to write code every day, even if it's just for a short time.

2. Learn from others: Talk to other developers and see how they approach problems. Attend meetups and conferences, and read blogs and books written by experienced developers.

3. Stay up to date with new technologies and best practices: The world of software development is constantly changing, so it's important to stay on top of the latest trends and techniques.

4. Work on personal projects: In addition to working on projects for your job, consider working on your own projects in your free time. This will give you the opportunity to experiment with new technologies and try out different approaches to solving problems.

5. Collaborate with others: Working with other developers, whether it's on an open source project or a team at work, can help you learn new things and improve your skills.

Remember, the field of software development is vast, and there is always more to learn. Make a commitment to continuous learning, and always be on the lookout for opportunities to improve your skills.
This Week In Python
Tags: python, discuss, thisweekinpython
Published: 2022-12-09 11:10:00


**Fri, December 09, 2022**


This Week in Python is a concise reading list about what happened in the past week in the Python universe. 

**I have received some good suggestions for this week's content. Thank you.**

**Did I miss anything from the Python universe this week? What did you read or tried out?**


## Python Articles

- [Narrative Manipulation: Convincing Chat GPT to Write a Python Program to Eradicate Humanity](https://zacdenham.com/blog/narrative-manipulation-convincing-gpt-chat-to-write-a-python-program-to-eradicate-humanity)
- [Datasette’s new JSON write API: The first alpha of Datasette 1.0](https://simonwillison.net/2022/Dec/2/datasette-write-api/)
- [Multiprocessing Race Conditions in Python](https://superfastpython.com/multiprocessing-race-condition-python/)
- [The cloudy layers of modern-day programming](https://vickiboykis.com/2022/12/05/the-cloudy-layers-of-modern-day-programming/)
- [Lex Fridman interviews Guido van Rossum](https://lexfridman.com/guido-van-rossum-2/) – not an article but a long interview with Guido van Rossum (3+ hrs.)


## Projects



- [CausalPy](https://github.com/pymc-labs/CausalPy) – A Python package for causal inference in quasi-experimental settings
- [codon](https://github.com/exaloop/codon) – A high-performance, zero-overhead, extensible Python compiler using LLVM
- [mbdpy](https://github.com/Vicarius-R-D/mbdpy) – Python module for model-based-design
- [lumi](https://github.com/Tanmoy741127/lumi) – nano framework to convert your python functions into a REST API 
- [python-easter-eggs](https://github.com/OrkoHunter/python-easter-eggs) – Curated list of all the easter eggs and hidden jokes in Python



**Did I miss anything from the Python universe this week? What did you read or tried out?**
How to fix this isue on VS Code
Tags: css, programming, php, webdev
Published: 2022-12-09 11:06:53


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2zy9ewl2ir8c7hx7kbu.jpg)## What I built


### Category Submission:


### App Link


### Screenshots


### Description
 

### Link to Source Code


### Permissive License


## Background
(What made you decide to build this particular app? What inspired you?)


### How I built it
(How did you utilize MongoDB Atlas? Did you learn something new along the way? Pick up a new skill?)


### Additional Resources/Info
UPSC Coaching In Indore
Tags: upsc, upscexam
Published: 2022-12-09 11:03:42

In Indore, there are many UPSC coaching In Indore but which one is best for UPSC preparation is a very difficult task. With the help of the Ghargharshiksha Research team, you will get the best UPSC coaching center in Indore with their full information. The top UPSC coaching centers in Indore offer quality education and guidance to help aspirants crack the UPSC exam. Because different coaching has different preparation and teaching strategies, so choose the best one here. https://ghargharshiksha.com/top-ias-coaching-institute-in-indore/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p2jgsrnzu4j6cvk7btgf.jpg)
ChatGPT + Internet
Tags: chatgpt
Published: 2022-12-09 10:53:33

One inherent problem with ChatGPT or any LLMs is that they are closed to outside information and hence suffer from Hallucination. I think by injecting knowledge from internet, the answers would always be updated. This is what www.accintia.com is trying to do. It is an alternative to ChatGPT which can also search the Internet so that you always get updated information. Given a question it decides whether to search internet or not. Incase of internet search, it generates answer from the search results and also 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7dry2gflmpsdqrokm1cx.png)shows the source of information.
Best Digital Marketing Services Online
Tags: digital, marketing, service, socialmedia
Published: 2022-12-09 10:44:02

We are committed to providing our customers with exceptional service while offering our employees the best training. Strategic marketing is crucial to the success of your business. If you successfully educate customers, keep them engaged and create a strong reputation in their minds, then it will most likely do well for itself! Offshore Marketers follow a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and are a part of hosting services’ analytics. For More Information about **[Best Digital Marketing Services Online](https://offshoremarketers.com/digital-marketing-services/)** visit our website.
My First Week as an Outreachy Intern with Bioconductor
Tags: opensource, outreachy
Published: 2022-12-09 10:44:02

## About me
My name is Beryl Kanali. I am an outreachy intern in the Dec 2022 to March 2023 cohort. I will be working on Bioconductor's project Sweave2Rmd project.

My interests are Open source, Data Science, statistics and technology in general.

## [Bioconductor](https://bioconductor.org/)

The mission of the Bioconductor project is to develop, support, and disseminate free open source software that facilitates rigorous and reproducible analysis of data from current and emerging biological assays.

## [Outreachy](https://www.outreachy.org/)

Outreachy provides internships in open source and open science. Outreachy provides internships to people subject to systemic bias and impacted by underrepresentation in the technical industry where they are living.



## My Motivation

I was introduced to open source in October 2021 when I participated in my first Open Source sprint, organized by [Data Umbrella](https://www.dataumbrella.org/). Since then my interest in Open Source and Free software communities has grown.

After learning about outreachy, I decided to apply so that I can grow and get knowledge in open source. Given the magnitude of applications, I was honored to be selected and now experiencing what is it like to be an outreachy intern.

## My Core Values
Curiosity and determination are the core values that have helped me get where I am today. I am always curious about how things work and how technology is used in different fields. That ishow I settled on Bioconductor as my project of interest.

Determination helped me get through all the stages of outreachy and finally get in.
These two corevalues come handy as I work on my project. There is a lot to learn at Bioconductor and from my mentors.

My first week has been nothing short of amazing. I am learning new things and meeting different people. I also get to contribute to a Free software project which is really cool.

## What next?

I look forward to making the best out of my time in Bioconductor and learning as much as I can from my mentor. I am also excited to share my journey and lessons throughout my internship.
broke it😎
Tags: chatgpt, ai, openai
Published: 2022-12-09 10:42:17

**contex : 1 xor 2  is 3 which is greater than 1*2 which is 2**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jaua6uorq5th5cobaoww.png)
FSL11 - Cricket Fantasy App
Tags: fantasy, application
Published: 2022-12-09 10:31:22

FSL11 is Fantasy Online Application. Where you can create a virtual cricket team of players from an upcoming real-life match. If your team performs well, you can win real money.

[https://fsl11.com/download-fantasy-cricket-app](https://fsl11.com/download-fantasy-cricket-app)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/at1xmilg2f14i6uafp4b.png)
そのSVGはSVGElementではない
Tags: webdev, tips
Published: 2022-12-09 10:26:29

React + TypeScript で開発しているときに陥りがちな罠なんですが、SVGなどの要素をコンポーネントとして使用する際に`ReactElement`に変化してしまっている可能性があるので気をつけたほうが良いよねってお話です。

```ts
const Icon = () => {
  <svg>
    ...
  </svg>
}
```

こういう風なコンポーネントを定義していた場合、これをpropsで渡すときに受け取る側の型は以下のようにしないとダメですね。

```ts
import type { ReactElement } from 'react'

interface Props {
  ...
  icon: ReactElement
  ...
}
```

小話でした
Ramka - Create your profile pic
Tags: showdev
Published: 2022-12-09 10:16:07

Hey all 👋
I just wanted to share a small personal project of mine - Ramka - https://ramka.maciekgrzybek.dev/

It's a simple tool where you can add a frame with text to your profile picture, just like on Linkedin. The difference is, you can fully customize the gradient colour, text and text colour. It ain't much, but it's honest work 😉

Why I made it? Some time ago, my friend Tom Walsh, created a custom frame for me in Photoshop and since then, a lot of people asked me about it in personal messages. So I decided to create a solution for this problem 😉

I wanted to give credit to Tom Walsh for this idea and also thanks to Denis Kharchenko for helping me out with the UI.

Enjoy and share if you like it Cheers! 😉
AWS IAM Tutorial | Identity And Access Management (IAM) | AWS Training Videos
Tags: aws, awsiam, tutorial, security
Published: 2022-12-09 10:09:20

In this Edureka tutorial on AWS IAM, you will learn how to secure your AWS account using IAM service in AWS. Below are the topics that are covered in this tutorial:

1. Why do we need Access Management?
2. What is IAM?
3. Components of IAM
4. Multi Factor Authentication
5. Hands-on

{% embed https://www.youtube.com/watch?v=UqKWHZ36yEM %}
Digital Marketing Course Syllabus, Job Sectors, Course Fees & Duration
Published: 2022-12-09 09:52:31

Do you want to make a career in Digital Marketing?
But Confused, how to start? Where to learn? What all are topics should learn in order to become a digital marketing expert?

Here we are providing you with complete digital marketing modules, syllabus list to clear your all doubts.

Digital marketing is really a vast subject to learn. There are many online digital marketing courses available in India, and they have added a variety of modules as per their knowledge & experience. But we at **[Victorious Digital](https://victoriousdigital.in/)** provide an advance digital marketing course syllabus with 100% practical training to understand in-depth digital marketing, which would not only help you to get hands-on experience but also assist you to get your desired career also.
Mocha and Chai Unit Testing (node js)
Tags: webdev, javascript, testing, programming
Published: 2022-12-09 09:48:24

Let's start by understanding unit testing and why you need to test your code before deploying to production!

**_Unit Testing _**- It is a form of testing where individual components of the codebase is tested before deploying. To verify that each piece of code in the codebase works properly. 

Test-driven development includes writing a particular test before production and checking whether it’s working. The idea is basically to get a little bit of assurance from the initial test. 

Behaviour-driven development is a subtopic of test-driven development but instead uses simple and human-readable descriptions of software user requirements as the basis for tests.

There are various tools with which you can perform unit testing in node js.

1. Mocha js
2. Chai js
3. Jest
4. Enzyme
5. SinonJS
6. Cypress

Now let's test our piece of code :

index.html:

```
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Mocha Tests</title>
  <link href="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.css" rel="stylesheet"/>
</head>
<body>
  <div id="mocha"></div>
  <script src="https://cdn.rawgit.com/Automattic/expect.js/0.3.1/index.js"></script>
  <script src="https://cdn.rawgit.com/chaijs/chai/3.5.0/chai.js"></script>
  <script src="https://cdn.rawgit.com/mochajs/mocha/2.2.5/mocha.js"></script>

  <script src="problems.js"></script>
  <script>
    const mocha = window.mocha;
    mocha.setup('bdd');
  </script>
  <script src="tests.js"></script>
  <script>
    mocha.checkLeaks();
    mocha.run();
  </script>
</body>
</html>

```

So index.html is just a boilerplate code and few script tags.

Problems.js - where we will write our piece of code

```
function cube(numberarray){
    const newnumberarray = numberarray.filter(val => val%2!=0);
    return newnumberarray.map(val => val**3);
}

//numberarray=[2,3,4,5,6,7,8]
//newnumberarray=[27,125,343]
```
Here we have taken an array named _**numberarray**_ and we are **_filtering even numbers from numberarray_** and storing the odd numbers in a new array called _**newnumberarray**_ & taking the cube of odd numbers stored in _**newnumberarray**_
using map function in javascript.

Tests.js

```
const chai = window.chai;
const assert = chai.assert;
describe("cube", () => {
    it("cube of odd numbers", () => {
        assert(cube([2,3,4,5,6,7,8]),([27,125,343]));
    });
});
```
here we define _**describe**_ which takes two arguments "title" and a function.
Then we have defined _**it**_ which takes 2 arguments "explanation" and a function.
_**assert**_ is used to _**compare input and output**_

so we give an array filter the even numbers and take the cube of odd numbers.


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

This is just a basic method which I learned today & I wanted to share it with you guys. Would love any feedbacks!
Course on Kubernetes Operators in Python
Tags: cloud, python, kubernetes, cloudnative
Published: 2022-12-09 09:29:50

Hi everyone! Are you still interested in the course on Kubernetes Operators in Python? It's the one related to the operator development for Nuvolaris?

Here you go...we have started!

We conducted the first class during the first Nuvolaris community call.

Don't worry if you've missed it!

We will post a video of the lecture soon (we need some time to extract it from the recording). But we've only covered the basics in the video: Summaries of Kubernetes fundamentals, CRD and Kustomize.

If you are interested, you can join us in the nuvolaris-operator channel on Discord: [https://discord.gg/RrJqXa9S](https://discord.gg/RrJqXa9S)

You can contact us here and we'll organize the next class.
In the meantime, check out the slides and the code in the nuvolaris/nuvolaris-operator repo on GitHub: [https://github.com/nuvolaris/nuvolaris-operator](https://github.com/nuvolaris/nuvolaris-operator).
9 websites to learn CSS
Tags: css, webdev, beginners
Published: 2022-12-09 09:22:24

As a web developer, it's important to have a strong understanding of CSS, the stylesheet language that allows you to control the appearance and layout of your web pages. But where can you go to learn CSS and improve your skills? In this post, I'll be sharing 9 websites for learning CSS. 

From comprehensive tutorials and resources to interactive courses and examples, these websites have something for everyone, no matter your level of experience. 

> Before we move on, remember you can implement your websites or landing pages **with or without** coding on [DoTenX](https://dotenx.com) for **free**. Make sure to check it out and nominate your work to be showcased there as well.

---

Let's take a look at the best websites for learning CSS and see what they have to offer.

1) [CSS-Tricks](https://css-tricks.com/) a comprehensive website featuring tutorials, articles, and resources for learning and mastering CSS.

2) [W3Schools](https://www.w3schools.com/css/) an online learning platform offering a range of CSS tutorials and examples.

3) [CodePen](https://codepen.io/) a community for sharing and exploring front-end code, including many examples of creative and effective CSS.

4) [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS) a comprehensive reference for CSS from the Mozilla Developer Network.

5) [CSS Tricks](https://css-tricks.com/) a blog and resource center for learning and mastering CSS.

6) [Codecademy](https://www.codecademy.com/learn/learn-css) an online platform offering interactive courses and tutorials for learning CSS.

7) [FreeCodeCamp](https://www.freecodecamp.org/learn/responsive-web-design/basic-css/) a nonprofit organization offering a range of free, self-paced courses on web development, including a course on CSS.

8) [Web Designer Depot](https://www.webdesignerdepot.com/category/css/) a blog featuring articles, tutorials, and resources for web designers, including many resources for learning CSS.

9) [CSS-Tricks Almanac](https://css-tricks.com/almanac/) a reference guide for CSS properties and their values, from the CSS-Tricks website.