teleren/devto huggingface dataset:
Day 59 of 100 Days of Code & Scrum: Sassy Flexbox and Ghost Content API
Tags: 100daysofcode, beginners, javascript, productivity
Published: 2021-12-10 11:22:49

Greetings, everyone!

Today, I made some progress on the styling of [the Rammina coding blog](https://www.rammina.com/)'s **Recent Posts** section. There are still a lot of things to improve on, but I am liking where the design is heading towards. It was fun to work on!

![Rammina Blog Recent Posts Section](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5dhf71wgfhv3ffwzv36.png)

I most likely will deploy it tomorrow or the next day.

Anyway, let's move on to my daily report!

## Yesterday

I got a prototype design done for a specific blog page.

## Today

Here are the things I learned and worked on today:

### Company Blog

- styled my [company page blog](https://www.rammina.com/) **Recent Posts** section.
- learned about various data objects in the Ghost Content API, such as `posts`, `pages`, and `authors`.
- practiced Typescript non-null assertion `!` and the `as <type>` keyword.

### Scrum

- I did some practice flashcards for Scrum.
- reviewed some of the things I've learned before.

Thank you for reading! I hope everyone's doing well.

![Rammina Thank You Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x9ayfxxxaz2g2hfcqbsk.png)

### Resources/Recommended Readings

- [Posts | Ghost Content API documentation](https://ghost.org/docs/content-api/#posts)
- [Typescript 2.0 release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html)
- [The 2020 Scrum Guide](https://scrumguides.org/scrum-guide.html)
- [Mikhail Lapshin's Scrum Quizzes](https://mlapshin.com/index.php/scrum-quizzes/)

### DISCLAIMER

**This is not a guide**, it is just me sharing my experiences and learnings. This post only expresses my thoughts and opinions (based on my limited knowledge) and is in no way a substitute for actual references. If I ever make a mistake or if you disagree, I would appreciate corrections in the comments!

<hr />

### Other Media

Feel free to reach out to me in other media!

<span><a target="_blank" href="https://www.rammina.com/"><img src="https://res.cloudinary.com/rammina/image/upload/v1638444046/rammina-button-128_x9ginu.png" alt="Rammina Logo" width="128" height="50"/></a></span>

<span><a target="_blank" href="https://twitter.com/RamminaR"><img src="https://res.cloudinary.com/rammina/image/upload/v1636792959/twitter-logo_laoyfu_pdbagm.png" alt="Twitter logo" width="128" height="50"/></a></span>

<span><a target="_blank" href="https://github.com/Rammina"><img src="https://res.cloudinary.com/rammina/image/upload/v1636795051/GitHub-Emblem2_epcp8r.png" alt="Github logo" width="128" height="50"/></a></span>
ArtifactsにアップしたファイルのURLをSlackに通知する
Tags: circleci, slack
Published: 2021-12-10 11:19:45

---
title: ArtifactsにアップしたファイルのURLをSlackに通知する
published: true
tags: CircleCI, Slack
---

CircleCIのArtifactにアップロードしたファイルのURLをSlackに通知する仕組みを作ります。作業リポジトリは以下です。

 {% github YutaGoto/artifacts-sample %} 

サンプルとしてvivriostyleでビルドして出来上がったpdfファイルをArtifactとしてアップロードしています。

## アーティファクトのアップロード

https://circleci.com/docs/ja/2.0/artifacts/

公式にある通り、 `store_artifacts`にパスを指定します。

```yaml
jobs:
  build:
    executor:
      name: node/default
      tag: 'lts-browsers'
    working_directory: ~/project # 作業用ディレクトリ指定
    steps:
      - checkout
      - node/install-packages:
          cache-path: ~/project/node_modules
          override-ci-command: yarn install
      - run:
          name: build
          command: yarn build
      - run:
          command: mkdir ~/project/artifacts # アップロード用ディレクトリ生成
      - run:
          command: mv output.pdf ~/project/artifacts/output.pdf # pdfファイルの移動
      - store_artifacts:
          path: ~/project/artifacts # アップロード
```

## URLの取得

https://circleci.com/docs/api/v1/#download-an-artifact-file

CircleCIのAPIにリクエストして環境変数に保存します。

```sh
artifacts=$(curl -X GET "https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/$CIRCLE_BUILD_NUM/artifacts" \
-H "Accept: application/json" \
--header "Circle-Token: $CIRCLE_TOKEN") # APIをたたいてレスポンス値を代入する
artifact0=$(echo $artifacts | jq '.items[0].url') # jqコマンドでurlの文字列を取得する
echo "export ARTIFACT0=$artifact0" >> $BASH_ENV # 環境変数に登録する
```

変数に関しては過去記事もありますので合わせてみてください。

{% post yutagoto/circleci-1d5c %}

## Slackに通知

https://circleci.com/developer/ja/orbs/orb/circleci/slack

CircleCIのSlackOrbを使うと簡単に通知させることができます。メッセージの組み立てはSlackのBlock Kit Builderを使っています。

https://app.slack.com/block-kit-builder/

```yaml
      - slack/notify:
          event: always # 常に通知させる
          custom: |
            {
              "blocks": [
                {
                  "type": "section",
                  "text": {
                    "type": "mrkdwn",
                    "text": "Book Artifacts <${ARTIFACT0}>"
                  }
                }
              ]
            }
```

## 結果

正しく登録できると以下の画像のようなSlack通知が来ると思います。リンククリックしたら実際にPDFファイルがブラウザで確認ができます。

![slack](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qj8j7kzze09sheydz4zl.png)
RRB NTPC Result 2021 – Railways NTPC Scorecard & Results Date
Tags: ntpc, result
Published: 2021-12-10 11:19:45

The RRB NTPC Result will be declared separately for each stage. Along with result, RRB will release score card and cut off marks on the official website. To download scorecard, candidates should enter their registration number and password. We will provide the detailed information on [RRB NTPC Result](https://karnatakastateopenuniversity.in/rrb-ntpc-result.html) 2021 and steps to download scorecard in this article.
RRB NTPC Exam 2021 Results Overview
Name of Exam 	RRB NTPC
Exam Conducting Body 	Railway Recruitment Board
Application Mode 	Online
Article Category 	SarkariResult
Official website 	www.indianrailways.gov.in
RRB NTPC Exam Dates 	Dec 2020- March 2021
RRB NTPC Result 	To be announced soon

Check Here :>>>>> [RRB NTPC Cut Off 2021](https://karnatakastateopenuniversity.in/rrb-ntpc-cut-off-marks.html)
Railway Result 2021 (परिणाम चेक करें)

The CBT Exam attempters are looking a platform where they can get exact information. So at this platform you can get exact information regarding RRB Result 2021 and RRB NTPC Expected Cutoff Marks. The candidates who had taken part in CBT Exam can check their Score Card from the Official Page of RRB. The Railway Bharti Board has conducted the Online Written Exam for the selection of Many Non-Technical Posts. Uncountable number of Railway Job Seekers had applied for this Railway Bharti against Goods Guard, Assistant Station Master (ASM), Traffic Apprentice (TA), Junior Accounts Assistant cum Typist (JAA), Senior Clerk cum Typist, Commercial apprentice (CA), Traffic Assistant, and Enquiry cum reservation clerk (ECRC), Senior Time Keeper (STK).Now the Railway Bharti Board is ready to declare Result for Computer Based Test (CBT), Skill Test/Aptitude Test and Documents Verification step by step.
Journey to Open Source with Outreachy
Published: 2021-12-10 07:17:48


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


Hello! I'm Maryam Yusuf from Nigeria. I have been selected as one of the 61 interns of the Outreachy (December - March) '21 round.

I will be working on Improving the Unified Kernel Test Result Database System ("KCIDB") a package for submitting and querying Linux Kernel reports. KCIDB is a KernelCI project. The goal of KernelCI is to use an open testing philosophy to ensure the quality, stability and long-term maintenance of the Linux kernel.

As part of my 3-month internship, I'll be blogging to share my experiences with Outreachy and KernelCI. I hope this will help anyone who is interested in applying to Outreachy, or interested in tech.

## What is Outreachy?

Outreachy is an initiative that provides paid remote internships with open-source software projects to the underrepresented groups in Tech. Their aim is to bring diversity and inclusivity to the tech industry.


## My core values
My core values are adventure, community, and growth.

- Adventure: I consider myself an adventurous person and value being adventurous. I love trying new things and taking risk on improving myself and helping the world to be a better place. I have a lot of exciting ideas piled up that I would try one day.

- Community: Community engagement brings drastic change and impact to the world. Imagine a world without the the open source community, we would not have achieved what we have today.  

- Growth: I used to be so scared to step out of my comfort zone especially after rejection. I was scared to reapply for Outreachy when I got rejected in the last round, but I realise rejections are also part of growth. 

## Motivations for Applying to Outreachy

I came across Outreachy while I was exploring the Open source community after graduating from the University. I tried applying in 2020 but got rejected. One of my friends got the 2021 round for May, and encouraged me to apply again. I am definitely grateful to Hasana who encouraged me and helped out through my initial application process. 

The second stage of the application was pretty easy as I am familiar with Python and the project I planned to contribute on (KCIDB) was also in Python. Although I had to learn a lot of things like the Google Cloud Platform(GCP) but it was interesting as learning new things is something I love.

I’m glad I didn’t let rejection stop me or else I wouldn’t be writing this blog post today.
AWS re:Invent 2021 — A first look at SageMaker Studio Lab
Tags: transformers, aws, machinelearning, jupyternotebook
Published: 2021-12-16 16:07:19

---
title: AWS re:Invent 2021 — A first look at SageMaker Studio Lab
published: true
date: 2021-12-10 11:16:21 UTC
tags: transformers,aws,machinelearning,jupyternotebook
canonical_url: https://julsimon.medium.com/aws-re-invent-2021-a-first-look-at-sagemaker-studio-lab-6504b91f1de7
---

### AWS re:Invent 2021 — A first look at SageMaker Studio Lab

In this video, I demo [SageMaker Studio Lab](https://studiolab.sagemaker.aws/), a managed Jupyter notebook service running on AWS.

Using a CPU runtime, I first run a simple [Hugging Face](https://huggingface.co) example based on the [Pipeline](https://huggingface.co/docs/transformers/main_classes/pipelines) API. Then, I switch to a GPU runtime and run a fine-tuning example on DistilBERT with the [Trainer](https://huggingface.co/docs/transformers/main_classes/trainer) API.

Along the way, I inspect the infrastructure resources available in both runtimes. I also show you how to create your own conda environment to keep your dependencies neatly organized.

{% youtube jfSYHWLpER0 %}

⭐️⭐️⭐️ Don’t forget to subscribe to be notified of future videos ⭐️⭐️⭐️

New to Transformers? Check out the [Hugging Face course](https://huggingface.co/course).
Build JavaScript Home Budget App - Code with me
Tags: javascript, beginners, programming, webdev
Published: 2021-12-10 11:10:43


This is a No Talk coding video session in my flat in Lodz, Poland on a rainy night with my hot cup of black coffee.

ASMR coding a JavaScript Home Budget application, AKA "Expense Tracker" which is suitable for anyone that wants to keep track of their daily finances.

No talk, just typing quietly on my mechanical keyboard "Genesis Thor 300 TKL".

There's the video, so you can prepare your hot beverage and code along with me :


{% youtube aw78jgX0nU4 %}

Hope you enjoy, guys

Social Media  
----------------------
Facebook : https://www.facebook.com/bekbrace​​​​/ 
Twitter : https://twitter.com/BekBrace/
Instagram : https://www.instagram.com/bek_brace/
GitHub profile : https://github.com/BekBrace/​​​
Website : https://bekbrace.com/

Reach out  : info@bekbrace.com


Tools used in video:
--------------------
Microphone used in recording Blue Yeti
Coding on Genesis Thor 300 TKL keyboard

Support
-------
Join this channel to get access to perks:
https://www.youtube.com/channel/UC7EVSn5inapL20oPSwAwEUg/join
OR
Become a Patron: https://www.patreon.com/bekbrace
Advent of Code 2021 - Day 10
Published: 2021-12-10 11:05:09

---
title: Advent of Code 2021 - Day 10
published: true
description: In this video series, I try to challenge myself with the Advent of Code trials. Each solution will be published to Github, and I hope you will learn something from my coding mistakes and perhaps send some code my way on how you have done these challenges. I know by reading code, so this is such an exciting thing for me.
tags:
cover_image: https://i.ytimg.com/vi/THHJObMeCLQ/maxresdefault.jpg
---

{% youtube THHJObMeCLQ %}

In this video series, I try to challenge myself with the Advent of Code trials. Each solution will be published to Github, and I hope you will learn something from my coding mistakes and perhaps send some code my way on how you have done these challenges. I know by reading code, so this is such an exciting thing for me.
Install Git on Linux
Tags: beginners, git, github, productivity
Published: 2021-12-10 10:51:54

In the last two parts of these series, we studied in detail, how to install git on Windows operating system and Mac.

Herein, we'll get up and running with git on Linux.

Installation of the basic Git tools on Linux can be done via a binary installer, you can generally do so through the package management tool that comes with your distribution. If you’re on Fedora (or any closely-related RPM-based distribution, such as RHEL or CentOS), you can use **dnf:** ````sudo dnf install git-all````

If you're a Debian-based system such as Ubuntu, you can use **apt**, the default package manager. ````sudo apt install git-all````

If you are not sure which distro your machine 💻 is, 
1. Search for **terminal**
2. Launch the terminal
3. Enter the following command in your terminal ````bash
git --version````. This will prompt for installation of git and provide you with command to do this.
4. Type in the command  provided in **step 3** above. That should get you up and running with git.

To verify your installation, run ````git --version````
This should give return the version of git currently installed on your machine
![verify git installation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0naq2zfgte77n44yp3ib.png)
Anyone looking for graphics and content related work ? We can help
Tags: startup
Published: 2021-12-10 10:46:30

Studies say a good graphic illustration along with catchy content can increase your client base by 13%.

We provide a one-stop destination to help you scale up your content needs. We also help corporates with illustrative graphic works & faster content delivery. Here are a few on-demand services that we provide,

- Content Strategy
- Content Management
- Graphic Designing
- Illustrative Graphic Designing
- Blog Writing (Regular Posts)
- Video Editing

We would be glad enough to be a partner in your goal to improve your business growth and sales.

Eagerly waiting for your responses.
Selenium Web Driver running problem
Published: 2021-12-10 10:30:56

Hello!
I am kinda new to selenium and having an issue rn i can't fix myself.

My Code:
```
from selenium import webdriver

# other chrome options
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')

driver = webdriver.Chrome(executable_path="C:/Users/arutyunyan/PycharmProjects/pythonProject2/chromedriver/chromedriver.exe",options=chrome_options)
```

This is what i get:
```
The following error was encountered while trying to retrieve the URL: <a href="http://localhost:53069/session">http://localhost:53069/session</a>

Cache Access Denied.

Sorry, you are not currently allowed to request http://localhost:53069/session from this cache until you have authenticated yourself
```

My network connection is behind proxy, but i am not sure it has to be the problem since i am connecting to localhost

What might be the problem?
Make images load fast by using Webp image in website
Tags: image, html, css, webdev
Published: 2021-12-10 10:26:48

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

### Why to use **Webp** images

1. Webp images is especially build for web by google to optimize the loading speed of images
2. The image is smaller 26% by size compared to <u>PNG</u> images
3. WebP supports transparency at a cost of just 22% additional bytes

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

Try to use WebP images in website instead of **PNG** and **JPEG** images

Example
```html
<img src="image.webp" alt="" />
```
 
Thanks for reading...
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gkwoadi6aa9ykz1nosly.gif)
Advent of PBT 2021 - Day 10
Tags: challenge, testing, webdev, javascript
Published: 2021-12-10 10:25:07

---
title: Advent of PBT 2021 - Day 10
published: true
description: Advent of Property Based Testing - Day 10
tags: challenge,testing,webdev,javascript
//cover_image: https://direct_url_to_image.jpg
---

> _Advent of PBT 2021 — Learn how to use property based testing and [fast-check](https://github.com/dubzzz/fast-check) through examples_

Our algorithm today is: **minimalNumberOfChangesToBeOther**.
It comes with the following documentation and prototype:
```ts
/**
 * Compute the minimal number of changes to be applied onto stringA
 * to change it into stringB.
 * In other words: Compute the distance of Levenshtein between
 * two strings.
 *
 * @param stringA - The first string to be taken into account
 * @param stringB - The second string to be taken into account
 *
 * @returns
 * Minimal number of single-character edits (insertions, deletions or
 * substitutions) to be applied onto stringA to change it into
 * stringB.
 */
declare function minimalNumberOfChangesToBeOther(
  stringA: string,
  stringB: string
): number;
```

We already wrote some examples based tests for it:
```ts
it("should not consider any change to move to same value", () => {
  const out = minimalNumberOfChangesToBeOther("azerty", "azerty");
  expect(out).toBe(0);
});

it("should properly handle added characters", () => {
  const out = minimalNumberOfChangesToBeOther("azerty", "0aze5rty9");
  expect(out).toBe(3); // add: 0, 5, 9
});

it("should properly handle removed characters", () => {
  const out = minimalNumberOfChangesToBeOther("0aze5rty9", "azerty");
  expect(out).toEqual(3); // remove: 0, 5, 9
});

it("should properly handle updated characters", () => {
  const out = minimalNumberOfChangesToBeOther("azerty", "AzERTy");
  expect(out).toEqual(4); // update: a->A, e->E, r->R, t->T
});

it("should properly handle mix of add/remove/update", () => {
  const out = minimalNumberOfChangesToBeOther("azerty", "0az1eRt");
  expect(out).toEqual(4); // add: 0, 1, remove: y, update: r->R
});
```

How would you cover it with Property Based Tests?

In order to ease your task we provide you with an already setup CodeSandbox, with examples based tests already written and a possible implementation of the algorithm: https://codesandbox.io/s/advent-of-pbt-day-10-78utw?file=/src/index.spec.ts&previewwindow=tests

You wanna see the solution? Here is the set of properties I came with to cover today's algorithm: https://dev.to/dubzzz/advent-of-pbt-2021-day-10-solution-3a3d

---

[Back to "Advent of PBT 2021"](https://dev.to/dubzzz/advent-of-pbt-2021-13ee) to see topics covered during the other days and their solutions.

More about this serie on [@ndubien](https://twitter.com/ndubien) or with the hashtag [#AdventOfPBT](https://twitter.com/search?q=%23AdventOfPBT).
What is DDoS Attack?
Tags: linux, cybersecurity, security, news
Published: 2021-12-10 10:25:02

**DDoS**
A distributed denial of service (DDoS) attack is a brute-force attempt to slow down or completely crash a server. The goal of a DDoS attack is to cut off users from a server or network resource by overwhelming it with requests for service.

**Common types of DDoS attacks**

1. Volume based attack: This includes UDP, ICMP and many other spoof-packet floods that attempt to consume bandwidth.

2. Protocol attacks: This kind of attack go after server resources directly and include the [SmurfDDos](https://www.cloudflare.com/learning/ddos/smurf-ddos-attack/), Ping of Death and SYN floods. If large enough packets-per-second rate is achieved, the server will crash.
3. Application layer attack: They target apps by making what appear to be legitimate requests (GET/POST) but at a very high volume. If there are lots of requests in a very short period of time, the victim's server shuts down. 

**DoS vs DDoS**
While a simple denial of service (DoS) involves one attack computer and a victim, distributed denials of service (DDoS) rely on armies i.e. thousands of infected "bot" computers which carries out tasks simultaneously.

**Impact of DDoS Attacks**
Depending  on the severity of an attack, resources could be offline for couples of hours, days or even weeks. Money, time , clients, reputation can be destroyed. During an attack, employees are not able to access network resource, and in the case of web servers running eCommerce sites, no consumers will be able to login, purchase products or receive assistance. 

**What are the protective measures against DDoS attacks**

- Limit the number of login attempts any user can make before being locked out of an account.

- Tolerate a web-server configuration against DDoS attacks.

- Configure an ISP firewall to allow only the traffic complimenting to the services on the company side.

- Tweak your firewall to fight SYN flood attacks.

- Migrate public resources to another IP address.

- Upgrade your Hardware.


Other Resources
[<u>NCC Cyber Incident Response DDoS</u>](https://www.gov.scot/binaries/content/documents/govscot/publications/advice-and-guidance/2019/10/cyber-resilience-incident-management/documents/cyber-incident-response-denial-of-service-playbook/cyber-incident-response-denial-of-service-playbook/govscot%3Adocument/Cyber%2BCapability%2BToolkit%2B-%2BCyber%2BIncident%2BResponse%2B-%2BDenial%2Bof%2BService%2BPlaybook%2Bv2.3.pdf)
[<u>Imperva DDoS Response Playbook</u>](https://www.cbronline.com/wp-content/uploads/dlm_uploads/2018/04/Playbook-DDoS-Response-Playbook-new-V2.pdf)