teleren/devto huggingface dataset:
New Years Resolution - Dev Log 24
Tags: webdev, beginners, startup, programming
Published: 2022-03-18 05:06:49

I have been on a tear programming the final leg of the project. I thought of so many little things I had not even considered. For instance, adding a variable on job listings to keep track of the number of applicants. A Super intuitive thing that I had not done until now. Also, sending emails to companies that create job listings so that they have confirmation of the listing they just created. I had also forgotten to send emails to applicants to confirm that they applied for a position. A lot of small details have been covered.

Still have not been able to implement Stripe as a payment solution. I integrated Stripe in a previous React project, it seemed simpler back then. I thought it would be super simple, but in the last two years, they made a few changes that I am unfamiliar with. Either way, I should have it done by the end of the week. I am really excited because I am pretty sure I get to launch next week.

As for the reCAPTCHA, turns out that is something you throw on right after you get the site hosted. It requires a site on a domain in order to work correctly. Not a huge deal, I am sure I can get that working day of; who cares about security am I right /s? Really excited for the future, and I really hope this all works out. I should start buffing up on my marketing skills.

Glory to Ukraine!
How I glob for Files in Python
Tags: python
Published: 2022-03-18 04:58:03

---
canonical_url: https://waylonwalker.com/til/python-pathlib-glob/
published: true
series: til
tags:
- python
title: How I glob for Files in Python
---

A very common task for any script is to look for files on the system.  My go to method when globbing for files in python is to use pathlib.

## Setup

I setup a directory to make some examples about globbing.  Here is what the directory looks like.

``` bash
❯ tree .
.
├── content
│   ├── hello.md
│   ├── hello.py
│   ├── me.md
│   └── you.md
├── readme.md
├── README.md
├── READMES.md
└── setup.py
```

1 directory, 8 files
## Pathlib

Pathlib is a standard library module available in all LTS versions of python at this point.

``` python
❯ from pathlib import Path
```

Creating a Path instance.

``` python
# current working directory
Path() Path.cwd()

# The users home directory
Path.home()

# Path to a directory by string
Path('/path/to/directory')

# The users ~/.config directory
Path.home() / '.config'
```

## Globbing Examples

The path object has a glob method that allows you to glob for files with a unix style glob pattern to search for files.  Note that it gives you a generator. This is great for many use cases, but for examples its easier to turn them to a list to print them out.

