teleren/devto huggingface dataset:
Content & Tooling Team Status Update
Tags: puppet, content, community
Published: 2023-01-10 20:47:40

---
title: Content & Tooling Team Status Update
published: true
date: 2023-01-06 00:00:00 UTC
tags: puppet, content, community
canonical_url: https://puppetlabs.github.io/content-and-tooling-team/blog/updates/2023-01-06-status-update/
---

## Happy New Year

I hope you had a chance to put your feet up, recharge and refresh over the holidays.

<img src="https://media0.giphy.com/media/DPiuat0EsqP3a/giphy.gif?cid=790b761176a5737dd79197913bcc871d7240eb97fc8c273a&rid=giphy.gif&ct=g" style="float: right;" />

[via GIPHY](https://giphy.com/gifs/cat-fireplace-relaxes-DPiuat0EsqP3a)

There is not much to report this week. However, I can say that we are excited to get going this year. There are lots of cool things lined up that we can’t wait to share with you.

See you next week!

## Community Contributions

We’d like to thank the following people in the Puppet Community for their contributions over this past week:

- [`puppetlabs-stdlib#1288`](https://github.com/puppetlabs/puppetlabs-stdlib/pull/1288): “Add `stdlib::crc32`”, thanks to [jcpunk](https://github.com/jcpunk)
Partial Success Graphql in Batch Operations
Tags: graphql, webdev, programming, api
Published: 2023-01-05 23:59:26

I really like Graphql. Since adopting it at [Produce8](www.produce8.com), we've really enjoyed how it decouples backend and front-end concerns and allows for high re-use. 

We recently hit a challenge and I wasn't able to find a lot of good samples online, so I thought I'd share what we did. 

## The Scenario 

We have a batch operation (say add a tag to a photo), and each request has it's own validation implemented on the service (ie. ensure that you have update permissions on that specific photo record). So a batch of 10 addTag mutations might succeed for 9 and fail on 1. This didn't feel like an 'error' scenario, and the front-end will require the ID of the failed record to show a contextual error message to the end user. So here's how we handled it. 

## The Solution

First we implement our mutation API 

``` 
type Mutation{
batchUpdatePhoto(input: BatchPhotoupdateInput!): [BatchPhotoupdateResponse!]!
}

input BatchPhotoupdateInput {
  pairs: [PhotoTagPairInput!]!
}

input PhotoTagPairInput {
  photoId: ID!
  tagId: ID!
}

```


This allows a user to send a set of photos to be tagged. Each will be processed individually by the resolver on the serverside and list of responses will be returned. 

### Partial Success 

Now for the tricky bit, we want to return the same number of responses as input pairs received and inform the user which failed to be parsed, so we need to do a union of a success message and the specific errors that could be returned. 

```
union BatchPhotoupdateResponse = NotAuthorizedToUpdatePhotoError | Photo 

type NotAuthorizedToUpdatePhotoError implements CoreServiceError {
  code: String!
  message: String!
  photoId: ID!

}

interface CoreServiceError {
  code: String!
  message: String!
}

```

By doing a union between the success and error response, we're able to return a single array of results to the client which can be both a success and error case. 

Happy Coding!
What is Poetry? And why you should use it?
Tags: python, webdev, beginners, programming
Published: 2023-01-05 23:56:56

If you're a Python developer, you've probably heard of this tool for managing your Python projects. But, in case you still don't know it, I'll explain a little more about what it is and why it's worth adopting.

## What is Poetry?

Poetry is a package and dependency manager for Python projects. It was created to make the project management process easier and more enjoyable, allowing you to easily create and publish your packages.

## Why use Poetry?

Now that you know what Poetry is, I'm going to talk about some of the reasons why it might be useful for you.

- Ease of use: It is very easy to use and has an intuitive interface. This means that even if you are new to the Python language, you will be able to use Poetry without too much difficulty.

- Dependency Management: This allows you to easily manage your project's dependencies, ensuring that you always have the correct versions of the libraries you need. This can save you a lot of time and frustration over the course of your project development.

- Better Project Organization: This helps you organize your project in a clearer and more structured way. This can be especially useful if you are working on a large or complex project.

- Easy Publishing: Makes it very easy to publish your Python packages to PyPI (Python Package Index). This means you can easily share your project with other developers and let them use it in their projects.

In short, Poetry is an amazing tool for any Python developer who wants to make project management easier and more enjoyable. If you're not already using it in your projects, I recommend checking it out and seeing how it can simplify your life.
How Google Cloud is Educating the Next Generation of Cloud Engineers
Tags: cloud, googlecloud, podcast, programming
Published: 2023-01-05 23:03:15

Happy New Year and welcome to Season 3 of Dev Interrupted! 

We couldn't think of a better way to kick off Season 3 of the podcast than with the immensely talented Forrest Brazeal. 

Not only is Forrest the Head of Developer Media at Google Cloud, but he lists being a writer, speaker, cartoonist, cloud architect and AWS Serverless Hero, among his many accolades. 

To top it all off, Forrest is an all around great guy with a passion for education and advocacy. That's why he's working to help educate, train and develop the next generation of cloud engineers. But he needs your help. 

Listen as Forrest explains why so many great engineers get overlooked by companies - and how to stop it.

{% spotify spotify:episode:6Lvd8H9kWvDkaNCoXgAO7D %} 

## Episode Highlights:
* (1:32) Forrest's "Cloud Bard" title
* (5:07) Google Cloud's future
* (13:45) Building the next generation of cloud engineers
* (19:40) The real reason companies can't find engineers
* (25:03) Steps to "grow" engineers at your org

***While you’re here, check out this video from our [YouTube channel](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1), and be sure to like and [subscribe](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1) when you do!*** 

{% youtube lG5wvp9S8eY %}

### Want to cut code-review time by up to 40%? Add estimated review time to pull requests automatically!
*gitStream is the free dev tool from LinearB that eliminates the No. 1 bottleneck in your team’s workflow: pull requests and code reviews. After reviewing the work of 2,000 dev teams, LinearB’s engineers and data scientists found that pickup times and code review were lasting 4 to 5 days longer than they should be.* 

*The good news is that they found these delays could be eliminated largely by adding estimated review time to pull requests!*

### Learn more about how gitStream is making coding better [HERE](https://linearb.io/blog/why-estimated-review-time-improves-pull-requests-and-reduces-cycle-time/?utm_source=Substack%2FMedium%2FDev.to&utm_medium=referral&utm_campaign=gitStream%20-%20Referral%20-%20Distribution%20Footers).

![Start using gitstream today!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xg1l6hxt134px501bf7d.png)
Google Logo
Tags: css, googlecloud, javascript, html
Published: 2023-01-05 22:42:02

here is my version of google logo with only css

![The only div html](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fo9rtxunzci9btjjp7jh.png)
--------------------------------------------------------------
and here is the css code 


![start with the body](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rykh9g02kp0gxdgbklet.png)

--------------------------------------------------------------

and here our google-logo class

![Ithe circle with differents colors](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rqirq9ep5nvpalwj7q5f.png)

--------------------------------------------------------------

here we gonna create the retangle to do the G using the :before 
![Retangle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rlw4k0ysnl8n7jxuqswb.png)

--------------------------------------------------------------

and finally the triangle to be able to do the same shape as a google logo, with :after


![triangle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zo82ua1rk7q55wxl1i3k.png)

--------------------------------------------------------------
----------------------THE FINAL RESULTS-----------------------

![google-logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xp32k1yq7zm9t810ybjl.png)

--------------------------------------------------------------
AFFiNE: probably the Next-Gen Knowledge Base - better than Notion and Miro and the whole rest
Tags: knowledge, whiteboard, python, apache
Published: 2023-01-05 22:28:37

AFFiNE:  probably the  Next-Gen Knowledge Base - better than Notion and Miro and the whole rest... 

AFFiNE is a combination of various concepts - with a focus on privacy and a great UX experience both - for developer and user.

check out the text and all the announcements on Reddit, Medium and of course on github.

https://affine.pro
https://github.com/toeverything/AFFiNE
https://www.reddit.com/r/Affine/
Day 667 : X
Tags: hiphop, code, coding, lifelongdev
Published: 2023-01-05 22:25:33

_liner notes_:
- Professional : Had back to back to back meetings today. It was good to catch up with everyone. Did some research. Finalized some code. Pushed it to the repo. Updated some dependencies. Not a bad day.

- Personal : Last night, I worked on my side project. Making some good progress. Just a couple of more things to X off and I'll be able to show my friend. I'm learning a bunch of stuff which is why I like to make side projects.

![A wooden fence and walkway through some shrubs leading to a white sand beach and ocean with a toy duck on the side in Scharbeutz, Germany](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezcs3xqpyl4ryqlrriz5.jpg)

Going to work on my side project and go through tracks for the radio show. If I have any time left over, I want to finish up "Thor: Love and Thunder". Realized that I never finished the movie.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube EuD3AWq3GiM %}
Ethernaut Nivel 0: Hola Ethernaut
Tags: webdev, web3
Published: 2023-01-05 21:51:04

# Nivel 0: Hola Ethernaut

Este es el nivel 0 del juego[Ethernaut](https://ethernaut.openzeppelin.com/).

## requisitos previos
- Basics of [web3js](https://web3js.readthedocs.io/en/v1.5.2/getting-started.html)

## Atajos
has leído las instrucciones del nivel 0 y ha adquirido el éter de prueba. Los métodos de contrato de nivel se inyectan directamente en la consola de nuestro navegador, por lo que podemos comenzar a llamar a los métodos.

antes de iniciar: 

1. Configurar MetaMask
2. Abra la consola del navegador Abra la consola de su navegador: Tools > Developer Tools.
    comando (await chrome 64)
      **player**
3. Usa los ayudantes de la consola **getBalance(player)**
4. El ethernaut contract **ethernaut**
5. Interactuar con ABI **ethernaut.owner()**
6. Obtener una instancia de nivel **level instance**
7. Inspección del contrato **contract**
8. Interactuar con el contrato para completar el nivel **contract.info()**

Empecemos. Las instrucciones piden llamar a este método en la consola:

```javascript
await contract.info()

// Output: 'You will find what you need in info1().'
```

Seguimos la salida y llamamos:

```javascript
await contract.info1()

// Output: 'Try info2(), but with "hello" as a parameter.'
```

Siguiente...
```javascript
await contract.info2("hello")

// Output: 'The property infoNum holds the number of the next info method to call.'
```

Para obtener `infoNum` llamamos captador público:
```javascript
await contract.infoNum().then(v => v.toString())

// Output: 42
```
Tenga en cuenta que `infoNum()` devuelve un objeto BigNumber, por lo que lo convertimos en una cadena para ver el número real.

Procediendo con `info42`:

```javascript
await contract.info42()

// Output: 'theMethodName is the name of the next method.'
```

De nuevo, siguiente salida:

```javascript
await contract.theMethodName()

// Output: 'The method name is method7123949.'
```

Y entonces:

```javascript
await contract.method7123949()

// Output: 'If you know the password, submit it to authenticate().'
```

Ok... pero cual es la contraseña? Inspeccionemos los contratos ABI:

```javascript
contract

// Output: { abi: ..., address: ..., ...., password: f () }
```
Al inspeccionar vemos que hay un `password` método para el contrato. Llamémoslo:

```javascript
await contract.password()

// Output: 'ethernaut0`
```

Tenemos la contraseña. Finalmente:

```javascript
await contract.authenticate('ethernaut0')
```
y confirme la transacción en metamask. Enviar instancia.
The first obstacle is me
Tags: beginners
Published: 2023-01-05 21:45:38

About a year ago I was struggling with the dry, lifeless and poorly formatted material provided in my online college course. 

I started seeking out youtube videos and found a channel that I loved ([](https://www.youtube.com/@programmingwithmosh)). I liked it so much that I purchased his 12 hour Java mastery course. 

It is a year later and I still haven't completed it. Why? Because once I finish the videos I will be responsible (in my mind at least) for having "mastered" Java. 

Also, my next obstacle will be to DO SOMETHING. Right now I have this cushy next step of following a tutorial. When I'm done with the course, I feel like I'll have to sever my own umbilical cord. It is easy to make progress now that I know what I was afraid of. 

To anyone who stumbles upon my writing, the best advice I can give is to reflect often. Know yourself and you can shortcut through your own similarly dumb none-sense.
Back to App Dev
Published: 2023-01-05 21:26:01

Coming back rusty, things to remember:

- `bin/server` after generating new resources
- if pending migration, the error page has a button that does it


New stuff:

- with a hash plus an array, select routes to have with scaffold: 
`resources :books, { :only => [:get,:post]} `
`resources :books, { :except => [:delete]} `
- We can drop the hash and parenthesis when a method does not have order of operations and if the method is just being called without a receiver, so no object dot before it. Like render
Đăng ký hdbet88 – Nhận Quà Liền Tay 150K
Tags: webdev, javascript, beginners, programming
Published: 2023-01-05 21:08:23

Nhà cái hdbet88 còn được mệnh danh là ứng dụng trò chơi chơi giải trí uy tín số 1 châu á. Ngay lúc bắt đầu ra mắt và lần đầu tiên xuất hiện trên thị trường, nhà cái dkbet đã nhanh chóng tạo nên thương hiệu thân quen và nhận được sự quan tâm đông đúc từ xã hội và người dùng cá độ tại khu vực châu á.
Địa chỉ: 2R9H+HXM, Nam Đồng, Đống Đa, Hà Nội
Phone: 0777666899
Tag: hdbet88, hdbet88xyz, abu999, dkbet8
Email: info@hdbet88.xyz
[Website:](https://hdbet88.xyz/)
[Facebook: ](https://www.facebook.com/100088943242332)
[Twitter:](https://twitter.com/hdbet88)
[Youtube: ](https://www.youtube.com/@whdbet88/about)
[Flickr: ](https://www.flickr.com/people/197356462@N06/)
[Pinterest: ](https://www.pinterest.com/hdbet88/)
[Blogger: ](https://hdbet88.blogspot.com/2023/01/blog-post.html)
[Vimeo: 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ratnanzts8n4rhcu25iy.jpeg)](https://vimeo.com/user191949487)
Create a minimal API with json-server
Tags: api, node, json, tutorial
Published: 2023-01-05 20:57:42

** It will take you longer to read this post than to create your api _Seriously..._ **

In the great world of apis there are many ways to program your own api, express, laravel, etc, but...

How would you like to be able to create an api in less than a minute with all the http requests (post, put, delete, get) quickly and without so many code problems? (Yes, you could already have your api when you finish reading this post).

Well json-server is for you!

This can help us if we want to test a front-end in a simple way before connecting it completely with the back-end team or if you want to continue learning from the great and exciting path of the APIs (my case).

You only need a json file, a universal format that you've probably come across a lot of times up to this point :)

An example of a format could be with pizzas. Who in our area doesn't love them?

```
{"Pizza": [
     {
       "id": 1,
       "name": "Al Tono pizza",
       "description": "lots of tuna"
     },
     {
       "id": 2,
       "name": "italian",
       "description": "mama mia!",
     }
]}
```

In the directory where you start working, (it doesn't matter if it's empty at this point), we execute the following command to install the package.
```
npm install json-server
```

Now we create the json file (you can use the name of db.json to make it a bit more consistent with the example) and add our favorite products (I'll continue with the pizza)

The following is that through npx you must execute the following command
```
npx json-server --watch --port 5001 db.json
```
(If you get an error, I suggest you run the following command)
```
npm install -g npx
```

Where the port can be the one of your preference and db.json will vary by the name of your file.

Ready, you already have a functional api, and the best of all is that if you make post statements, it will remain saved in your file :)


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

If you want to have an example of how to create the requests, I leave you this [documentation in postman!](https://documenter.getpostman.com/view/22626094/2s8Z73xqLp)

Happy code!
Alternative libs to migrate from React to Vue (or Vue to React)
Tags: vue, react, lib, compare
Published: 2023-01-05 20:52:52

Here is a list of libs to choose when you decide to go from React to Vue (or vice versa)

## State management
React:
* [redux-toolkit](https://github.com/reduxjs/redux-toolkit)
* [zustand](https://github.com/pmndrs/zustand)

Vue:
* [pinia](https://github.com/vuejs/pinia)

## Use SVG as component
React: 
* [SVGR](https://github.com/gregberge/svgr)

Vue: 
* [vite-svg-loader](https://github.com/jpkleemans/vite-svg-loader) 
* [vue-inline-svg](https://github.com/shrpne/vue-inline-svg) + [vite-plugin-require](https://github.com/wangzongming/vite-plugin-require) 


## Form control
React: 
* [react-hook-form](https://github.com/react-hook-form/react-hook-form)

Vue: 
* [vee-validate](https://github.com/logaretm/vee-validate)

## I18n
React:
* [react-i18next](https://github.com/i18next/react-i18next)

Vue:
* [vue-i18n](https://github.com/kazupon/vue-i18n)

## Common hooks lib
React: 
* [react-use](https://github.com/streamich/react-use)
* [ahooks](https://github.com/alibaba/hooks)

Vue:
* [vueuse](https://github.com/vueuse/vueuse)
New library to develop streamlit apps in jupyter
Published: 2023-01-05 20:43:22

Hey there, I created a library [streamlit-jupyter](https://github.com/ddobrinskiy/streamlit-jupyter) to allow for seamless creation of streamlit apps in jupyter notebooks.

A nifty little alternative to [voila](https://github.com/voila-dashboards/voila), one might say.

The way this works is it detects your environment, and if the script is run from a jupyter notebook, then it wraps existing streamlit methods to replace them with ipywidgets alternatives - that way you can code as you would in streamlit, and then displays your page as-you-code.

Then you export your notebook to a `.py` file, and run it via streamlit as usual (no change in behaviour there)

## Install

``` sh
pip install streamlit_jupyter
```

## How to use it

Take a look at our [example notebook](https://github.com/ddobrinskiy/streamlit-jupyter/blob/master/examples/99_example.ipynb)

The main idea is for you experiment and develop in your notebook,
visually see all the pieces, and then convert the notebook to `.py` to
be run by streamlit

start by importing streamlit and patching it with streamlit-jupyter:

``` python

import streamlit as st

from streamlit_jupyter import StreamlitPatcher, tqdm

StreamlitPatcher().jupyter()  # register streamlit with jupyter-compatible wrappers
```

And now develop your notebook as usual, but with the ability to use
Streamlit widgets and components.

See how it works below, and check out the [example](https://github.com/ddobrinskiy/streamlit-jupyter/blob/master/examples/99_example.ipynb) (it also incudes a nifty alternative to nbconvert that strips out all the magics and other irrelevant stuff)

## Demonstration


|  | Jupyter | Streamlit  |
|:----------------------:|:------------------------------:|:---------------------------------:|
| Markdown and headings  |![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img1_jupyter.png) | ![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img1_streamlit.png) |
| Interactive data entry |![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img2_jupyter.png) | ![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img2_streamlit.png) |
| Pick and choose        |![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img5_jupyter.gif) | ![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img5_streamlit.gif) |
| Dataframes, caching and progress bars |![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img3_jupyter.gif) | ![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img3_streamlit.gif) |
| Plots                  |![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img4_jupyter.png) | ![alt](https://github.com/ddobrinskiy/streamlit-jupyter/raw/master/images/img4_streamlit.png) |



## ps

This is a very early beta and my first try at open source, so please share your thoughts and reach out with any questions/critiques!
Salutations
Tags: beginners, codenewbie, devjournal, webdev
Published: 2023-01-05 20:42:22

**Hello world** 
Today I was inspired by a post from @nasirovelchin to start this blog. For a while I've been hesitant to put myself out there due to impostor syndrome. After all, there are plenty of more experienced programmers out there. Even so, I believe everyone here has something to contribute, regardless of their skill level.

**About me:**
I come from little experience with web development, other than making pure HTML Dragonball Z and Slipknot websites as a teen. Then during the pandemic I started researching IT road maps, university curriculum, coding boot camps. From there I settled on a self-study path. I've been learning software engineering through The Odin Project and CS50x, but this is my first real attempt at interacting with the developer community. I'm happy with my progress so far and there is no feeling quite like squashing bugs in my code when the going gets tough.

<img src="https://media.giphy.com/media/BVStb13YiR5Qs/giphy.gif">

**My goals here are to:**
- learn from the developers who contribute on DEV
- document my progress
- share helpful information
- make connections
- contribute to projects

**I'm currently banging my head against the keyboard working on:**
- TOP's calculator project


I leave you with a quote from one of the great Stoics. See you around, world!



> _"The things you think about determine the quality of your mind."_ - Marcus Aurelius
876. Middle of the Linked List using Java
Published: 2023-01-05 20:25:48

One of the solution for Middle of the Linked List using Java is

```
class Solution{
  public ListNode middleNode(ListNode head){
    ListNode middle = head, end = head;
    while(end!=null&&end.next!=null){
      middle=middle.next;
      end=end.next.next;
    }
  }
  return middle;
}
```