teleren/devto huggingface dataset:
AWS and Web3
Tags: aws, web3, community, cloud
Published: 2022-08-23 04:36:45

 **@womenbuildweb3** is currently running #30DaysOfWeb3.

Here is the challenge website - https://www.30daysofweb3.xyz/

I joined the cohort, the discord and started on Day 1.

By Day 3, my laptop of 7 years decided that it had enough.

AWS to the rescue!!!!

I am 3 X AWS certified and have been using AWS since 2017.

I have been learning web3 since April this year. I am not a developer but I wanted to get my hands dirty with this popular technology.

I went to AWS marketplace and bought a Ubuntu Desktop (GUI) subscription. I chose the recommended EC2 instance type and within 5 minutes I was up and running.

As I would be stopping this instance to keep costs down, I reserved a public IP and used RDP to quickly connect.

For the last two weeks, I have been working through the challenges.

The only issue I encountered was that the attached storage was too low and I had to increase from 10GB to 15GB.

I had to install the latest git, npm ,web3 libraries, Radicle, Cargo on the VM.

The Ubuntu image and VM worked flawlessly throughout the challenge and I was able to finish ahead of schedule. Modifying the volume and VM restarts took seconds.

Anytime that you need a powerful VM for short term projects, MVPs and PoCs, consider the AWS free tier and the AWS Marketplace for pre-built images. 

Don't forget your billing alerts and to stop your EC2 when not in use.

For long term solutions, consider using AWS Workspaces - it is better than shipping laptops to remote workers around the world. With AWS Workspaces you can set up Windows, Linux and Mac devices accessible from anywhere.

AWS for the win!!!!

https://aws.amazon.com/developer/community/community-builders/

https://aws.amazon.com/marketplace/search/results?searchTerms=ubuntu

https://aws.amazon.com/marketplace

https://aws.amazon.com/workspaces/


My new laptop is on its way.
Trouble fetching checkbox and radio fields with pypdf2
Tags: python, pdf, pypdf2, programming
Published: 2022-08-23 04:26:03

My project involves reading text from a bunch of PDF form files for which I'm using [PyPDF2](https://github.com/py-pdf/PyPDF2/) open source library. There is no issue in getting the text data as follows:

    reader = PdfReader("data/test.pdf")
    cnt = len(reader.pages)
    print("reading pdf (%d pages)" % cnt)
    page = reader.pages[cnt-1]
    lines = page.extract_text().splitlines()
    print("%d lines extracted..." % len(lines))

However, this text doesn't contain the checked statuses of the radio and checkboxes. I just get normal text (like "Yes No" for example) instead of these values.

