teleren/devto huggingface dataset:
GraphQL Tools Transformations
Tags: graphql, gateway, javascript, typescript
Published: 2023-08-09 11:00:37

The [`wrapSchema`](https://the-guild.dev/graphql/tools/docs/api/modules/wrap_src#wrapschema) function from [@graphql-tools/wrap – GraphQL Tools](https://the-guild.dev/graphql/tools/docs/api/modules/wrap_src) allows you to wrap an existing schema, add some transformations and as a result get a new schema, implementing a different contract, which is really useful when implementing your own gateway. 

Unfortunately, it’s not all that well documented. Consider this to be a work in progress to compensate for that. 
 
First of all, `wrapSchema` is taking an array of `Transform` implementations. A `Transform` itself is not isolated to a specific bit of the underlying schema, or the requests and results passing through it. 

```typescript
export interface Transform<T = Record<string, any>> {  
  transformSchema?: SchemaTransform
  transformRequest?: RequestTransform<T>  
  transformResult?: ResultTransform<T>
}
```

There are some helper classes easing the construction of a Transform. In most cases, those helper classes allow you to easily isolate the scope of your transformation to particular subset of the schema, and prevent you from having to do all of at the legwork. 

In many of those cases, the constructors of those `Transform` implementations take *Transformers*. Naming is not really helping here, and it quickly becomes pretty confusing. But here are some basic rules of thumb to preserve your sanity:

1. **Transforms** are **classes** that implement the `Transform` contract.
2. The **Transforms** provided by graphql-tools **never** have the word “Transform” in them.
3. **Transforms** often take **Transformer** (note the **er** suffix) instances as constructor arguments.
4. **Transformers** are functions that perform a specific bit of the transformation. 
5. The **Transformers** defined by graphql-tools **all** have the word “Transformer” in them, and they are merely defined as function types.
6. **Transformers** are the functions you need to implement in order to use a graphql-tools provided **Transform**. 
7. **Transformer** functions *with* the word **Node** in their name affect the data passing through the **Transform**; they typically produce [some sort of `GraphQL…Config` object](https://graphql.org/graphql-js/type/), representing a part of the *schema*.
8. **Transformer** functions *without* the word **Node** in their name affect the schema; they typically produce some sort of  `Node`  object, representing part of the *data* floating through the system. (Data that is expected to be compliant with the aforementioned *schema.*.)
Building My Blockchain-Powered Portfolio: Where Creativity Meets Technology
Tags: blockchain
Published: 2023-08-09 11:00:12

n the ever-evolving realm of technology and creativity, my journey has taken an exhilarating leap with the creation of a blockchain-powered portfolio. By combining the ingenuity of blockchain technology and the capabilities of a Solidity smart contract, I have forged a groundbreaking path that redefines how art is appreciated and supported in the digital age. This blog is an exploration of how I have brought these technologies together to establish a truly immersive and empowering platform, now live at http://www.pramod-dev.com/.

The Symphony of Blockchain and Creativity:
The fusion of blockchain and creativity has yielded an exceptional platform that showcases my work in an interactive and innovative manner. The portfolio itself is a canvas, while the blockchain and Solidity smart contract are the brushes that enable seamless interactions and micro-donations, amplifying the reach of my artistry.

Solidity Smart Contract: The Architect of Innovation:
At the core of my blockchain-powered portfolio lies a Solidity smart contract. Solidity is a programming language specifically designed for creating smart contracts on blockchain platforms like Ethereum. Through this contract, I have created a dynamic system that allows users to engage with my work through 'likes,' triggering micro-donations to support my artistic endeavors.

Incorporating User Engagement:
The integration of a Solidity smart contract offers an unprecedented dimension to user engagement. Visitors to my portfolio can now express their appreciation for my work by 'liking' posts. Each 'like' is a trigger that interacts with the Solidity smart contract, initiating a micro-donation of 0.001 Ether. This ingenious mechanism encourages active participation, enabling users to directly contribute to the artists they admire.

Transparency and Trust Through Blockchain:
Blockchain technology, with its inherent transparency and security, plays a pivotal role in maintaining trust between me and my audience. Each interaction, from the 'likes' to the micro-donations, is recorded on the blockchain in an immutable ledger. This level of transparency ensures that supporters can witness their contributions making a real impact, fostering a sense of community and accountability.

Elevating User Experience:
While the technologies at play might sound complex, the user experience remains intuitive and accessible. The website provides a seamless interface that guides users through the process of connecting their wallets and engaging with the content. This ensures that even those unfamiliar with blockchain can participate effortlessly.

Stepping into the Future of Artistic Patronage:
My blockchain-backed portfolio isn't just a showcase of my work; it's a gateway to the future of supporting artists. The concept of micro-donations through 'likes' holds the potential to revolutionize how artists receive patronage. By marrying technology with artistry, this approach presents a novel solution to the challenges faced by artists in the digital realm.
Ideas about decentralized map
Published: 2023-08-09 10:53:52

I found many people are confused about my ideas on slide, so I decide to express my them.Here's some details about the decentralized maps platform which I want to build, and I think i cannot narrow those thoughts into a few sentences.

[Original Post](https://twitter.com/JhiNResH/status/1689214066668326912?s=20)

cc
[nights&weekends](https://twitter.com/_nightsweekends)
[buildspace](https://twitter.com/_buildspace)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a4feombb2cftmjp0bwxd.png)
Can anyone gives me some advice about the slide and the one liner?
-
1️⃣
I think ppl use google maps very often, and we sometimes gave reviews even ratings to the locations, shops or restaurants. And I have been observing it for months.
I realized that there are lots of ppl like me actually manage their google account and try to promote it.
2️⃣
Everytime we write reviews, upload photos or vids will get some points. Those points can gain " Local Guidance" levels. As for me, I'm now Lv.5 very close to lv.6. The higher level you reach the better prizes or discount you will have from Google.
3️⃣
Moreover, the more contents you provide to the google maps platform you will get tremendous views. Therefore, I'm thinking to transfer views to money. Similarly, trying to transfer those points to irl money.
Which means I might need to ICO. 🤔
4️⃣
In addition to turning those into money, I'm trying to make the platform more decentralized through blockchain tech. Such as the identity proofs, to keep the spams or bots away.

I'm not sure whether your place which you based has this kind of thing. Rate for 5 stars to get some discounts or treats. This may lead restaurants or places that have a higher ratings but literally sucks misleading users to go there and visit.
5️⃣
Hence, I think maybe I can use some proving systyem to check those reviews or ratings are genuine.

Other functions like web 3 auth, I'm also planning to add in my dapp.

Feel free to give me some advice or insights.
I really appreciate! 🙏
📢 CALL FOR SPEAKERS: AWS UG Meetup Lisbon - 24th August 2023
Published: 2023-08-09 10:52:46

Greetings AWS enthusiasts! 

We're excited to announce that our next AWS User Group (UG) Meetup in Lisbon (https://www.meetup.com/aws-user-group-lisbon/events/295338456) is scheduled for 24th August 2023. This is your chance to share, learn, and connect with the vibrant AWS community in Lisbon!

## Why Speak?
- 🌟 **Showcase** your expertise and knowledge in AWS.
- 🤝 **Network** with other AWS professionals and enthusiasts.
- 📈 **Boost** your personal brand and professional credentials.

## Topics of Interest:
We're open to a wide range of topics related to AWS, including but not limited to:
- Architectural Best Practices
- AWS Case Studies & Success Stories
- Serverless Applications & Patterns
- Machine Learning & AI on AWS
- AWS Security Measures & Best Practices
- Modern Application Development on AWS

Don't be limited by this list! If you have a unique perspective or topic you'd like to share, we'd love to hear it.

## Submission Guidelines:
1. Your proposed talk title.
2. A brief abstract or description of your talk (150-250 words).
3. Estimated duration (e.g., 20 mins, 30 mins, including Q&A).
4. A short bio about yourself, including any previous speaking experience (not mandatory, first-time speakers are welcome!).

## How to Submit?
Just reach out to me https://www.linkedin.com/in/martinmueller88/

If you have any questions, or if you'd like to discuss a topic idea before submitting, don’t hesitate to reach out. We're here to support and guide you through the process!

**Join us for an exciting day of learning and networking! Whether you're a seasoned AWS professional or just starting out, this is an excellent opportunity to contribute to the community.**
HR Management system using FLASK framework
Published: 2023-08-09 10:47:59

I am thrilled to share one of my significant projects developed for Trakit Solutions—an Attendance and HR Management System. This web-based application, built on Flask, has revolutionized the company's workforce operations by providing an integrated solution for attendance tracking and streamlining HR processes.

Simplifying Attendance Tracking: The primary focus of this project was to simplify and automate the attendance tracking process. Leveraging the versatility of Flask, I designed a user-friendly interface that allows employees to conveniently log their attendance using various methods such as biometric devices, QR codes, or manual entry. The system captures and securely stores attendance data, ensuring accurate and reliable records.

Efficient HR Management: In addition to attendance tracking, the HR Management System offers an array of features to streamline HR processes. I developed modules to manage employee profiles, including personal details, employment history, and performance evaluations. This centralizes employee data, simplifying HR tasks such as onboarding, leave management, and generating comprehensive reports.

Enhanced Data Analysis and Reporting: To enable data-driven decision-making, I integrated powerful analytics and reporting capabilities into the system. Using Flask's extensibility, I incorporated data visualization libraries such as Matplotlib and Plotly. This allows HR administrators to gain valuable insights from attendance trends, employee performance, and leave patterns, facilitating resource planning and performance evaluation.

Seamless Integration and User-Friendly Interface: The Attendance and HR Management System seamlessly integrates with Trakit Solutions' existing infrastructure, ensuring a smooth implementation process. The user interface features a clean design and intuitive workflow, making it easy for employees and HR personnel to navigate and interact with the system. Continuous feedback and iterative development ensure ongoing enhancements for an optimal user experience.

This project exemplifies my expertise in web application development, specifically in leveraging Flask to deliver practical solutions for real-world business challenges. By simplifying attendance tracking, optimizing HR processes, and facilitating data analysis and reporting, this system has significantly improved Trakit Solutions' workforce management.

Through this project, I have demonstrated my dedication to leveraging technology to enhance operational efficiency and productivity within organizations. The Attendance and HR Management System stands as a testament to my ability to deliver effective solutions tailored to the unique needs of businesses in streamlining their HR processes.

#HRManagementSystem #AttendanceTracking #FlaskDevelopment #WorkforceOptimization #DataAnalysis #EfficientHRProcesses
Selenium project with Python to scrap data
Tags: python, scraping, webdev, programming
Published: 2023-08-09 10:46:16

I am excited to share one of my initial projects, which holds a special place in my portfolio. This project involved scraping data from the ICEGATE website while overcoming challenging security measures, including captchas. Through perseverance and expertise in Python, I developed a bot that successfully bypassed captchas using Tesseract, extracted and parsed the data, and stored it in a MySQL database.

Overcoming the Captcha Barrier: In the early stages of this project, I encountered captchas implemented on the ICEGATE website, designed to prevent automated scraping. Overcoming this obstacle required innovative thinking and technical skills. To address this challenge, I leveraged Tesseract, an OCR engine. By training Tesseract on a diverse set of captcha images, I enabled my bot to accurately recognize and decode captchas, effectively bypassing this security measure.

Scraping and Parsing Data: Once the captcha barrier was overcome, I focused on scraping the desired data from the ICEGATE website. Python, with its rich ecosystem of libraries, proved to be an excellent choice for this task. I utilized powerful web scraping libraries such as BeautifulSoup and Selenium to navigate the website, extract the required data, and prepare it for further processing.

Parsing the obtained data was a crucial step in transforming the raw information into a structured format. With Python's string manipulation capabilities and the use of regular expressions, I developed a robust parsing algorithm. This algorithm efficiently extracted the relevant information from the data dump, ensuring its cleanliness and compatibility for subsequent analysis.

Storing Data in MySQL Database: To ensure proper management and accessibility of the scraped data, I integrated a MySQL database into the project. Leveraging the MySQL Connector library in Python, I established a seamless connection between my bot and the database. This allowed me to store the parsed data in well-structured tables and columns, facilitating efficient retrieval and future use.
如何安装Docker？
Published: 2023-08-04 03:20:25


Docker 的安装根据所使用的操作系统有很大的不同。但是普遍来说这是很简单的。Docker 可以在 Mac、 Windows 和 Linux 这三个主要平台上完美地运行。在这三者中，Mac 上的安装过程是最简单的。

## 在 Mac 上安装 Docker

1. brew 安装 docker

```bash
#搜索
==> Formulae
docker                          docker-credential-helper        docker-machine-completion       docker-machine-nfs              docker2aci
docker-clean                    docker-credential-helper-ecr    docker-machine-driver-hyperkit  docker-machine-parallels        dockerize
docker-completion               docker-gen                      docker-machine-driver-vmware    docker-slim                     lazydocker
docker-compose                  docker-ls                       docker-machine-driver-vultr     docker-squash
docker-compose-completion       docker-machine                  docker-machine-driver-xhyve     docker-swarm
==> Casks
docker

#安装
brew install docker
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/docker-19.03.14.big_sur.bottle.tar.gz
######################################################################## 100.0%
==> Pouring docker-19.03.14.big_sur.bottle.tar.gz
==> Caveats
zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/docker/19.03.14: 14 files, 71.6MB
```

2. 手动安装

下载[Stable](https://download.docker.com/mac/stable/Docker.dmg)，双击安装

![PVr5uh](https://cdn.jsdelivr.net/gh/manonicu/pics@master/uPic/PVr5uh.jpg)

安装完成后，通过命令检查 Docker 版本

```bash
docker --version

Docker version 19.03.14, build 5eb3275
```

3. 镜像加速

![NAWFnd](https://cdn.jsdelivr.net/gh/manonicu/pics@master/uPic/NAWFnd.png)

安装完成后，在 Terminal 执行`docker version` 命令，如果出现如下结果，说明安装成功。

```bash
docker --version
docker-compose --version
```

## 在 Windows 上安装 Docker

在 windows 上安装 docker，首先需求安装并启用 Hyper-V，类似于 VMWare 或 VirtualBox。

再去官网下载应用包，按照提示一步步安装即可。

![ZJtVbO](https://cdn.jsdelivr.net/gh/manonicu/pics@master/uPic/ZJtVbO.jpg)

## 在 Linux 上安装 Docker

在 Linux 上安装 Docker 是一个有点不同的过程，而且根据您所在的发行版本的不同，这个过程可能会更加不同。

但老实说，安装和其他两个平台一样容易(如果不是更容易的话)。

Windows 或 Mac 上的 Docker Desktop 软件包是一系列工具的集合，比如 Docker Engine、 Docker Compose、 Docker Dashboard、 Kubernetes 和其他一些好东西。然而，在 Linux 上，你不会得到这样一个包。相反，您需要手动安装所有必要的工具。不同发行版的安装程序如下:

1. 如果是 Ubuntu，按照[官方文档](https://docs.docker.com/engine/install/ubuntu/)操作。
2. 如果是其他发行版

- [Debian](https://docs.docker.com/engine/install/debian/)
- [Fedora](https://docs.docker.com/engine/install/fedora/)
- [Centos](https://docs.docker.com/engine/install/centos/)

3. 如果你使用的发行版没有在列表上，可以使用[二进制方式安装](https://docs.docker.com/engine/install/binaries/)

安装完成后，在 Terminal 执行`docker version` 命令，如果出现如下结果，说明安装成功。

```bash
docker --version
docker-compose --version
```

![QEmx65](https://cdn.jsdelivr.net/gh/manonicu/pics@master/uPic/QEmx65.jpg)
So, you want to refresh thumbnails in nautilus?
Tags: thumbnails, pictures, nautilus, linux
Published: 2023-08-09 10:46:09

From time to time some of your photos gets corrupted. In these cases nautilus is not able to compute a thumnail and shows some standard empty image.

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

Since you are a cautious person, you have a backup and you can restore the picture, but .... Nautilus will not show the new thumbnai. How to solve this?

The solution is to look for the place where nautilus stores these thumbnails, in my case, in a Fedora system:
    
     rm -r .cache/thumbnails/fail/

Then, you can restart nautilus and you will see the new (old) thumbnails.

I found the solution for this problem at: [Refresh thumbnails in nautilus](https://askubuntu.com/questions/1057/refresh-thumbnails-in-nautilus) with a solution for Ubuntu.
Darken background image with Tailwind
Published: 2023-08-09 10:40:37

Recently I received a Figma design to implement, and the JPG file I received to use as a background image looks a lot brighter than the image used in Figma project.

I first saw this when I looked into the styling section of the box and my eyes bled a bit.

`background: linear-gradient(0deg, rgba(0, 0, 0, 0.60) 0%, rgba(0, 0, 0, 0.60) 100%), url(<path-to-image>), lightgray 50% / cover no-repeat; `

After recovering from the initial shock, [I stumbled upon with the idea](https://dev.to/sohanemon/darken-image-with-tailwind-css-38a9) to use brightness feature like this;

```
<div class="bg-scroll bg-center bg-no-repeat brightness-50 flex flex-col h-screen justify-center items-center text-white">
...
</div>
```

But the problem with this approach is it also kills the brightness of every other element in it.

The better solution is that to use bg-blend-darken utility class;

```
<div class="bg-scroll bg-center bg-no-repeat bg-cover bg-blend-darken bg-black bg-opacity-60 flex flex-col h-screen justify-center items-center">
...
</div>
```

The three extra class `bg-blend-darken bg-black bg-opacity-50` is enough to darken the background image without compromising brightness of the children elements!
Construindo Seu Futuro Tech
Tags: talk, braziliandevs, career
Published: 2023-08-09 10:39:53

Neste espaço, abordarei o assunto que apresentei durante a palestra, o qual se mostrou integralmente relevante para a minha jornada no campo da tecnologia. Acredito que essas reflexões possam ser benéficas para você também. Vale ressaltar que nós somos os autores da nossa própria construção, e embora cada indivíduo possua sua abordagem singular, isso não impede que se esteja aberto a explorar outras sugestões.

Portanto, exploraremos a experiência enriquecedora de ter sido convidado(a) pelo Google Developer Groups para ministrar uma palestra no evento online da Campus Party.
Gostaria de compartilhar a razão pela qual optei por não abordar um tema estritamente técnico em uma oportunidade tão empolgante como esta. Acredito que muitos de vocês concordarão comigo.

Em vez disso, desejo explorar um tópico de extrema relevância. Muitas vezes, nos vemos inundados por uma quantidade avassaladora de informações, chegando ao ponto de nos sentirmos perdidos e desmotivados. Nessa jornada, é comum nos autossabotarmos. Quero dedicar nossa conversa a esse assunto crucial, pois acredito que todos nós já enfrentamos esse tipo de situação.

Para uma compreensão completa do conteúdo da palestra, é altamente recomendado assistir à apresentação. No entanto, estou sempre disponível para discussões, promovendo um ambiente de aprendizado mútuo. A temática que explorei baseou-se na minha própria trajetória, na qual identifiquei influências significativas em minha carreira. Minha jornada continua enriquecendo minha bagagem de conhecimento, e estou ansiosa para assimilar também as valiosas experiências de cada um de vocês. Compartilho meu interesse em ouvir sobre suas vivências e aprendizados. Como podemos colaborar e aprender juntos? 

**Aqui vocês podem acessar link da palestra:** [Construindo Seu Futuro Tech](https://www.youtube.com/watch?v=i1uUSkGNUVI)
Rename column name in laravel migration
Tags: laravel, migration, php, table
Published: 2023-08-09 10:39:52

If you want to change the columns name of an existing table, at first you need to write the following way. Suppose we have a table name _users_ . So we need to run the following command first. 

```
php artisan make:migration rename_description_to_content_on_users_table --table=users
```

then, a new migration file will be created. Let's say, there is a column name _description_. I want to change this name to '_bio_'. So now, I need to edit the migration file like this.

```
        Schema::table('users', function (Blueprint $table) {
            //
            $table->renameColumn('description', 'bio');
        });

```

Then run, _php artisan migrate_ command. And done!

Thanks. Happy coding!