teleren/devto huggingface dataset:
Day 8 in Redesigning Nasa's Astronomy Picture of the Day
Tags: react, nasa, api, webdev
Published: 2022-05-22 04:05:33

## Intro - 
For the past few days, I have been catching up on what I have missed and maybe rusty on. Reading back on the code was most helpful and just in case you have forgotten what or why I am doing this. I'll tell you. 

---

## Recap - 
[Nasa](http://apod.nasa.gov/apod/astropix.html) has an API that allows developers to show the picture of the day of the night sky! For approximately 3 months I have been completing this project where I am making it more "prettier". It is very straight foreword what Nasa currently has, and from months ago or a couple months ago, it was a tiktok/reel trend where people would look back on their birth date and see their image that was taken. I did not choose to do this project because of a trend as it is lightyears behind us. But it was cool how many people used it and I want to make this project more pleasing to look at where it is looking similar to a social media application. 

---

## Past to Present - 
For a large chunk of time, I have been busy with school but I have looked over how APIs work but have not made enough time for posting. But thankfully I can and today I have done some work. I have been implementing the API to another, not this project as I want to get a grasp of the idea and I don't want to break the real thing. There is still more to learn. 

---

## Future - 
This weekend or next week I will be recapping on my Javascript and Typescript because there are still some things to learn. I plan on learning from {% embed https://www.youtube.com/c/TheNetNinja %}. I have learned a lot from this creator and like his content to where I'll watch his video rather than going to online course, but they are still great options.

---

## Plug - 
If you want to see the code, I have it on my [Github](https://github.com/H12M54AM/nasa-astronomy-webpage) and post updates on DEV blogs on [twitter](https://twitter.com/EWNaidoo) if you are interested in my work.
Something funny GitHub CoPilot generated on my website.
Tags: github, githubcopilot, webdev, watercooler
Published: 2022-05-22 04:02:19

So, I intend on updating my website, and some content I plan on adding is learning resources on subjects I specialize in, like being LGBTQ or writing HTML.
So, I was writing this web page about furries and was going to write about misconceptions and this is what it decided to generate:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1prxo7wsx1oyzmptj0fh.png)
Top 5 Python Modules for Game development- Codexashish
Tags: python, machinelearning, programming, tutorial
Published: 2022-05-22 03:23:51

## Top 5 Python Modules for Game development

We are going to see, Best Python modules for game development and the Best Python game engine. You will know the top 5 Python Modules for game development. Python language is one the foremost popular programming language for game development because Python provides huge and useful libraries for game development. During this article, we've listed down the simplest 5 modules of Python Programming Language used for game development one must know. Let's Start this Article-: 

## No.1: Pygame Module
Pygame module or library is an open-source Python library that is utilized to create video games. This library could even be a mixture of C, Python, and Native. Pygame was developed by Pete Shinners. Pygame module adds functionality on top of the superb SDL library. Pygame module allows you to make fully-featured games and multimedia programs within the Python language.  

## Features of Pygame Module:-

- Multicore CPUs are often used simply.
- This framework uses optimised Assembly and Code for core functions.
- Pygame is Simple and Portable.
- Only a small amount of code is required.

## No.2: Pyglet Module
Pyglet could even be a cross-platform windowing and transmission library for Python. Pyglet is one of every of the foremost powerful Python library which is able to be used for developing games. Pyglet works on Windows, OS X, and UNIX packages.  


## Features of Pyglet Module:-

- It's no external dependencies or installation needs
- This framework is provided beneath the BSD ASCII document license
- This Framework is written entirely in pure Python
-  It's used to Load pictures, sound, music, and video in nearly any format

## No.3: Panda3D Module
Panda3D could even be a sturdy 3D engine written in C++, with a full set of Python bindings. Panda3D is additionally an aesthetic engine supporting advanced options like shaders, stencil, and render-to-texture. This framework means Panda3D is free code that runs beneath Windows, Linux, or macOS. Game development with the Panda3D module sometimes consists of writing a Python or C++ program that controls the Panda3D library.  


## Features of Panda3D Module:-

- Panda3D could also be a platform for movableness
- It's versatile plus Handling
- It's library Bindings 
- Extensibility

## 
[Click Here to read more](https://www.codexashish.com/2021/12/top-5-python-frameworks-for-game.html)

**Thankyou 
Codexashish**
Love'N App launches a new project to the crypto where users can earn by kissing.
Published: 2022-05-22 02:55:09

_Love’N is a kiss to earn application where holders can receive rewards by kissing their loved ones. The platform is built on Binance Smart Chain offers many unique features._
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x7cmsfxxw6zuygxrslyq.png)
 


The era of social networking 4.0 and blockchain have covered all around the world, where people can find love and share happiness with just 1 phone, 1 phone app, 1 mess or even. with only 1 icon. But do you know that after all, there will be one thing in common. That is a kiss, which is indispensable in love. No one loves each other without kissing. So what is the different for kissing in blockchain? That's you can earn money through our Love'n app. Love'N is a kiss to earn application, when you kiss, the reward will be more than a kiss.

Love'N App is built on Binance Smart Chain platform. In version 1.0 there will be 3 challenge packages for you to choose: 1-minute kiss challenge, 3 minutesand 5 minutes. The app will be integrated with AI through the camera to analyze when two people's lips touch each other continuously for the selected time period. The countdown timer will run continuously until the challenge is passed. In addition to the scientifically proven benefits of kissing, you will receive additional token reward that match your chosen challenges, that’s the point
In the next versions of the app, there will be more features developed, there will be events and 4.0 gift shops developed on the metaverse space.

With a young team but full of enthusiasm and experience in the blockchain industry, coming from many countries around the world, we understand many different cultures, and both will contribute all the passions to make Love'N app the most successful blockchain project and definitely open a new trend in 2022.
Official Links:

Website: https://loven.finance

Telegram channel: https://t.me/LoveNK2Eann

Telegram group: https://t.me/LoveNK2E

Twitter: https://twitter.com/LoveNToken

Youtube: https://www.youtube.com/c/Love'NKiss/videos
Cómo desinstalar el nuevo Microsoft Edge en Windows con PowerShell
Tags: microsoft, edge
Published: 2022-05-22 02:40:39

Microsoft habló mucho sobre el nuevo Microsoft Edge, que tiene el mismo nombre que su antecesor. Esto se debe a que actualmente está basado en Chromium y tiene un diseño y funcionamiento muy similar a Google Chrome, el rey indiscutible de la navegación web.

## Pasos para desinstalar microsoft edge

1. Abrimos PowerShell como como administrador

2. A continuación, escribimos el siguiente comando
`get-appxpackage *edge*`

_De toda la información que se muestra, debemos seleccionar y copiar al portapapeles la que se muestra en PackageFullName en el apartado Microsoft.MicrosoftEdge.Stable._

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


3. Seguidamente, volemos a la línea de comandos y utilizamos el siguiente comando
`Remove-appxpackage <PackageFullName>`

4. En <PackageFullName> debemos pegar el texto que hemos copiado al portapapeles y que, en este caso sería:
`Remove-appxpackage Microsoft.MicrosoftEdge.Stable_108.0.1462.76_neutral__8wekyb3d8bbwe`

¡Y ya estaría! Con esto hemos logrado forzar la desinstalación de Microsoft Edge.

## Evitar que Microsoft Edge se instale a través de las actualizaciones de Windows

Aunque lo hayas desinstalado, Microsoft puede volver a intentar instalar Edge en tu ordenador a través de las actualizaciones de Windows. Siguiendo estos pasos, podrás evitar que Windows reinstale Edge en tu ordenador en la próxima actualización. Podrás utilizar el Microsoft Edge Chromium Blocker Toolkit, que podrás encontrar en la web, para establecer una clave del registro con un nuevo valor (esto puedes hacerlo con las siguientes instrucciones o de forma manual, es decir, sin descargar nada).

1. Primero, inicia el editor de registro. Esto puede hacerse a través de la ventana “Ejecutar”, que se abre pulsando [Windows] + [R]. Introduce el comando “regedit.exe” y pulsa [Enter].

![Paso 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fks9aionl7y9za6t6z2.png)

2. Confirma la solicitud de control de la cuenta de usuario con el botón “Sí”. Ahora, ve a HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft y crea una nueva clave haciendo clic con el botón derecho.

![Paso 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0lt4z87y2pma77wqsw8.png)

Paso 3. Nombra esta nueva clave “EdgeUpdate”. Ahora, selecciona “EdgeUpdate” y haz clic en cualquier zona de la derecha para abrir el menú. Selecciona “Nuevo” > “Valor DWORD (32 bits)”. Utiliza “DoNotUpdateToEdgeWithChromium” como nombre del valor.

![Paso 3](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8d1pebf11evgu251yuil.png)

Paso 4. Por defecto, el DWORD tiene valor “0”. Puedes cambiar esto haciendo doble clic en el nombre del valor e introduciendo el valor “1” en la ventana de edición. A continuación, confirma haciendo clic en “Aceptar”.

Esto evitará la implementación y reinstalación automática de Microsoft Edge.
How to Install Bootstrap in Laravel?
Tags: php, laravel, webdev, bootstrap
Published: 2022-05-22 01:51:22

Hello Dev,

In this short tutorial, we will cover how to install bootstrap in laravel. you'll learn how to add bootstrap in laravel. you can see how to install bootstrap 5 in laravel 9. you can understand a concept of how to install bootstrap 4 in laravel. Let's get started with laravel install bootstrap 5.

You can install bootstrap with laravel 6, laravel 7, laravel 8 and laravel 9 version.

In this tutorial, i will give you steps to properly install bootstrap in your laravel application. we will use laravel ui package for adding bootstrap npm in laravel application. laravel ui is a composer package provided by laravel.

So, let's follow bellow steps:

https://www.freecoder.co/post/how-to-install-bootstrap-in-laravel-6390
[Solved] Pytest Error: ImportError: Error importing plugin '': No module named ...
Tags: debugging, python, pytest, pip
Published: 2022-05-22 01:25:27


## Problem:

Running into the following error when trying to run a Pytest test suite in a Python application via the `pytest` command:

```
 File "/usr/lib/python2.7/dist-packages/_pytest/helpconfig.py", line 94, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 81, in get_result
    _reraise(*ex)  # noqa
  File "/usr/lib/python2.7/dist-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python2.7/dist-packages/_pytest/config/__init__.py", line 739, in pytest_cmdline_parse
    self.parse(args)
  File "/usr/lib/python2.7/dist-packages/_pytest/config/__init__.py", line 947, in parse
    self._preparse(args, addopts=addopts)
  File "/usr/lib/python2.7/dist-packages/_pytest/config/__init__.py", line 889, in _preparse
    self.pluginmanager.consider_preparse(args)
  File "/usr/lib/python2.7/dist-packages/_pytest/config/__init__.py", line 499, in consider_preparse
    self.consider_pluginarg(parg)
  File "/usr/lib/python2.7/dist-packages/_pytest/config/__init__.py", line 524, in consider_pluginarg
    self.import_plugin(arg, consider_entry_points=True)
  File "/usr/lib/python2.7/dist-packages/_pytest/config/__init__.py", line 574, in import_plugin
    six.reraise(ImportError, new_exc, tb)
  File "/usr/lib/python2.7/dist-packages/_pytest/config/__init__.py", line 565, in import_plugin
    __import__(importspec)
ImportError: Error importing plugin "sklearn.tests.random_seed": No module named sklearn.tests.random_seed
```

## Solution:

There are a number of potential causes for this issue, the most likely being that the `PYTHONPATH` environment variable not being defined in your `~/.profile` file. There are two potential solutions you can try here:

1. Define the `PYTHONPATH` environment variable by running the command `export PYTHONPATH=<your_user_defined_module_path_here>`. Then retry running `pytest`
2. Add the prefix `python -m` before the usual `pytest` command like so: `python -m pytest`

## Conclusion

Well this is the end of the article, if you have any questions or concerns please feel free to post a comment in this article and I will get back to you if I find the time.

I hope you found this article helpful. Thanks so much for reading my article! Feel free to follow me on [Twitter](https://twitter.com/Shehan_Atuk) and [GitHub](https://github.com/ShehanAT), connect with me on [LinkedIn](https://www.linkedin.com/in/shehan-atukorala-8631491a5/) and subscribe to my [YouTube channel](https://www.youtube.com/channel/UCtxed_NljgtAXrQMMdLvhrQ).
Smart Home Project
Tags: arduino, webdev, discuss, opensource
Published: 2022-05-22 01:23:26

I am going to share the full details of  structured, designed and  documented 👇
## Smart Home project
It took much effort to do all the stuff required to document everything in the project. It would be pleasure if it helped anyone.

> Anyone is free to use this as reference.

> If you know anyone who has a project similar to this, Be initiative and send it to him.

Check the repo [here](https://github.com/HalemoGPA/SmartHome). 

![Smart Home Project Banner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eab97lm83xlrg3oht3ki.jpg)
OpenPGP Proof
Published: 2022-05-22 00:46:04

---
title: OpenPGP Proof
published: true
---

This is an OpenPGP proof that connects [my OpenPGP key](https://keyoxide.org/D5A75F4998534FB47C839A9D03B34648D6DEB639) to [this dev.to account](https://dev.to/cherryblossom000). For details check out https://docs.keyoxide.org/advanced/openpgp-proofs/

[Verifying my OpenPGP key: openpgp4fpr:D5A75F4998534FB47C839A9D03B34648D6DEB639]
Web App Color Helper
Published: 2022-05-22 00:24:09

## A project to practice using asynchronous JavaScript

The assignment was to use a fetch call and a few event listeners to make a basic web app.  I decided to use the color API in order to fetch some info about a color that was selected while using the app.  

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

The idea here is to use a basic HTML input type of color and get back some details about the color selected like its value in various formats (CMYK, HEX, RGB) and also some complimentary colors that might work with your selected color on whatever project you are working on.

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

There is also a copy button next to the complimentary colors that can be used to copy the value to the clip board and possibly to your code.

This was fun to build and tested my newbie coding skills to the max.  The fetch went pretty smooth, I got the DOM updated fairly easily.  The big headaches for me proved to be bootstrap and the event listeners on the copy button.

I had never used bootstrap before but began to get the hang of it fairly quickly.  At a first glance it makes the HTML seem a little busy but I understand it does so much to clean up your CSS.  As a matter of fact I did not need dedicated CSS page to build this simple little tool; in hindsight bootstrap is pretty cool to work with (at times....)

Getting the event listeners for the copy button was super tricky.  I discovered that a loop could add the event listener to each button that I was creating when I was rendering them in the DOM.  Then the problem hit and 

> I realized what a double edged sword this whole asynchronous JavaScript really was

So to make a long story short I needed to WAIT for my fetch call to complete and render the page BEFORE my query selector could grab the copyBTN class that the inner HTML was creating.  Writing it now after the fact, it seems like such an obvious and simple solution, good ole Async Await to the rescue on this one.

I think the biggest take away from this little starter project is time management and realizing it is okay to tweak things along the way.  As I am writing this the fact that innerHTML is being used to render part of the page means that more work is needed.  While this feels like unfinished business in a way it also sets up my next little victory on my long journey to Web Development greatness.
Using Cache with JavaScript examples
Tags: node, javascript, programming, tutorial
Published: 2022-05-21 23:46:08

## What is cache and why do we need it?

In an application, caching is strategically storing data in memory somewhere to reduce latency or to avoid spending unnecessary resources. It can be in a server closer to the user or actually in the user computer to access specific data faster.

## Trade-offs using Cache

As in cache you store items in memory for its fast access, it does not (naturally) have data persistency. In other words, if you reset the server you lose the data. Redis fix this issue by using memory dump to create a persistency snapshot. 

By storing the data in memory, it is also more expensive due to the lower storage capacity than a HDD for example, so have a good strategy on what to store and for how long.

## Cache Structure

Implementation wise, you only need to know that cache is used as a dictionary data structure, storing items with key/value pairs. For example, you can store data for certain http request by using its parameters as key.

## Cache Example Use Case

Image a weather application using a 3rd party API for the weather data and this API charges you per request. Makes sense to return updated data for your user but is it critical enough to be accurate by each second? By having a cache with TTL of 60 seconds, no matter how many users are using your application in certain area, you would only make one request to the 3rd party API per minute while keeping your users updated with the cache data. This could reduce A LOT of requests to this API and save you money, while returning the data to the user way faster.

## Simple in-memory cache example

For this example in Node.js we'll use the node-cache package to build an in-memory cache.


```js
import axios from "axios";
import NodeCache from "node-cache";

class WeatherRepository {
  // Lets set the default TTL to 60 seconds, so the data will expire from the
  // cache in 60 seconds and we'll have to fetch the updated data from the API.

  weatherCache = new NodeCache({ stdTTL: 60 });

  async getCurrentWeatherInformation(city) {
    // First, lets check if the required data is in cache
    const cachedData = this.weatherCache.get(city);

    // If it is, return it
    if (cachedData) return cachedData;

    const { data: weatherData } = await axios.get(
      `https://weather-api-url/?city=${city}`
    );

    // Else, fetch the data from the API then save it on the cache.
    // Here we'll use the city as key.
    this.weatherCache.set(city, weatherData);

    return weatherData;
  }
}

export { WeatherRepository };
```

If you need a remote data structure server with way more features than an in-memory cache, look for Redis.

## Conclusion

Cache is a strategy extremely used for reducing latency, storing recent data or data that is likely to be reused. Hope you find this article useful and add cache to your programming arsenal. Let me know if you have any questions or suggestions!
Have a crystal clear understanding about a Blockchain
Tags: blockchain, webdev, javascript, smartcontract
Published: 2022-05-21 23:14:05

Q1- What is blockchain  composed of?

A1- A block is composed of a header of information about the block and a set of valid transactions. 

Q2- What does UTXO stand for?

A2-   Unspent Transaction Output.

Q3- Miners are computers that execute?

A3-  Miners are powerful computer executing software defined by the Blockchain protocol. 

Q4- A transaction generates new UTXOs for transferring the amount specified in the input UTXOs. True or False?

A4- True. The transaction uses the amount specified by one or more input UTXOs and transfers it to one or more newly created output UTXOs.

Q5- The algorithm for consensus in the Bitcoin blockchain is called _____ protocol.?

A5- Proof of Work (POW)
    It gets its name because it involves “work” or computational power to solve the puzzle and to claim the right to form the next block.

Q6- Transaction confirmation is independently performed by all miner nodes. True or False?

A6- True 
Miners, take on added work or computation to verify transactions, broadcast transactions, compete to claim the right to create a block, work on reaching consensus by validating the block, broadcasting the newly created block and confirming transactions. 

Q7- Transaction 0 in every block in the bitcoin blockchain ____

A7- a) is for paying the miner fees
    b)is called the coinbase transaction
    c)does not have any input UTXO.
     All are correct.

Q8 - What allows for the execution of code in the Ethereum Blockchain, while enhancing the basic value transfer capability of the Bitcoin Blockchain? 

A8- Smart Contracts

Q9-  Solidity has data, functions or methods with modifiers, along with getter and setter functions. True or False?

A9- True  

Q10- How many types of accounts are on Ethereum?

A10- Two types of accounts. Externally Owned Accounts (EOA) and Contract Accounts.

Q11- The _____ can send transactions for ether transfer or they can send transactions to invoke a smart contract code.

A11- accounts(address)

Q12- What is the smallest denomination of cryptocurrency on Ethereum?

A12- Wei

Q13- ____ hosts the software needed for transaction initiation, validation, mining, block creation, and smart contract execution.

A13- Ethereum full node

Q14- _____ receive, verify, gather and execute transactions.
  
A14- Miner nodes