I also tried the `reader.get_fields()` and `reader.get_form_text_fields()` methods as described in [their documentation](https://pypdf2.readthedocs.io/en/latest/user/forms.html) but they return empty values. I also tried reading it [through annotations](https://pypdf2.readthedocs.io/en/latest/user/reading-pdf-annotations.html) but no `"/Annots"` found on the page. When I open the PDF in a `notepad++` to see its meta data, this is what I get:

	%PDF-1.4
	%²³´µ
	%Generated by ExpertPdf v9.2.2

It appears to me that these checkboxes aren't usual form fields used in PDF but appear similar to HTML elements. Is there any way to extract these fields using python?
Blogpost What I learned during August 15-19 Week
Tags: beginners, career, javascript, java
Published: 2022-08-23 03:58:46

During this week I’ve been focused on learning Java Fundamentals, many Full-stack job opportunities are based on React for working with the Frontend and Java for the Backend. It’s important to have the knowledge of both languages to build a better profile. 

I’ve been working on the Java fundamentals training and been practicing some topics one of the most important ones is to understand the project structure, how classes works, packages and methods. Java is an OOP language this allows us to recycle a lot of code when we are working with similar things ore features. On the other side we have Javascript as an event oriented language it allows us to have a better knowledge of the user requirements. When we are using JavaScript we can include React Js as a UI Library and this will help us to build faster UIs. 

On this week I’ll continue working on the React Js Training to understand more how Redux works and what are the differences with the useContext hook, also I’ll be practicing builiding APIS with Java and get to know Spring.
How to Design a Proper Marketing Email Template with Tencent Cloud’s Simple Email Service
Tags: webdev, tutorial, beginners, programming
Published: 2022-08-23 03:58:05

The content is of great importance to a marketing email, as it directly affects the deliverability, click rate, and conversion rate. The following are some of our tips for writing a marketing email:

**1. Create an eye-catching subject line**

Of the over six billion email accounts in the world, 80% of them only read the subject line, and the rest 20% read the body. That's why the subject line matters.

1. A subject line should be created in friendly language. Do not make the recipients feel that they are forced or persuaded to buy something, in which case they may report the email as spam.


2. Include the primary keyword in the first three words and the secondary keyword in the last three words in the subject line. This works well for customer acquisition with a long, seemingly endless list.

3. A proper subject should be neither too long nor too short. You'd better limit it to ten words and put the most important words at the beginning.

4. Create a witty subject that includes hot news or internet buzzwords in a tailored and pleasing manner.

**2. Create valuable email content**

The quality of an email determines whether the recipients are willing to know about or even buy the product.

1. Pay attention to readability, as email marketing is also content marketing, so users' reading habits should be taken into full consideration.

2. You should test and adjust the email template format. Simple Email Service | Tencent Cloud allows you to preview and adjust the format when creating a template.

3. You can create images or text with hyperlinks, which are light-loaded and easy to open, making user interaction easier.

4. Use HTML emails instead of embedding text inside an image, as it often happens that an image cannot be displayed due to ISP filtering, poor network condition or other issues.

5. Images should be proportionate to text.

6. You can tailor emails for different types of customers to quickly understand their preferences and win them over.

7. Promote your products and services at a festival or under a special theme to guide purchase decisions. Simple Email Service | Tencent Cloud enables you to reach customers from over 200 countries and regions.

8. Craft a marketing email with branding elements. After all, an email is used to build your brand and achieve a high conversion rate.

Find out more at: https://www.tencentcloud.com/dynamic/insights/sample-article/100329
Golf Game
Tags: python, golf
Published: 2022-08-23 03:33:00

[Golf Game Code](https://github.com/calebkumo/Golf-Game/blob/f2617f80342b14c878689f9b22d74b796028e6ea/Golf%20Game.py)
##Progress 
#####Today marks the day where I post my first project. I am still working on this but it is at a nice starting place. When you play it, the idea is to simulate some of the decisions you make playing golf. My goal is to make there be different holes and refactor some of the code. Hope you enjoy if you actually try it out!
Highest Value Palindrome
Tags: javascript, hackerrank
Published: 2022-08-23 03:11:00

Please help me with some more optimal solution..
- one of the simplest approach mentioned below
```
function maximumPalinUsingKChanges(str, k) {
  let palin = str.split("");
  let ans = "";

  let l = 0;
  let r = str.length - 1;
  let changedArray = [];

  while (l < r) {
    if (str[l] != str[r]) {
      palin[l] = palin[r] = Math.max(str[l], str[r]);
      changedArray[l] = true;
      k--;
    }
    l++;
    r--;
  }

  if (k < 0) {
    return "Not possible";
  }

  l = 0;
  r = str.length - 1;

  while (l <= r) {
    if (palin[l] !== 9) {
      if (changedArray[l] && k > 0) {
        palin[l] = palin[r] = "9";
        k--;
      } else if (!changedArray[l] && k >= 2) {
        palin[l] = palin[r] = "9";
        k = k - 2;
      }
    }
    if ((l === r) & (k > 0)) {
      palin[l] = "9";
    }
    l++;
    r--;
  }
  for (let i = 0; i < palin.length; i++) ans += palin[i];
  return ans;
}

let str = "3493";

console.log(str.length);
let k = 1;
console.log(maximumPalinUsingKChanges(str, k));

```

approach reference [Highest Value Palindrome](https://medium.com/@lonell.liburd/highest-value-palindrome-1275edcd1430)

Thanks you!
What's a Web Server
Published: 2022-08-23 03:11:00

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i4eo4lqmqn4dreg2zrde.png)
 
A Web Server is like a cash machine, where you store and retire money. But when we are talking about web servers, we are working with data, data that usually comes as files that are interpreted by a web browser that is an application software for accessing the World Wide Web or a local website. The web browser is where a client(you) can interact with data. for example: Is just simple as the analogy of the cash machine. You enter your card and password and retire your money, and everyone is happy.

When we are talking about a web server is similar to when you click a button on a webpage, you are making a request to a web server for data that are interpreted for a web browser, and that files are rendered as a website with webpages with structure, color, styles, and interactivity.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6p4y3bjx6l1bv2gmwbn.png)
Longest Palindrome
Tags: javascript, leetcode
Published: 2022-08-23 03:08:00

```
var longestPalindrome = function(s) {

  let trackkerObject = new Map();
  let n = 0;
  for (let i = 0; i < s.length; i++) {
    if (trackkerObject.has(s[i])) {
      n += 2;
      trackkerObject.delete(s[i]);
    } else {
      trackkerObject.set(s[i], i);
    }
  }

  return trackkerObject.size > 0 ? n+1 : n;
};

console.log(longestPalindrome("abccccdd"));
```
Using AJAX for first time.
Tags: ajax, internship, task, learning
Published: 2022-08-23 03:05:03

I had a task assigned to me in a internship. The task was to update the data of the details of applicant when changing the value of the "roll number" of the applicant.

I had never used AJAX before. So, it was new thing for me. At, first I thought it was easy. But, when I started to do it, i couldn't just make it right. I search on google, "how to use a ajax". Many results occured but, I was still not making any progress. 

After sometime, I came to realize that I was rushing things. I was focused on result than the process, so I was not making any progress.

So, after realizing that, I focused on the process. I started to learn what actually is ajax, how to use it, what it is used for.

Ajax is use to update the web pages asynchronously by exchanging data with a web server behind the scenes. And it is used as 


```
 $.ajax({
         url: "any url path/",
         type: "POST",
         data:{
               "key":"value",
               "roll": $('#roll').val(),
               "csrfmiddlewaretoken" : "{{csrf_token}}"  // since i am using a jinja template
              }, 
         success: function(response){
               // perform actions here;
              },
          error: function(){
               // perform actions here;
            }
        }
);
```

The CSRF Token is required while making a POST request. 
After learning these things, I tried and tried. There were lot of errors, warnings but i solved them one by one. And finally, the code worked and the result was visible. It felt good to see finally code worked after so many hours of working on it.
Check if Palindrome - String
Tags: javascript, leetcode, hackerrank
Published: 2022-08-23 03:04:00

```
var isPalindrome = function (x, moves) {
  x = x.toString();
  let initial = 0;
  let last = x.length - 1;
  let isPalindrome = true;
  for (let i = 0; i < x.length; i++) {
    if (x[initial] == x[last] && initial < last) {
      initial++;
      last--;
    } else if (initial > last) {
    } else if (moves === 1 && Math.abs(x.length % 2) == 1) {
      isPalindrome = false;
      break;
    }
  }
  return isPalindrome;
};

console.log(isPalindrome("abba"))
```
Fix "NO_PUBKEY "
Tags: linux
Published: 2022-08-23 02:57:00

$ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Get:3 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]        
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:3 http://dl.google.com/linux/chrome/deb stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
Reading package lists... Done
W: GPG error: http://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4EB27DB2A3B88B8B
E: The repository 'http://dl.google.com/linux/chrome/deb stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Fix:
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
Executing: /tmp/apt-key-gpghome.DDksEO7ZDS/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
gpg: key 7721F63BD38B4796: "Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>" 1 new signature
gpg: key 7721F63BD38B4796: "Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>" 1 new subkey
gpg: Total number processed: 1
gpg:            new subkeys: 1
gpg:         new signatures: 1
Airpods Not Charging on Windows ⚡
Tags: windows, airpods, tutorial, debug
Published: 2022-08-23 02:50:07

