teleren/devto huggingface dataset:
Drawing a chibi character with CSS (with video)
Tags: css, cssart, webdev, showdev
Published: 2023-01-23 16:09:54

---
title: Drawing a chibi character with CSS (with video)
published: true
description: This cartoon was coded with CSS and a single HTML element
tags: css,cssart,webdev,showdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t876i5presjuiq2s4fea.png
canonical_url: https://alvaromontoro.com/blog/68025/drawing-a-chibi-character-with-css
---

I attempted to draw a chibi character using CSS and a single HTML element yesterday. It took more than usual, but it was a fun process. This was the result:

{% codepen https://codepen.io/alvaromontoro/pen/abjqKVj %}


This time, I knew more or less what I wanted to draw (often, I start drawing without a clear idea of what will result, just for fun). But I didn't know how to organize it... so I started with what seemed more obvious: the face.

Adjusting the drawing size is essential, so I opted for a relative unit that I assigned to the font-size property. From then on, all the properties were in `em` units. I used an oval shape with a thin border to delimit the head and applied a few `box-shadows` and radial gradients to add some extra color and transitions (no flat drawing this time).

I'm fond of how the eyes look and are straightforward (considering other options I've done in the past): three radial gradients for the sparks, three radial gradients for the pupil and iris, three radial gradients for the eyelids, and one radial gradient for the white... radial gradients everywhere!

Then I realized that if I wanted to do the hair, I would need to move what I already had to one pseudo-element. Not a problem. I moved it to the `::after` and then had the `::before` (or the element in itself) to draw the hair and neck.