If you need some more detail on what globbing is there is a [wikipedia](https://en.wikipedia.org/wiki/Glob_(programming)) article discussing it.  I am just showing how to glob with pathlib.

``` python

❯ Path().glob("**/*.md")
<generator object Path.glob at 0x7fa35adc4f90>

❯ list(Path().glob("**/*.md"))

[
    PosixPath('readme.md'),
    PosixPath('READMES.md'),
    PosixPath('README.md'),
    PosixPath('content/you.md'),
    PosixPath('content/me.md'),
    PosixPath('content/hello.md')
]

❯ list(Path().glob("**/*.py"))
[PosixPath('setup.py'), PosixPath('content/hello.py')]

❯ list(Path().glob("*.md"))
[PosixPath('readme.md'), PosixPath('READMES.md'), PosixPath('README.md')]

❯ list(Path().glob("*.py"))
[PosixPath('setup.py')]

❯ list(Path().glob("**/*hello*"))
[PosixPath('content/hello.py'), PosixPath('content/hello.md')]

❯ list(Path().glob("**/REA?ME.md"))
[PosixPath('README.md')]
```
My learning from Just Enough Software Architecture.
Tags: architecture, software, programming
Published: 2022-03-18 04:38:24

Recently I started reading the book Just Enough Software Architecture by George Fairbanks. This book helps me to prioritize the task. I Am adding my learning from this book here. This is first part of series of blog.

Software Architecture helps partition software, it provides knowledge, and enable abstraction to reveal the essence of the problem.
Risk driven architecture gives the priority to the risk of the project. So we take a risk in considering instead of an only feature. We can’t follow the same process for all team becasue each team have a different type of risk.

Risk is defined as the chance of failure times the impact of that failure. But measuring the exact chance of failure and impact is not easy. So we use our assumption of the chance of risk and also the impact and use it to measure risk.

Even if we are completely sure that there is no risk still we can’t guarantee it until we analyze and test it. And to analyze and test we need to understand what can be possible risks.

**Risks**
Describe risks: It is important to understand the type of risk and category of risk because every category of risk has a different way to handle it. Like there are project management risks, engineering risks and we can’t handle both in the same way. 
The server can’t handle the 1M user is the engineering risk and the lead team member had an accident is project risk and both need to handle differently.

Identify risk: Requirement gathering can help us to identify the risk. If you're working in a new domain then you gather the requirements and then list down the things that seem difficult to achieve.

Prototypical risks: There are some risks that exist in a domain for a while. This list of risks is valuable for the less experienced and experienced developer.

Prioritizing risks: Not all risks are equally impactful. So we need to prioritize risk. But priority can be different according to a different team. The risk which looks very important for the development team can be less priority according to the leader. So if you are spending enough time on any risk it’s better to discuss with the leader also to understand the priority(there are some risks on which only the development team can make a decision).

I will write next blog on 26th March. Check it [here](https://dev.to/amitiwary999/my-learning-from-just-enough-software-architecture-part-2-4441)
Carbon diffForHumans Laravel Example
Tags: laravel, php, webdev, 100daysofcode
Published: 2022-03-18 04:30:00

Today we will see carbon diffForHumans laravel example, this function in carbon provides human readable date and time formate in laravel or php.

When we want to display a date in the past with reference to the current time then you can use diffforhumans() carbon function, using diffforhumans carbon we can get results like this A few seconds ago, 30 minutes ago, 2 days ago, 1 year ago.

Example:

```
$post->created_at->diffForHumans() //output : 2 hours ago
```
 
When we need to compare the value in the future to default now like, 30 minutes from now, 1 hour from now, 2 days from now at that time we need to add days like the below example. 

```
$user->created_at->addDays(2)->diffForHumans() // output : 2 days from now
```
 
When we need to compare value in the past to another value like, 30 minutes before, 1 hour before at that time we will use the below example. 

```
$yesterday->diffForHumans($today) // output : 1 day before
```
 
When we need to compare value in the future to another value like, 30 minutes after, 1 hour after, 1 day after at that time we will use the below example

```
$tomorrow->diffForHumans($today) // output : 1 day after
```
Dieu kien thanh chi nhanh cong ty
Published: 2022-03-18 04:21:29

– Điều kiện chủ sở hữu chi nhánh:

Muốn thành lập chi nhánh công ty, điều đầu tiên cần làm trước là thành lập công ty và có Giấy chứng nhận đăng ký doanh nghiệp trước.

– [Điều kiện về Tên chi nhánh](https://luathungson.vn/):

Tên chi nhánh phải được viết bằng các chữ cái trong bảng chữ cái tiếng Việt, các chữ cái F, J, Z, W, chữ số và các ký hiệu. Tên chi nhánh phải mang tên doanh nghiệp kèm theo cụm từ “Chi nhánh” đối với chi nhánh.

Ngoài tên bằng tiếng Việt, chi nhánh của doanh nghiệp có thể đăng ký tên bằng tiếng nước ngoài và tên viết tắt.

– Điều kiện trụ sở chính chi nhánh:

Trụ sở chính của  chi nhánh là địa điểm liên lạc của doanh nghiệp trên lãnh thổ Việt Nam, có địa chỉ được xác định gồm số nhà, ngách, hẻm, ngõ phố, phố, đường hoặc thôn, xóm, ấp, xã, phường, thị trấn, huyện, quận, thị xã, thành phố thuộc tỉnh, tỉnh, thành phố trực thuộc trung ương; số điện thoại, số fax và thư điện tử (nếu có).

Doanh nghiệp có quyền lập chi nhánh ở trong nước và nước ngoài. Doanh nghiệp có thể đặt một hoặc nhiều chi nhánh tại một địa phương theo địa giới hành chính.

– Ngành, nghề kinh doanh chi nhánh:

Ngành, nghề kinh doanh của chi nhánh phải đúng với ngành, nghề kinh doanh của doanh nghiệp.

– Điều kiện về Người đứng đầu chi nhánh:

Người đứng đầu chi nhánh là cá nhân, có đầy đủ năng lực hành vi dân sự; Có thể là người khác hoặc thành viên công ty.

– Hình thức hạch toán chi nhánh:

Lựa chọn hình thức hạch toán chi nhánh độc lập hoặc Phụ thuộc

Việc tham khảo, tìm luật sư tư vấn góp phần hạn chế rủi ro pháp lý, tranh chấp về sau, ngăn chặn các hành vi “vi phạm pháp luật” và nâng cao sự hiểu biết pháp luật về mọi lĩnh vực dân sự, doanh nghiệp, đất đai, thừa kế của người dân trong xã hội. Công ty Luật Hùng Sơn tự hào là đơn vị tư vấn, cung cấp dịch vụ luật sư uy tín hàng đầu với đội ngũ luật sư giỏi, giàu kinh nghiệm, sẵn sàng hỗ trợ quý khách hàng giải quyết mọi vướng mắc.
Ethereum dApp Tutorial with Web3.js and Solidity Smart Contracts
Tags: web3, solidity, dapp, ethereum
Published: 2022-03-18 03:36:50

I’m going to show you how to create your first blockchain application with Ethereum, Web3.js, and Solidity smart contracts. You don’t have to know anything about blockchain to follow along. I’ll teach you from scratch. Use this step-by-step guide with code examples and written instructions to start your blockchain developer journey today!

Check the following link to continue reading!
[Ethereum dApp Tutorial with Web3.js and Solidity smart contracts](https://coinsbench.com/ethereum-dapp-tutorial-with-web3-js-and-solidity-smart-contracts-d6cb00c0e765)
CSSBattle | #16 Eye of the Tiger
Tags: css, cssbattle, challenge, eyeofthetiger
Published: 2022-03-18 03:31:00

Welcome to CSSBattle Challenges!

In this short article, I go through my solution for [CSSBattle - #16 Eye of the Tiger](https://cssbattle.dev/play/16) challenge. Please refer to the code snippet below to get a better insight into my thought processes and the implementation detail.

---

> #### Challenge:

![Eye of the Tiger Challenge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e920qdeb44m0rc1l0sj2.png)

---

> #### Solution:

```html
<div class="container mostly-black-bg">
  <div class="outer-layer center-x-y">
    <div class="circle outer center-x-y mostly-black-bg">
      <div class="circle middle center-x-y">
        <div class="circle mini mostly-black-bg"></div>
      </div> 
    </div>
  </div>
</div>

<style>
  * {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
  }
  .container {
    width: 100%;
    height: 100%;
    position: relative;
  }
  .mostly-black-bg {
    background: #0B2429
  }
  .center-x-y {
    display: grid;
    place-items: center;
  }
  .circle {
    border-radius: 50%;
  }
  .outer-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 200px;
    height: 200px;
    background: #998235;
    border-top-right-radius: 100px;
    border-bottom-left-radius: 100px;
  }
  .outer {
    width: 180px;
    height: 180px;
  }
  .middle {
    width: 140px;
    height: 140px;
    background: #F3AC3C;
  }
  .mini {
    width: 50px;
    height: 50px;
  }
</style>
```

---

> #### Key Takeaway(s):
- use utility classes for shared, reusable CSS properties
- use display `grid` to center elements vertically and horizontally

As always, I welcome any feedback or questions regarding the implementation detail of the challenge. Otherwise, I hope this was useful!
Deleting multiple directories with Nodejs/Javascript
Tags: javascript, node, beginners, programming
Published: 2022-03-18 02:43:49

Hello! I had to delete all directories that were in a directory called "files", just thought I'd share the solution. 😃

```javascript
const { rmSync, promises: { readdir } } = require('fs');

(async () => {
  try {
    const fileNames = await readdir('./files');

    for (const fileName of fileNames) {
      console.log(`deleting file with name ${fileName}`);
      rmSync(`./files/${fileName}`, { recursive: true }); 
    }   
  } catch (error) {
    console.error('failed to delete directories', error);
  }
})();
```

Short and sweet. 😎 

What this basically does is read all the directories under the directory called "files" and puts them into an array of file names using the readdir function.

Then it loops through the names of the directories and deletes them using rmSync.

Also it's very important to handle errors with nodejs as an unexpected error may kill the application. 🥲

If you have a better, cleaner solution then please share. This is how I handled it. 🙂

---

Like me work? I post about a variety of topics, if you would like to see more please like and follow me.
Also I love coffee. 

[![“Buy Me A Coffee”](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ethand9999)
5 Awesome JavaScript HTTP Clients
Tags: http, client
Published: 2022-03-18 02:35:37

Name | Description | GitHub Activity
---- | ----------- | ---------------
[Axios](https://github.com/axios/axios) | Promise based HTTP client for the browser and node.js | ![GitHub stars](https://img.shields.io/github/stars/axios/axios) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/axios/axios)
[node-fetch](https://github.com/node-fetch/node-fetch) | A light-weight module that brings the Fetch API to Node.js | ![GitHub stars](https://img.shields.io/github/stars/node-fetch/node-fetch) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/node-fetch/node-fetch)
[Got](https://github.com/sindresorhus/got) | 🌐 Human-friendly and powerful HTTP request library for Node.js | ![GitHub stars](https://img.shields.io/github/stars/sindresorhus/got) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/sindresorhus/got)
[superagent](https://github.com/visionmedia/superagent) | Ajax for Node.js and browsers (JS HTTP client) | ![GitHub stars](https://img.shields.io/github/stars/visionmedia/superagent) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/visionmedia/superagent)
[Needle](https://github.com/tomas/needle) | Nimble, streamable HTTP client for Node.js. With proxy, iconv, cookie, deflate & multipart support. | ![GitHub stars](https://img.shields.io/github/stars/tomas/needle) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/tomas/needle)
**Source**: [5 Awesome JavaScript HTTP Clients](https://bestofgithub.com/blog/awesome-javascript-http-clients_58)
I was on The Function Call podcast tonight!
Tags: podcast, vue, ui, frontend
Published: 2022-03-18 02:04:26

---
title: I was on The Function Call podcast tonight!
published: true
description: I got to talk about frontend development, design technologist and design systems…
tags: podcast, Vue, ui, frontend 
//cover_image: https://direct_url_to_image.jpg
---

I was in full on technogeekery mode tonight getting to talk all about my UI component library AgnosticUI on The Function Call podcast!

https://youtu.be/UoHamm66UBA
SAT Score Calculator
Tags: satscorecalculator, actscorecalculator, actcalculator, satcalculator
Published: 2022-03-18 01:51:48

If Your Student And Confused Your SAT And ACT Score Online With Tool. So Here Is The Best Advanced [Sat Score Calculator](url=https://www.satscorecalculator.us/
With ACT Score Calculator Where You Can Easily Calculate Your SAT And ACT Score. Also You Can Convert SAT To ACT Conversion And ACT To SAT Conversion With Advanced Features.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkh2j5ubpmxi7cavkk8f.jpg)
100 días de código: 86, he vuelto
Tags: spanish, 100daysofcode, webdev
Published: 2022-03-18 01:28:28

¡Hey hey hey!

He vuelto despues de un pequeño descanso necesario, o mejor dicho uno obligatorio porque tuve que ocuparme de algunos detalles de la construcción del segundo piso mi hogar.

Ahora que ya tengo todo mas o menos controlado puedo comenzar a programar una vez mas garantizando mi concentración para lograr avanzar en mis metas pero no he venido a contarles mi vida... O eso creo.

En los últimos días he avanzado con mi proyecto [blog de darito](https://github.com/Darito97/blog) creando el diseño y avanzando con la construcción de cada uno de los componentes y la funcionalidad de usar archivos markdown para mostrar en el blog.

Realmente estoy haciendo una blog similar a el que se hace con la [guia para aprender Nextjs](https://nextjs.org/learn/foundations/about-nextjs?utm_source=next-site&utm_medium=homepage-cta&utm_campaign=next-website) pero al hacer componentes diferentes y utilizar los estilos en módulos que vienen soportados por Next practico algunas otras habilidades que haciendo el ejemplo no se practican.

Me siento entusiasmado por el avance que he tenido en el blog y creo que puedo finalizarlo la semana siguiente.

Hasta aquí la bitácora del capitán, ¡espero que tengan mucho éxito en sus proyectos y animo con todo!

Hasta la próxima.
FBI in track of Missouri Resident Richard Lynch for Duping Malone & co. Group
Published: 2022-03-18 01:11:04

A report came in by the Management of Malone & CO. Group to the Missouri FBI Department that a man Called "Richard David Lynch" is in possession of **$70,000** worth Financial Property of the Gold Company Malone & co. 

Report says Richard David Lynch living at "30 Brooks Ave Cape May Court House NJ 08210" claims to be the Husband of Gloria Malone, the acting CEO of Malone & co group after 2 month of internet  dating and sharing love and building trust.

With so much trust from Gloria Malone, Richard D. Lynch agreed to work with Gloria Malone with her financial transaction, however, report came in that Richard D. Lynch stopped responding after $70,000 Worth of Credit Card property gets to him and have refused to return  the financial properties that belong to the Malone & Co. Group. 

Special Agent Brian Zeller, Fox Mulder, John Price have received personal document information of Richard David Lync which includes his SSN, Drivers License and ID Card  submitted by Malone & CO. Group for him to be arrested and jailed if he fails to return the property to the Requested Address giving to him by the FBI  Agent before **19th March 2022.** 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/peuqy8nl1z0zmw31kx2k.jpg)
PROFILE OF LYNCH RICHARD D
30 BROOKS AVENUE CAPE MAY CT HS, NJ 08210
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qnhbk17hqwkrvew74rk9.jpg)
1D; L9665 ***** 10684
DOB 10 -13-1968

Special Agent Brian Zeller, Fox Mulder, John Price have received personal document information of Richard David Lync which includes his SSN, Drivers License and ID Card  submitted by Malone & CO. Group for him to be arrested and jailed if he fails to return the property to the Requested Address giving to him by the FBI  Agent before **19th March 2022.** 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3to34l505iroqtf9qf5y.jpg)

Special Agent Brian Zeller, Fox Mulder, John Price have received personal document information of Richard David Lync which includes his SSN, Drivers License and ID Card  submitted by Malone & CO. Group for him to be arrested and jailed if he fails to return the property to the Requested Address giving to him by the FBI  Agent before **19th March 2022.**
March 17th, 2022: What did you learn this week?
Tags: weeklyretro, discuss, weeklylearn
Published: 2022-03-18 00:54:22

Happy Saint Patrick’s Day if that’s your jam! 🍀

It's that time of the week again. So wonderful devs, what did you learn this week? It could be programming tips, career advice etc.

<center>

![Information flowing through your brain](https://media.giphy.com/media/qKltgF7Aw515K/giphy.gif)
</center>

Feel free to comment with what you learnt and/or reference your TIL post to give it some more exposure.

{%tag todayilearned %}

<!--
And remember, if something you learnt was a big win for you, then you know where to drop it as well.👇👇🏻👇🏼👇🏽👇🏾👇🏿

{% link https://dev.to/devteam/what-was-your-win-this-week-145j %}

<center>

![Price is Right contestant celebrating](https://media.giphy.com/media/gF29UEqBhSoDY8LHKg/giphy.gif)
</center>
-->
API Security Assessment
Published: 2022-03-18 00:15:47

I’m very excited to show you this tool I have been working on. This tool is built on top of Apisec.ai, an API security platform. 

This service is for folks with mobile/web applications with backend REST APIs. It performs free and instant penetration testing / security assessment for the REST APIs.

Just point towards your live OpenAPI specification file and receive a PDF penetration test report within a minute.

Please try and let me know what do you think?

Here is the direct link
https://www.apisec.ai/free-api-pen-test
What Can Be Done With 'kubectl run' Command?
Tags: kubernetes
Published: 2022-03-18 18:12:14

---
title: What Can Be Done With 'kubectl run' Command?
published: true
date: 2022-03-18 00:00:00 UTC
tags: kubernetes
canonical_url: https://hugomartins.io/essays/2022/03/what-can-be-done-with-kubectl-run/
---

[kubectl run](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#run) is a command that can _“create and run a particular image in a pod”_, which means that it will start a pod with a particular image. It can also create the pod with some particular details by using combinations of flags. We can see the code for it in [pkg/cmd/run/run.go](https://github.com/kubernetes/kubectl/blob/f48256c8eef5df2e3a9c621dd667839bdbe7c4cd/pkg/cmd/run/run.go).

## Interesting Flags

- `--image` specifies the image to be executed.
- `--command` allows to overwrite the command field in the container with whatever arguments are sent after `--`.
- `--env` to set environment variables in the pods, in the form of `key:value` and one variable per `--env` flag.
- `--expose` and `--port` to create a ClusterIP associated with the pod.
- `--labels` which allows us to configure labels for the specific pod. Labels are accepted with only one flag, separated by a comma.
- `--dry-run` for testing purposes.

## Examples

From documentation:

```
kubectl run nginx --image=nginx
kubectl run hazelcast --image=hazelcast/hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default"
kubectl run hazelcast --image=hazelcast/hazelcast --labels="app=hazelcast,env=prod"
kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>

```

## Use Case

While I don’t see much use in `kubectl run` for dealing with production grade systems, it can be a great resource for testing out different configurations of pods and creating a bunch of pods if there’s a need for it. It can also be a great introductory command for when first starting to deal with Kubernetes because it eases the interaction with Kubernetes without having to deal with YAML right away.

Due to its `--output` flag, it can also be a great way to use `kubectl` to create pods, in a stable way, from scripts because we can have stable and reproducible outputs from it. The fact that we can use a `--dry-run` flag is also a big plus.