Airpods are pretty cool, especially when you never have to worry about the tangled mess of wired headphones. What’s not cool is when you own a Windows machine and plugging the USB wire to charge your Airpod doesn’t work. The steps below should apply to all Airpods, but I have personally tested it using a first-generation Airpods Pro. I only realized this was a problem when after leaving the Airpods to charge via my laptop USB port for days, it never seemed to charge.

This guide is for anyone who has tried to charge their Airpods to no avail despite many resets.

## What was not the issue

If you look online, most of the guides will suggest you reset your Airpods in case there was some other internal failure, such as the firmware for both Airpods being out of sync. Before you proceed with the rest of this guide, I recommend following those steps [here](https://support.apple.com/en-us/HT209463) first.

## The fix

The root cause of this issue is a driver problem. To fix it, all you have to do is:

1. Connect your Airpods case with your Windows machine using the charging cable you have.
2. Open Control Panel and click 'Devices and Printers'.
3. Under the 'Unspecified' dropdown group, you should see 'AirPod Case'. Double click this item.

![](https://raw.githubusercontent.com/Spiderpig86/blog/master/images/Airpods%20Not%20Charging%20on%20Windows/Step3.PNG)

4. Open the 'Hardware' tab and double click 'HID-compliant vendor-defined device'.

![](https://raw.githubusercontent.com/Spiderpig86/blog/master/images/Airpods%20Not%20Charging%20on%20Windows/Step4.PNG)

5. Click on 'Change settings'.

![](https://raw.githubusercontent.com/Spiderpig86/blog/master/images/Airpods%20Not%20Charging%20on%20Windows/Step5.PNG)

6. Click 'Disable Device'.

![](https://raw.githubusercontent.com/Spiderpig86/blog/master/images/Airpods%20Not%20Charging%20on%20Windows/Step6.PNG)

7. Finally, unplug and plug in your AirPod case. At this time, your case should charge correctly.

I hope these steps fixed the issue. If not, feel free to consult other guides or give it a good old slap to get things working again.

## Thanks for reading!

💎 Thank you for taking the time to check out this post. For more content like this, head over to my actual [blog](https://blog.stanleylim.me/). Feel free to reach out to me on [LinkedIn](https://www.linkedin.com/in/serbis/) and follow me on [Github](https://github.com/Spiderpig86).
Criar um ambiente virtual de Python para seus projetos
Tags: python, venv, ambientevirtual
Published: 2022-08-23 02:50:00

Se você trabalha com projetos diferentes em Python, faz cursos de diversas aplicações ou gosta de testar códigos da internet, percebe que, para alguns códigos, é necessário o download de bibliotecas específicas. Entretanto, ao invés de instalarmos as diversas bibliotecas que encontramos no nosso computador, é possível a instalação das bibliotecas restringida em uma pasta que chamaremos de ambiente virtual.

Considerando que eu estou usando o Windows e a pasta está no diretório **D:\Users\Felipe\Desktop\Workspace\data_science**

Os passos para instalação do ambiente virtual são:

1) Executar o CMD como administrador e abrir a pasta de interesse da instalação do seu projeto no CMD 

```
cd D:\Users\Felipe\Desktop\Workspace\data_science
d:
```

2) No meu caso, vou precisar ativar o ambiente python global do conda

```
conda activate
```

3) Criar o ambiente virtual

```
python -m venv NOME_DO_AMBIENTE_VIRTUAL
```

4) Ativar o ambiente virtual

```
.\NOME_DO_AMBIENTE_VIRTUAL\Scripts\activate.bat
```

5) Como passo adicional, atualizar o pip do ambiente virtual

```
python -m pip install --upgrade pip
```

Pronto! Com isso, seu ambiente já está criado, portanto, toda vez que quiser acessá-lo, basta abrir o cmd na pasta, ativá-lo e usar como quiser! ;)