After finishing the face, I tried different variants. A good thing: the drawing uses custom properties, so it is effortless to change colors for skin, hair, eyes, etc. I will only share one here, but [I shared more on Patreon](https://www.patreon.com/posts/css-chibi-77616817?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link).


![Cartoon of a young Black woman wearing a head band (chibi/anime style)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9do12br3gv9xm3drlaon.png)



The hair is one of the things I don't seem to do right. I went with a curly/wavy style because it is easier to code and doesn't look terrible, but it is also not as impressive as other styles (which are also 1,000 times easier in SVG... and don't get started with "_this would be easier/better in SVG_.")

Having completed the initial drawing, I removed some hard stops from the gradients to get smoother transitions and a more polished picture.

---

I recorded the coding process and [shared it on my YouTube channel](https://www.youtube.com/alvaromontoro). It took around 2 hours to code the whole thing but don't worry, I sped the video up a lot, so the video is about 9 minutes:

{% youtube NAuxqUEqr68 %}
Prevent Customer's Email to be Used as Sender Address of Notification Email in Odoo 16
Tags: tutorial, odoo, email, spoofing
Published: 2023-01-23 16:09:01

When you've configured Odoo to send or receive emails, maybe you'll notice when a notification email containing the customer's reply has the customer's email address as the sender. This behaviour called "Email Spoofing".

Email spoofing is the creation of email messages with a forged sender address. The term applies to email purporting to be from an address which is not actually the sender's; mail sent in reply to that address may bounce or be delivered to an unrelated party whose identity has been faked [1].

To avoid that problem, make sure all emails use a “From” address from the same authorized domain. In the earlier Odoo version, we can use one of these system parameters [2]:
- `mail.force.smtp.from`
- `mail.dynamic.smtp.from`

But, in Odoo 16.0 those system parameters is removed and a new mechanism is introduced in [PR#61853](https://github.com/odoo/odoo/pull/61853). Then, how we can configure the "No Spoofing" approach in Odoo 16?

You'll need to go to "Settings/General Settings" menu. In "Discuss" section, please check on "Custom Email Servers" option. Please fill in your alias domain, for example is `tammam.id`. Then click on **Save** button.

Then, open the outgoing mail server record to add value in the "FROM Filtering" field. You can fill it in with the email address that is treated as the sender address of the notification email, e.g. `notifications@tammam.id` or `no-reply@tammam.id`. Then click on **Save** button.

If you've configured it properly when a customer with the email address mary@customer.example.com responds to a message, and then Odoo will try to redistribute that same email to the other subscribers in the thread with the sender address formatted like this: `"Mary" <no-reply@tammam.id>` or maybe `"Mary (mary@customer.example.com)" <no-reply@tammam.id>`.

> Cover image by [Hiroshi Kimura](https://unsplash.com/@muukii) on [Unsplash](https://unsplash.com/photos/VybzKEUMhbw).

---

**References:**
1. [Email spoofing](https://en.wikipedia.org/wiki/Email_spoofing)
2. [Use a default “From” email address](https://www.odoo.com/documentation/master/applications/general/email_communication/email_servers.html#use-a-default-from-email-address)
New Waec Timetable 2023
Published: 2023-01-23 16:07:59

[https://multischolar.com/waec-timetable/](https://multischolar.com/waec-timetable/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)
https://plaza.rakuten.co.jp/chenlee/diary/202301230000/
https://www.provenexpert.com/new-waec-timetable-2023/
https://www.producthunt.com/@waecp1
https://www.divephotoguide.com/user/waecp/
https://www.diggerslist.com/waecp/about
https://wakelet.com/@waecp945
https://vocal.media/authors/waecp
https://www.lifeofpix.com/photographers/waecp/
https://seedandspark.com/user/waecp
https://rosalind.info/users/waecp/
http://phillipsservices.net/UserProfile/tabid/43/userId/195477/Default.aspx
https://app.roll20.net/users/11545084/waecp
http://uid.me/waecp
https://speakerdeck.com/waecp
https://social.msdn.microsoft.com/Profile/waecp
https://www.iheart.com/podcast/269-waecp-107688945/
https://active.popsugar.com/@waecp/profile
https://unsplash.com/@waecp
https://camp-fire.jp/profile/waecp
https://plazapublica.cdmx.gob.mx/profiles/waecp/activity
https://www.metal-archives.com/users/waecp
https://artmight.com/user/profile/935511
https://storium.com/user/waecp
https://trabajo.merca20.com/author/waecp/
https://telegra.ph/New-Waec-Timetable-2023-01-23
https://www.intensedebate.com/people/waecp
https://www.mifare.net/support/forum/users/waecp/
https://pinshape.com/users/2559763-waecp
http://foxsheets.com/UserProfile/tabid/57/userId/118795/Default.aspx
https://www.kompasiana.com/waecp
https://www.credly.com/users/new-waec-timetable-2023/badges
https://www.myminifactory.com/users/waecp
https://www.speedrun.com/user/waecp
https://www.sqlservercentral.com/forums/user/waecp
https://www.longisland.com/profile/waecp
http://flightgear.jpn.org/userinfo.php?uid=32072
https://leanin.org/circles/new-waec-timetable-2023
https://myanimelist.net/profile/waecp
https://mootools.net/forge/profile/waecp1
Developer Affirmations to Keep You Going in 2023
Tags: community, devjournal, watercooler
Published: 2023-01-23 15:57:21

It's a new year, which is a great time for some positive, what we're calling *Airbrake Affirmations*! We hope a few of these affirmations help you combat some of the imposter syndrome and self-doubt you might have felt last year.


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


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


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


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


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4fs0sgjdsfdpd68b5kxr.png)
 
Do you have your own favorite affirmation? Let us know in the comments!
Understanding Chainlink VRF: A Tool for Random Number Generation on the Blockchain
Tags: web3, blockchain, solidity, vyper
Published: 2023-01-23 15:55:23

Random number generation (RNG) is a fundamental building block for many decentralized applications (dApps), from games to smart contracts. However, generating truly random numbers on a blockchain, which is a deterministic system, is a non-trivial task. Chainlink VRF (Verifiable Random Function) is a new tool that aims to solve this problem by providing a secure and verifiable way to generate random numbers on the Ethereum blockchain.

### What is Chainlink VRF?

Chainlink VRF is a smart contract that implements a verifiable random function (VRF) on the Ethereum blockchain. A VRF is a cryptographic primitive that generates a random value, and also provides proof that the value was generated at random. This is achieved by using a combination of a pseudorandom function (PRF) and a digital signature.

The Chainlink VRF smart contract is designed to be used as an oracle, meaning it can be queried by other smart contracts to provide a random value. The smart contract also provides proof of the randomness of the value, which can be verified by any other contract or user.
How is it useful?

Chainlink VRF is useful for several reasons:

- **True randomness**: Chainlink VRF provides a way to generate truly random numbers on the blockchain, which is essential for many dApps that rely on randomness, such as games or lotteries.

<br>

- **Verifiability**: Chainlink VRF provides proof of the randomness of the generated value, which can be verified by any other contract or user. This ensures that the random value has not been tampered with and was truly generated randomly.

<br>

- **Decentralization**: Chainlink VRF is a decentralized solution, meaning that it is not controlled by any single entity and is resistant to censorship and tampering. This makes it a more secure and trustless option compared to centralized RNG solutions.

<br>

- **Flexibility**: Chainlink VRF can be integrated with other smart contracts and dApps, making it a versatile tool for a wide range of use cases.

### Conclusion

Chainlink VRF is a powerful tool for generating truly random numbers on the Ethereum blockchain. It provides a secure, verifiable, and decentralized solution for dApps that rely on randomness, and can be integrated with Solidity and Vyper contracts. As more developers and projects start to adopt this technology, we can expect to see it become a standard building block for many decentralized applications.
[PT-BR] Os atalhos mais utilizados no Visual Studio Code
Tags: webdev, beginners, vscode
Published: 2023-01-23 15:55:12


![laptop with text editor open](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aowbrtfe0o7xsaj1wm5w.png)

> _Photo by [Fernando Hernandez](https://unsplash.com/@_ferh97?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on Unsplash_

O Visual Studio Code é um editor de texto open source, leve, bastante completo e um dos mais utilizados em 2020 na construção e manutenção de aplicações web. 
Decidi então fazer esse post com o objetivo de trazer para vocês alguns atalhos que me ajudam e mais utilizo no meu dia a dia e se caso quiser conhecer mais atalhos aqui está a documentação oficial.

Criar um novo arquivo: `Ctrl + N`
Abrir arquivo: `Ctrl + N`
Salvar arquivo: `Ctrl + S`
Fechar editor/instância: `Ctrl + W`
Pesquisar por palavras: `Ctrl + F`
Abrir o terminal integrado: `Ctrl + '`
Abrir um novo terminal: `Ctrl + Shift + '`
Pesquisar por arquivos: `Ctrl + Shift + P`
Selecionar todas as palavras iguais para edição: `Ctrl + Shift + L`
Replicar linha que está o cursor para cima ou para baixo: `Shift + Alt + ↑/ ↓`
Comentar um bloco selecionado: `Shift + Alt + A`
Formatar documento: `Shift + Alt + F`
Mostrar paleta de comandos: `F1`
Procurar por um arquivo: `Ctrl + P` e digitar o nome do arquivo

Espero que esses comandos possam te ajudar também. Para baixar o Visual Studio Code, basta clicar [aqui](https://code.visualstudio.com/) e será redirecionado para a página oficial.
Docker Images: A Quick Guide
Tags: docker, beginners, devops
Published: 2023-01-23 15:54:30

## Docker Images
Docker images are pre-built software packages that include all of the necessary files and dependencies to run a specific application or service. These images are stored in a registry, such as Docker Hub, and can be easily downloaded and used to create new containers. They are used to package and distribute software in a consistent and portable way, making it easy to deploy and run applications in different environments.

## How to create Docker images

We can create an image using a `Dockerfile`. A `Dockerfile` is a script that contains instructions on how to build your image.

Here is the basic steps to create a Docker image:

1. Create a new folder and navigate to it.
2. Create a new file called `Dockerfile` and open it in a text editor.
3. Use the `FROM` instruction to specify the base image that your image will be built on.
4. Use the `RUN` instruction to execute commands that will be run during the image build process.
5. Use the `COPY` instruction to copy files or folders from your host machine to the image.
6. Use the `CMD` instruction to specify the command that will be run when a container is created from the image.
7. Save the `Dockerfile`.
8. Open a terminal window and navigate to the folder where the `Dockerfile` is located.
9. Run the following command to build the image:

```
docker build -t my-image .
```

The -t flag is used to give the image a tag (name), in this case "my-image". The . at the end specifies the current directory as the build context.

Once the image is built, you can run it using the following command:

```
docker run -p 80:80 my-image
```

This command runs the image and maps port 80 on the host to port 80 in the container.

**Example**

Here is an example Dockerfile that creates an image with the latest version of Ubuntu and installs the Apache web server:

```
FROM ubuntu:latest
RUN apt-get update && apt-get install -y apache2
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
```

To build the image, open a terminal window and navigate to the directory where the Dockerfile is located. Then run the following command:

```
docker build -t ubuntu-local .
```

Next, we will build a docker image for node.js application.
Follow for more.

![](https://media.tenor.com/z3Vqx6hmE5QAAAAC/whale-docker.gif)
What's your favorite science fiction technology that's been turned into something real?
Tags: discuss, ai, watercooler
Published: 2023-01-23 15:45:43

---
title: What's your favorite science fiction technology that's been turned into something real?
published: true
description: 
tags: discuss, AI, watercooler
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dhbcpr384yfrtg2halz.png
# Use a ratio of 100:42 for best results.
---

In 1865, Jules Verne wrote *From the Earth to the Moon,* where he described spacecrafts and rockets, that eventually sounded a lot like Apollo-11. 

Start-ups today are even using ideas from science fiction as the imagination to power their innovation. 

**What are some things you've read in sci fi that have become true-to-life?**
Use ChatGPT to "talk" to your website
Tags: openai, machinelearning, lowcode, webdev
Published: 2023-01-23 15:38:56

We've just released a new version of [Aista Magic Cloud](https://aista.com). The primary feature in this release, is that it allows you to copy and paste a JavaScript tag into your existing website, for then to _"have an intelligent conversation with your website based upon ChatGPT and AI"_.

Notice, you need to fine-tune your own model, but this is automatically done for you by simply pointing Magic to your existing website, at which point it will automagically crawl your website, and scrape it for data, generating a custom machine learning AI model in the process, capable of answering intelligent questions about your site.

* [Try out our ChatGPT support bot here](https://docs.aista.com/)

The above website has roughly 70 pages, and after scraping our site, we're able to get an accuracy of roughly 50% in answers. However, importantly, the module logs all questions/answers, and allows you to reinforce it as you've gathered more training data, to strengthen its result. My guess is that over a month or two, the above bot will be able to provide an accuracy of 95+ percent, simply due to people asking it questions, and me _"correcting"_ its answers, and re-training it on my corrections a handful of times.

You can see me demonstrating the thing in the video below

{% embed https://www.youtube.com/watch?v=A6QxPDo-w2Q %}
9- What are modules in Python?
Tags: python, programming, tutorial, beginners
Published: 2023-01-23 15:37:18

--- series: Python for scientific research ---

In the modules, we can use a set of functions without being required to redefine them. Then, from a group of related modules, we can create a package. Create a simple module:

```python
def hi(name):
    print("Hello, " + name)
```

Save it as "module1" in your directory.

Use the module:

```python
import module1
module1.hi("Ali")
# Hello, Ali
```

#### Built-in module

We can import various built-in modules in Python.

```python
import platform
print(platform.system())
# Windows
```

Import module from a package:

```python
import matplotlib.pyplot as plt
```

If you like the content, please [SUBSCRIBE](https://www.youtube.com/channel/UCpbWlHEqBSnJb6i4UemXQpA?sub_confirmation=1) to my channel for future content.

To get full video tutorial and certificate, please, enroll in the course through this link: [https://www.udemy.com/course/python-for-researchers/?referralCode=886CCF5C552567F1C4E7](https://www.udemy.com/course/python-for-researchers/?referralCode=886CCF5C552567F1C4E7)
Hiding API keys with Rails
Tags: rails, ruby, api
Published: 2023-01-23 15:35:32

As developers, we tend to use API's to help us bring in the necessary data for our applications. API's themselves are a great resource that every developer should learn to use. Most API's require something that is called an API key, this 'key' is essentially a code that gives you as the developer access to use said API. However, due to the key being specific to each user that has signed up for one, this can pose a huge security concern if you try to use a simple fetch in your front end with the key in the url. There are plenty of ways that developers can hide API keys, but the one that I have used and found to be the most productive is to hide it in the backend.

By setting up your API calls in your backend, you enable yourself to create custom routes that can be used in your front end fetches. There are a few steps that need to happen in order to successfully hide your 'keys' in the backend of your app.

Step 1: if one doesn't already exist, create a .ENV file in which you will assign a variable to each API that you will be using.

Step 2: In your application should exist a .gitignore file in which you can choose what in your application gets pushed to github for other developers to view. Within that git ignore file we add the simple line of `.env`. Now when you commit and push changes to github the .env file will not be pushed with it.

Step 3: Once you have the env file setup and ignored, we can create an "API_controller" file that will enable us to write methods for each api path we plan on using. Within the url we will assign that variable from the env file for the actual API url. Example below:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1j6u165b63hpm7k299s.png)

Step 4: Now that our controller has been set up our next step is to create custom routes that go to that respective api method. When creating routes it could be as simple as `get "/company_profile, to: "api#[custom api method]`. Whats important to remember is that each custom route must have an HTTP method like GET, POST, PATCH, DELETE. 

Step 5: Now the final step, with the backend successfully hiding each api we can use our fetches efficiently in the front end. instead of having the long api url in our fetch we can simply set it as `fetch('/company_profile)` and our app will know to go to the backend method, communicate to the api and bring in the necessary data without jeopardizing the security of our application.
10- How to handle files in Python?
Tags: python, programming, tutorial, beginners
Published: 2023-01-23 15:29:37

--- series: Python for scientific research ---

Python has several functions for creating, reading, updating, and deleting files.

#### open() function

For working with files the function is: open(fileName, mode) There are four different modes for opening a file:

"r" - Read - Default value. Opens a file for reading, error if the file does not exist

"a" - Append - Opens a file for appending, creates the file if it does not exist

"w" - Write - Opens a file for writing, creates the file if it does not exist

"x" - Create - Creates the specified file, returns an error if the file exists

Assume we have a txt file named data in your directory folder.

#### read() mode

```python
file = open('data.txt', 'r')
```

Print every line in the file

```python
for each in file:
    print (each)

# This is for testing!
```

#### write() mode

```python
file = open('data.txt','w')
file.write("The write command allows us to write in a particular file. ")
file.close()
```

Open the file again:

```python
file = open('data.txt', 'r')
print(file.read())
# The write commandIt allows us to write in a particular file.
```

#### append() mode

```python
file = open('data.txt','a')
file.write("This will add this sentence.")
file.close()
```

Open the file:

```python
file = open('data.txt', 'r')
print(file.read())
# The write commandIt allows us to write in a particular file. This will add this sentence.
```

If you like the content, please [SUBSCRIBE](https://www.youtube.com/channel/UCpbWlHEqBSnJb6i4UemXQpA?sub_confirmation=1) to my channel for future content.

To get full video tutorial and certificate, please, enroll in the course through this link: [https://www.udemy.com/course/python-for-researchers/?referralCode=886CCF5C552567F1C4E7](https://www.udemy.com/course/python-for-researchers/?referralCode=886CCF5C552567F1C4E7)
8- What are the functions in Python Programming?
Tags: python, programming, tutorial, beginners
Published: 2023-01-23 15:31:29

--- series: Python for scientific research ---

# 8- Functions

Function is a block of code allowing us to use the same function whenever we call it.

![function2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1624788465612/NbcERWjIW.png align="left")

```python
def my_function():
    print("Hello from Python for researchers tutorial!")

my_function()
# Hello from Python for researchers tutorial!
```

#### A function with an argument:

```python
def function1(fname):
    print(fname + " Azad Othman Rasul")

function1("Anas")
# Anas Azad Othman Rasul
function1("Aviar")
# Aviar Azad Othman Rasul
function1("Muhammad")
# Muhammad Azad Othman Rasul
```

If you like the content, please [SUBSCRIBE](https://www.youtube.com/channel/UCpbWlHEqBSnJb6i4UemXQpA?sub_confirmation=1) to my channel for the future content.

To get full video tutorial and certificate, please, enroll in the course through this link: [https://www.udemy.com/course/python-for-researchers/?referralCode=886CCF5C552567F1C4E7](https://www.udemy.com/course/python-for-researchers/?referralCode=886CCF5C552567F1C4E7)