teleren/devto huggingface dataset:
Survey: Evaluation of Causal Inference Techniques for AIOps
Tags: datascience
Published: 2022-05-05 06:41:53

##　選定理由

IBM Researchによる因果推論を用いたシステム異常検出&改善リコメンデーションという比較的新しい研究分野。他にも[[Wu2021](https://hal.archives-ouvertes.fr/hal-03323055/document)]など見られる。

Paper: https://dl.acm.org/doi/pdf/10.1145/3430984.3431027?casa_token=uYzoMXLN3yUAAAAA:PGQHELCctUAtuqycxifRuiIIJxero6Ww1LyOIKB6iEyR7MyBX-BUgZ-P5uZMC415A1avloiFqXA

Code: N/A

##　概要

[ビジネス課題]システムのオペレーションチームはシステム稼働率を高くするためにできる限り早いシステムダウン・システム異常の原因解明が必要になる。
[技術課題]異常検出や事故検知系タスクは事象の発生確率自体が低く、観測できず学習データを集めにくい。又、Microserviceアーキテクチャのような複雑なシステムは実験系データであっても交絡因子が多く因果関係を読み取るのが困難
[従来]機械学習及び統計学の検知からの分析、トライ&エラー、エキスパートの知識と経験による探索的分析
[提案]複数のGranger因果性分析による因果モデル化
[効果]実験ではMicroserviceアーキテクチャのシステム障害要因を推定する手法としてCIが有効であることを示した。又、障害の予測ではfalse positiveが低減した。

##　システム障害原因の因果推論

### 特徴量は２通り

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

システムログを時系列データ（一定周期でのbinning）として扱う方式とタプル形式のイベントとして扱う方式の２通り。

### 因果モデル

Granger因果性分析に基づく手法複数で実施。回帰分析、独立性検定、Graphical Event Model(GEM) の３通りで分析。このうちGEMだけがタプル形式のデータ入力である。
詳細：TODO

##　実験

オープンなチケット予約シミュレータ [TrainTicket Microservice](https://github.com/FudanSELab/train-ticket) から ts-ui-dashboard, ts-travel2-service, ts-travel-service, ts-ticketinfo-service のサービスを稼働させて、fault injection により模擬的にシステムダウンのデータを取得した。microservice名、コンテナID、時刻、(プロセスからの)ログ出力など71フィールドを持つ。これに対し辞書形式のラベリングルール(例えば、500 Internal Server Errorを含んでいればエラー、等)でエラーあり、なしをラベル付けした。

回帰分析、因果性分析、Graphical Event Model(GEM) の３通りで分析した。推定された因果モデルは以下である。

![estimated causal models](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yvh9b62a8fi06spsc55z.png)

左から正解の因果モデル、因果性分析、回帰分析、PGEM(proximal graphical event model) の結果である。ここで金色のラインは正解の因果関係、false positive(第一種過誤)はグレーの線、false negative(第二種過誤)はグレーの破線である。

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

 上の表は因果グラフが正解かどうかを評価し、比較した表である。PGEMが最も高いF1である。時系列特徴を使用する場合はbinの長さによって結果がかなり変わりうることがわかる。
Configure Git with name and email
Tags: git, beginners
Published: 2022-05-05 06:16:05

To check if Git is configured with your username
`git config user.name`

To check if Git is configured with your email address
`git config user.email`

To configure the name that Git will associate with your work
`git config --global user.name "Your Name"`

To configure the email address in Git
`git config --global user.email abc@test.com`
Simple tool to read messages on RabbitMQ
Published: 2022-05-05 06:07:19

---
title: Simple tool to read messages on RabbitMQ
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---
I found the following repository that let you to read RabbitMQ messages easily.
[https://github.com/dubek/rabbitmq-dump-queue](https://github.com/dubek/rabbitmq-dump-queue)
This is Go lang based tool and you can use it with the following command:
```
go get github.com/dubek/rabbitmq-dump-queue
```
This will compile the code into the `$GOPATH/bin` and you can use the tool from there.
Following is a sample command that you can dump upto 500 messages from the rabbitmq along with its header data:
```
./rabbitmq-dump-queue  -uri="amqp://guest:guest@localhost:5672/" -queue=queue1 -max-messages=500 -output-dir=/output/locaiton -full
```
Day 5 - Why is java not a Pure Object-Oriented language?
Tags: java, beginners, programming
Published: 2022-05-05 03:05:41

---
title: Day 5 - Why is java not a Pure Object-Oriented language?
published: true
date: 2022-05-05 03:02:17 UTC
tags: java,beginner, programming
canonical_url: https://blog.sanjaybabu.dev/day-5-why-is-java-not-a-pure-object-oriented-language
series: 100 days of interview questions
---

For any programming language to be called a pure object-oriented language, it should satisfy all the 7 rules below :

1. Encapsulation/Data Hiding
2. Inheritance
3. Polymorphism
4. Abstraction
5. All predefined types are objects
6. All user-defined types are objects
7. All operations performed on objects must be only through methods exposed to the objects.

Java fails the rule no-5 and 7.

## Why java fails the "All predefined types are objects" rule?

We have primitive data types - `boolean, byte, char, int, float, double, long, short` which are predefined types but not objects.

## Why java fails the "All operations performed on objects must be only through methods exposed at the objects" rule?

It's due to the `static` keyword. When a variable is declared as static, they become class-level elements instead of instance variables. These static variables are accessible directly with the class name and can be used without the objects.
Install Git on a Windows Machine
Tags: git, beginners
Published: 2022-05-05 05:42:50

1. Download and install Git for Windows 
    - https://git-scm.com/download/win
    - Select "Launch Git Bash" on the last step of the Installation
2. On Git Bash, execute `git --version`
    - This is to confirm that Git is successfully installed

Note on Git Bash:
- Git was designed to run on a Unix-based interface (like Bash)
- Windows comes with different command line interface called Command Prompt that is not Unix-based
- Git Bash is a tool that emulates a Bash experience on a Windows machine
Using Faker is anti-pattern
Tags: ruby, testing, programming
Published: 2022-05-05 05:36:10

In my opinion, Faker and randomly generated data is usually an anti-pattern in tests.

First of all, with Faker tests become nondeterministic: run - crashed, run again - passed. Such flaky tests are extremely difficult to debug and annoying on CI.

Secondly, random data slows down tests. Especially in factories: I worked on a project where switching from Faker to `sequence { ... }` accelerated the test suite by 12%.

Thirdly, Faker overuse leads to code duplication in the tests. For example, take a look at the test method that returns user's initials:

```ruby
it "returns initials"
  user = described_class.new(name: Faker::Name.name)
  expected = user.name
    .upcase
    .split(" ")
    .map { |part| part[0] }
    .join("")

  expect(user.initials).to eq(expected)
end
```

This is an incomprehensible and confusing test: if the `#initials` method changes, the changes will have to be duplicated in the test as well. A better way would be to write it like this:

```ruby
it "returns initials"
  user = described_class.new(name: "Daniel Craig Jones")

  expect(user.initials).to eq("DCJ")
end
```

I suggest you to take a closer look at Faker in your test suite: are you sure you need it?

More on this topic:
- [Stop using Faker and random data in the test fixtures](https://jtway.co/stop-using-faker-and-random-data-in-the-test-fixtures-67332269a64e)
- [FactoryGirl Tips and Tricks](https://arjanvandergaag.nl/blog/factory_girl_tips.html)
- [You Shouldn’t Use Faker (or other test randomization libraries)](https://kevin.burke.dev/kevin/faker-js-problems/)
How to Customize and Display Multiple Angular Dialog Components
Tags: angular, webdev
Published: 2022-05-05 05:23:08

Learn how to create a custom dialog using the Syncfusion Angular Dialog control. You’ll also see how to show multiple dialogs on the same page. 

**Product Overview**: https://www.syncfusion.com/angular-ui-components/angular-modal-dialog

**Tutorial video**: https://www.syncfusion.com/tutorial-videos

**Download the example from GitHub**: https://github.com/SyncfusionExamples/how-to-customize-and-display-multiple-angular-dialog-components

{% youtube AivsEBpOGJw %}
Terminal kommandalar
Published: 2022-05-05 05:14:34

## `pwd`
- joriy papka manzilini chop etadi

## `clear`
-terminaldagi hamma tekstni tozalab yuboradi

## `ls`
-joriy papka ichidagi hamma narsani chop etadi
-`ls-a` yashirin fayllarni ham chop etadi

## `mkdir`
-biror nom ostida papka yaratish

## `cd `
-joriy papkadan boshqasiga o'tkazadi

## `cd..`
- ortga qaytish vazifasini bajaradi
Frontend Interview Resources
Tags: javascript, webdev, interview, career
Published: 2022-05-05 05:08:42

## Preparing for front-end interviews? 

I have found some good repositories to prepare for front-end interviews.

{% embed https://github.com/thedaviddias/Resources-Front-End-Beginner %}

{% embed https://github.com/sadanandpai/frontend-learning-kit %}

{% embed https://github.com/thedaviddias/Front-End-Design-Checklist %}

{% embed https://github.com/thedaviddias/Front-End-Checklist %}

{% embed https://github.com/thedaviddias/Front-End-Performance-Checklist %}

{% embed https://github.com/yangshun/front-end-interview-handbook %}

{% embed https://github.com/andrew--r/frontend-case-studies %}

If you have any good resources feel free to share I will add them.

> P.S. - Read daily/weekly one case study you will learn a lot.
I have created a [notion](https://ajaycod.notion.site/Interview-Resources-d920d545eefe4964b4bb786dd0b16f45) page for resources feel free to bookmark it. I will add more resources and good blogs. 

**Thanks for reading. Let's connect on [Twitter](https://twitter.com/KumbhareAjay) and [LinkedIn](https://www.linkedin.com/in/ajaykumbhare/)**
Variables, Data types, Operators
Published: 2022-05-05 05:04:54

ozgaruvchilar nomining umumiy qoidalari:  


Ismlar, harflar, raqamlar va unc bolishi mumkin
ismlar harf yoki unde bilan bolinishi kerak 
Ismlar katta-kichikligiga sezgir (myVar va myvai nomlarida boshliqlar bolishi mumkin emas)



Malumotning asosiy turlari

Malumotning turi ozgaruvchi saqalaydigan hajmi va turini belgilaydi


Malumotning turi Hajmi tavsifi

boolean 1 bayt rost yoki yolgon qiymatlarini saqalaydi
char esa 1 belgi yoki harf kabilarini saqalaydi
int 2 ta yoki 4 ta butun narsalarni saqlaydi


onli kasrlarsiz
float 4 bayt 1 yoki bir nechta 10 li kasrlarni oz ichiga olgan kasr sonlarni saqlaydi 
2 ta 8 bayt 1 yoki 1 nechta onli kasrlarni oz ichiga olgan sonlarni saqlaydi


operator ozgaruvchilar va qiymatlar ustida amallar bajarish uchun ishlatiladi
React Tricks Miniseries 5: How to pass props more efficiently
Tags: react, props, theeasydev
Published: 2022-05-05 04:24:17

React is all about props and the more you use reusable components, the more scaleable your react app will become (if done correctly, of course).

Passing props to a child component may be trivial, but many developers do it wrong. We've all been there though. Most of use pass props in one of two way. Either passing every property we wish to use, or passing an object containing the props we want to use.

##Method 1
```javascript
<Card 
  cardObject={cardObject}
/>
```

##Method 2
```javascript
<Card 
  title={title}
  description={description}
  rating={rating}
/>
```

With the first scenario, we'd need to retreive the props inside the Card component, in a less than efficient way:

```javascript
export default function Card(props) {
  const { title, description, rating } = props.cardObject
}
```

And with the second scenario, when the list of props gets long, it becomes too inefficient to add them all one by one.

#Solution
The best practice method is to use object destructuring like this:

```javascript
<Card 
  {...cardObject}
/>
//then retrieve the props in the usualy way
export default function Card({ title, description, rating }) {
  
}
```

This method is a lot cleaner, more efficient and scales much better for long lists of props.

##Conclusion
Using object destructuring, we can achieve better and more efficient props passing to react components.

Have you always used this method? Or just learned it now? Let me know in the comments!
How to install grpc php on ubuntu?
Tags: php, ubuntu, linux, grpc
Published: 2022-05-05 03:59:50

1. Installing PECL :
`sudo apt-get install autoconf zlib1g-dev php-dev php-pear`

2. Installing Composer ( skip if already installed ) :
`curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer`

3. Installing extension php grcp :
`sudo pecl install grpc`

4. Edit your `php.ini` in `/etc/php/{7.4 or 8.0 or other php version }/cli/php.ini` and add `extension=grpc.so`

Good luck
draft
Published: 2022-05-05 03:51:51


Reading LED ThumbReading LED Thumb
https://www.instructables.com/Reading-LED-Thumb/
Instructables, Autodesk · Jan 5, 2019Instructables, Autodesk · Jan 5, 2019
Show publication
Tutorial of making a LED page holder
- Featured InstructableTutorial of making a LED page holder - Featured Instructable

Crystal Light With Piezoelectricity
https://www.instructables.com/Crystal-Light-With-Piezoelectricity-the-Precious-L/
Instructables, Autodesk · Sep 13, 2017Instructables, Autodesk · Sep 13, 2017
Show publication
Tutorial for Making Crystal LEDs with Piezoelectricity
- Runner Up, GIFs Challenge, Instructables, Autodesk
- Featured Instructable
Who's listening LoFi Girl on Youtube at High Resolution?
Tags: discuss, lofi, music, youtube
Published: 2022-05-05 03:41:04

I like to listen to this stream (Lofi Girl) a lot when I'm programming. The thing is: I always set the resolution to 144p. I have a good internet connection but I don't like Youtube to be bufferiing a video on high (or even normal) resolution if I'm not watching. 

So, I just want to know if there are people who listen to music on Youtube at high resolution ( 720p or More) and why. 

Happy Coding!
How to use Vuetify with Nuxt 3
Tags: nuxt, vuetify, vue
Published: 2022-05-05 03:31:41

# How to use Vuetify with Nuxt 3

> Utilize the latest versions of Vuetify and Nuxt together.


## Installation

Start by creating a Nuxt 3 project if you do not have one already.

```bash
npx nuxi init nuxt-app
```

Then run `cd nuxt-app` and run `yarn` to make sure your dependencies are installed.

Now that our Nuxt 3 project is setup, we are ready to integrate Vuetify. While you are in the nuxt application's root directory, run the following command to install Vuetify 3 and it's dependency, sass.

```bash
yarn add vuetify@next sass
```

Your `package.json` should now look similar to the following:

```json
// package.json
"devDependencies": {
  "nuxt": "3.0.0-rc.1"
},
"dependencies": {
  "sass": "^1.51.0",
  "vuetify": "^3.0.0-beta.1"
}
```

## Creating our Vuetify plugin

We have Vuetify installed, now we need it to talk to Nuxt. We will do this by using Nuxt's [plugin](https://v3.nuxtjs.org/guide/directory-structure/plugins/) feature.

Create a `plugins` folder then create a file named `vuetify.js` and put it in the newly created plugins folder.

Then, within the `vuetify.js` file, paste the following code into it:

```js
// plugins/vuetify.js
import { createVuetify } from 'vuetify'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'

export default defineNuxtPlugin(nuxtApp => {
  const vuetify = createVuetify({
    components,
    directives,
  })

  nuxtApp.vueApp.use(vuetify)
})
```

This is mostly documented [here](https://next.vuetifyjs.com/en/getting-started/installation/#usage) within Vuetify's explanation. The key difference is we use `nuxtApp.vueApp.use(vuetify)` rather than `app.use(vuetify)`.

## Configure Nuxt 3 to use our new plugin

Our last bit of configuration occurs in our `nuxt.config.ts` file. This is where we tell Nuxt how to properly find and build Vuetify's sass.

```js
// nuxt.config.ts
import { defineNuxtConfig } from 'nuxt'

// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
  css: ['vuetify/lib/styles/main.sass'],
  build: {
    transpile: ['vuetify'],
  },
  vite: {
    define: {
      'process.env.DEBUG': false,
    },
  },
})
```

## Enjoy Vuetify alongside Nuxt 3

Everything should now be working as expected and you should now be able to utilize the wide array Vuetify components within your Nuxt pages!

Enjoy!
Rubber Ducky You're The One
Tags: javascript, beginners, webdev, debug
Published: 2022-05-05 03:00:42

##You make coding...make more sense? 
While teaching myself how to code, all the videos, blog posts and more say you gotta talk it out. And the best way to do that is with a rubber duck or just anything really. These past few weeks, I've really been speaking my thoughts aloud but not to a duck. And I've got like 100 ducks around here (I drive a Jeep, it comes with the territory). Instead I have a little POP figure, it's Poca, short for Pocahontas. She listens to me answer my own questions or confuse myself even more on the daily. But man I'm glad I've got her. 

##Take debugging one error at a time
Since I've started working with APIs in my projects, those CORS errors are out in full force. I'm slowly breaking them down by copying them and directly posting them in Google. Because let's be real, every error has occurred at least once and SOMEONE (Lord bless 'em) has asked about it. One thing that helps is being familiar with your browser. Google Chrome is where it's at for me. I tried FireFox Developer Edition. It looks super flashy and shiny and new but Chrome Dev Tools *chef's kiss*. Both show you exactly what line your error is coming from but sometimes FireFox gives me too much info. I'm just not that advanced YET, so chill FF. 


What about you? What do you use as your rubber ducky debugging tool? And your browser of choice? Why?
Better way of using TryCatch in PHP | Laravel
Tags: php, laravel
Published: 2022-05-05 02:48:31

Provide you a timestamp, message as well as path

```
 try{

  // your code 

 } catch (Exception $exception) {
            return Response::json([
                "timestamp" => date('Y-m-d\TH:i:s.vP'),
                "status" => 400,
                "error" => "Bad Request",
                "message" => $exception->getMessage(),
                "path" => \Request::getRequestUri()
            ], 400);
        }
```
Python + Flask Deploy to Amazon Web Services, Elastic Beanstalk, CI CD with Git
Tags: python, flask, aws, git
Published: 2022-05-05 02:21:58

Video youtube: [![Python + Flask Deploy to Amazon Web Services, Elastic Beanstalk, CI CD with Git](https://i9.ytimg.com/vi/NQuPPauptPg/mq2.jpg?sqp=CNDozJMG&rs=AOn4CLBKFQENzbUmsP7GfdwQAwzWLx3Rzg)](https://youtu.be/NQuPPauptPg "Python + Flask Deploy to Amazon Web Services, Elastic Beanstalk, CI CD with Git")
Using Git from Python
Tags: python, cli, git
Published: 2022-05-05 02:16:48

---
canonical_url: https://waylonwalker.com/til/python-git/
cover_image: https://images.waylonwalker.com/til/python-git.png
published: true
tags:
- python
- cli
- git
title: Using Git from Python
---

`GitPython` is a python api for your git repos, it can be quite handy when you
need to work with git from python.

## Use Case

I recently made myself a handy tool for making screenshots in python and it need to do a git commit and push from within the script.  For this I reached for `GitPython`.

https://waylonwalker.com/screenshot-to-blog/

## Installation

`GitPython` is a python library hosted on pypi that we will want to install
into our virtual environments using pip.

``` python
pip install GitPython
```

## Create a Repo Object

Import Repo from the git library and create an instance of the `Repo` object by giving it a path to the directory containing your `.git` directory.

``` python
from git import Repo repo = Repo('~/git/waylonwalker.com/')
```

## Two interfaces

from the docs

> It provides abstractions of git objects for easy access of repository data,
> and additionally allows you to access the git repository more directly using
> either a pure python implementation, or the faster, but more resource
> intensive git command implementation.

I only needed to use the more intensive but familar to me git command implementation to get me project off the ground.  There is a good [tutorial](https://gitpython.readthedocs.io/en/stable/tutorial.html#tutorial-label) to get you started with their pure python implementation in their docs.

## Status

Requesting the git status can be done as follows.

> note I have prefixed my commands with >>> to distinguish between the command
> I entered and the output.

```
>>> print(repo.git.status())

On branch main Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        blog/
```

You can even pass in flags that you would pass into the cli.

``` python
>>> print(repo.git.status("-s"))
?? blog/
```

## log

Example of using the log.

``` python
print(repo.git.log('--oneline', '--graph'))

* 0d28bd8 fix broken image link
* 3573928 wip screenshot-to-blog
* fed9abc wip screenshot-to-blog
* d383780 update for wsl2
* ad72b14 wip screenshot-to-blog
* 144c2f3 gratitude-180
```

## Find Deleted Files

We can even do things like find all files that have been deleted and the hash they were deleted.

``` python
print(repo.git.log('--diff-filter', 'D', '--name-only', '--pretty=format:"%h"'))
```

https://waylonwalker.com/git-find-deleted-files/

> full post on finding deleted files

## My Experience

This library seemed pretty straightforward and predicatable once I realized there were two main implementations and that I would already be familar with the more intensive git command implementation.
Unlimited perspective animation with HTML, CSS
Tags: css, javascript, youtube
Published: 2022-05-05 02:14:03

Video Youtube: [![Unlimited perspective animation with HTML, CSS](https://i9.ytimg.com/vi/-vWGMQUHnVs/mq2.jpg?sqp=CPjjzJMG&rs=AOn4CLBlop64h4cssBDZYCQoOqTpzrnqOw)](https://youtu.be/-vWGMQUHnVs "Unlimited perspective animation with HTML, CSS")
CONFIGURAR UN PROXY CORPORATIVO
Tags: devops, spanish, proxy
Published: 2022-05-05 02:10:20

Cuando la aplicación de consola se utiliza en una empresa, probablemente necesitará configurar todas las herramientas para salir a internet por el proxy corporativo.

Suponiendo que el proxy tiene los siguientes elementos

- username
- password
- host
- port

Da como resultado la siguiente configuracion http://username:password@host:port

Git proxy

use los siguientes comandos

```
git config --global http.proxy http://username:password@host:port
git config --global https.proxy http://username:password@host:port
```
o editando directamente el archivo ~/.gitconfig

```
[http]
proxy = http://username:password@host:port
[https]
proxy = http://username:password@host:port
```

NPM proxy

```
npm config set proxy http://username:password@host:port
npm config set https-proxy http://username:password@host:port
```
o editando directamente el archivo ~/.npmrc

```
proxy=http://username:password@host:port
https-proxy=http://username:password@host:port
https_proxy=http://username:password@host:port
```

IONIC proxy

```
ionic config set -g proxy http://username:password@host:port
ionic config set -g https-proxy http://username:password@host:port
```

Yarn proxy

```
yarn config set proxy http://username:password@host:port
yarn config set https-proxy http://username:password@host:port
```