Como informação adicional a esse tópico, adiciono quatro comandos úteis para quando se está trabalho com ambientes virtuais:

- **pip freeze** (verificar as bibliotecas do ambiente)
- **pip freeze > requeriments.txt** (gera um arquivo .txt com nome requeriments com as bibliotecas necessárias para o projeto)
- **pip install -r requirements.txt** (quando você quer rodar um projeto e as depedências estão no arquivo .txt, o comando adicionará todos os arquivos)
- **python setup.py install** (Instalação de pacote de desenvolvimento)

E, por fim, cinco bibliotecas importantes para aplicações de análise de dados:

- **pip install pandas**
- **pip install numpy**
- **pip install scipy**
- **pip install matplotlib**
- **pip install jupyter**

Segue o exemplo de funcionamento:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x6ordesbh6k8zqnwxw2e.png)
WIP: Forem Zapier Integration
Tags: forem, zapier, automation
Published: 2022-08-23 02:47:58

Hey All,
I'm new to the community but I already love Forem and Dev.to.

I've just recently successfully deployed a production Forem instance on Heroku and I am currently working on a bunch of new features that I'd love to bring over to the Forem repo as pull requests eventually.

One of the best and most needed features in my opinion is the Zapier integration and I'm happy to announce I'm currently working on it.

I wanted to ask you guys which triggers and actions you think are most important in this integration so I can work on adding them to the Zapier App?

Get creative but also practical!

P.S. Right now I'm adding 2 actions: create/invite users, remove users.
Get A Dev Job # 1
Tags: webdev, javascript, programming, productivity
Published: 2022-08-23 02:34:00

*Image by <a href="https://pixabay.com/users/ddzphoto-5605533/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4707345">ddzphoto</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4707345">Pixabay</a>*

I want to begin my journey again.  I learned to code July 2020, however, due to other important stuff that made me busy, family (had our first baby), church, ministries, and schooling, I was not available to keep it consistent. Nevertheless, because of my web development side projects I was able to get a long-term job as a software consultant. But now, I wanted to pursue a web development, software engineering or programming job. 

I restarted my journey last week following through [Florin Pop's tutorial on YouTube](https://youtu.be/dtKciwk_si4). But this time, for every  project I'll do my best to create it on my own and not simply follow every lines of code. I'll commit to code a minimum of focused 1 hour/day code except Sunday (I am at church on Sundays). 

I got encouraged by a single tweet from a random person who checked my github profile. The message motivated me again. 
![Tweet on my github profile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcgnbfs1vf6gwvyj36pc.png)
 

Here's a screenshot of my Github profile and contribution. Yes, It's look messy, but I'll do better. All for the glory of God! 

![jeffchavez_dev github profile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtnrnijrod183cexvlpf.png)

May God bless us all! 

As a Christian, I also write blogs about the goodnews. If you are interested, please read here: [The Glorious Gospel] (https://theologycheck.wordpress.com/2021/03/04/the-glorious-gospel/)
Starting slow, simple header and footer
Tags: angular, tailwindcss, gitpod
Published: 2022-08-23 02:04:12

## Starting slow

Mostly being working on having a way to code while on any pc, I found gitpod to test in case I need to use a chromebook or another laptop without much development power.

### Gitpod

Gitpod.io has so far shown to be a good replacement for a local dev environment, After seeing [Darin Pope](https://github.com/darinpope) use it on a coding session, I liked the idea and wanted to test it.

So far so good, will need to keep testing to see what else I can do with it.

## Header

By using a code already written on [flowbite](https://flowbite.com/), I was able to hack a simple header quickly, I have a UI component in angular called header, that itself uses 3 other components, more granular ones, a title component, a navbar and a button. I like this way to make it work, even if it means that I need to redo some of the boilerplate code to allow for the components themselves to be less specific and to allow parents (either header, footer, other components or the other pages) to use them, by allowing the parents to specify the css class and the internal information, or to have an A LA CART kind of ability of the components to let the parents choose actions.

## Footer

Just like the header, mostly boilerplate so far as shown on flowbite, that will get more singular components to be displayed on each page.

_**Next is to start a boilerplate page setup and the first Jenkins pipeline with deployment on cloud run**_