teleren/devto huggingface dataset:
Use the virtual environments with Python
Tags: python, tooling
Published: 2023-10-23 16:12:01

If you work on several Python projects, you will quickly need to have different versions of your packages, depending on the current project.

**Virtual environments** are designed for this, they allow to isolate the libraries between your projects. There are different libraries you can use, I will show you **Venv** and **Pipenv**.

# Venv
[Venv](https://docs.python.org/3/library/venv.html) is the built-in module for creating virtual environments in Python 3.

First let’s create a simple script, that needs two packages :
```bash
import requests
import numpy

if __name__ == "__main__":

    # Use the requests library
    request = requests.get("https://httpbin.org/get")
    print("Response : ")
    print(request.text)

    # Use the numpy library
    print("Numpy version : " + numpy.__version__)
```

Create a file "requirements.txt" :
```
requests>=2.25.1
numpy>=1.19.5
```

Then you can use this commands (don’t forget to add "venv" in your .gitignore file) :
```bash
# Create the venv
python -m venv venv

# Activate the venv
source venv/bin/activate

# Install the requirements
pip install -r requirements.txt

# Deactivate the venv
deactivate
```

# Pipenv
[Pipenv](https://pipenv.pypa.io/en/stable) is a higher-level tool that combines package management and virtual environment management, using Pipfile.

First, install Pipenv :
```bash
brew install pipenv
```

Create a file "Pipfile", made for the script we are working on :
(you can also generate it with the "pipenv install" command)
```
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
requests = ">=2.25.1"
numpy = ">=1.19.5"

[dev-packages]
```

Then you can use this commands :
```bash
# Inititiate the Pipfile (or install all packages)
pipenv install

# You can install packages (or edit Pipfile directly)
pipenv install requests
pipenv install numpy

# Activate/Deactivate the venv
pipenv shell  # and Ctrl + D to quit

# Alternatively, run a command inside the virtualenv
pipenv run python

# Uninstall the venv
pipenv --rm
```

Both are good solutions for virtual environments, venv is built-in and lighter to write, also pipenv is faster and allows more possibilities, so choose the good one for the good context.

You can also be interested by [Pyenv](https://dev.to/jdxlabs/pienv-to-handle-different-versions-of-python-1859), a complementary tool made to manage different versions of Python on your computer.
Day 2 of DPI Camp
Published: 2023-10-23 16:09:36

Off to a good start today jumping into a pretty straightforward assignment.

This morning I'll be making a web page, saving it as a project on Github and deploying it on a platform (likely Github pages). 

**First Pomodoro**

Ended up finishing the project just in time. It was pretty standard with only one line of code, but it helped me look more into the technicalities of running an app. I've actually never used Github Pages or Codespaces, definitely looking forward to using them both in the future (although I prefer to write my code in an external VScode window). 

Either way, we're moving on to a basic html and css review so it'll be interesting to see how that refresher looks. Going on my five min break then starting up the next timer, brb!

Alright, I've finished up my html and css review after an extra 15 minute timer for this pomodoro. The review was helpful, especially going into animation and adjusting Flexbox since I haven't gone over those two topics in forever. 

Moving on I'll be working on a project for my second Pomodoro.

**Second Pomodoro**

So far I've made some decent progress by setting up the project and making some basic html for it. I'll take some time after the weekend to pick up the project again and hopefully finish it up on Monday.
Raku Blog Posts 2023.43
Tags: programming, rakulang, summary
Published: 2023-10-23 16:06:21

- [A New JSON::Class Module. All New.](https://vrurg.github.io/2023/10/17/new-json-class)

*Vadim Belman* announces their new take on (de-)serializing JSON.

- [Podlite: Modernizing and Extending abandoned Raku Pod](https://dev.to/zag/podlite-modernizing-and-extending-abandoned-raku-pod-aka-pod6-1bo5)

*Alexandr Zahatski* describes new features of the PodLite editor in light of the proposed changes to RakuDoc.

- [Raku, Python, and Wolfram Language over LLM functionalities](https://community.wolfram.com/groups/-/m/t/3053519)

*Anton Antonov* describes how they translate their work in the Raku Programming Language to other languages for wider exposure. 

- [Rakudo Weekly News 2023.43](https://rakudoweekly.blog/2023/10/23/2023-43-releastober/)

*Elizabeth Mattijsen* reports on all recent developments around Rakudo, an implementation of the [Raku Programming Language](https://raku.org).
Custom Template for your Spring Boot App
Tags: springboot, devops, scaffolding, java
Published: 2023-10-23 15:54:54

Bootify is a tool for **creating your individual template for a Spring Boot application**. Numerous features are available, which are added to the template exactly as required.

## Preferences and database schema

In the _General Tab_, general specifications can be made first: Java or Kotlin, enable Lombok, choose a frontend stack and a database, and so on. Select between technical or domain oriented package structure.

![](https://s3-eu-central-1.amazonaws.com/bootify-prod/ext/img/appTemplate/developerPreferences.png "Choice of database and preferences")
_&nbsp; Choice of database and preferences_

In the _Entity tab_ the database schema for the selected database can then be created. This will generate the JPA / Hibernate entities with the annotations for fields and relations from the schema. If the **CRUD option has been activated for the REST API or the frontend**, additional services and controllers are available.
![](https://s3-eu-central-1.amazonaws.com/bootify-prod/ext/img/appTemplate/editEntity.png "Editing an entity")
_&nbsp; Editing an entity_

With the Professional plan, extended features for your Spring Boot template are available. These include **Spring Security** (JWT, form-based login or Keycloak via OIDC), **integration tests including Testcontainers**, pagination and [much more](https://bootify.io/quickstart-pro.html).

## Customizable Templates in the DevOps Plan

In the DevOps plan **the Bootify Builder itself can be customized**. This allows to configure the options in such a way that the generated application always corresponds to the environment of the company. Any custom files can be added to the template. Special hooks are available to extend the build files at the required points.

With Bootify, the Developer Experience is in the focus: the created Spring Boot template saves a lot of time by providing components that are needed over and over again. At the same time, the **code is free of external dependencies and avoids unnecessary overhead**.

[**&raquo; See Features and Pricing**](https://bootify.io/pricing.html)
Introducing the first JS13K Games Community Soundtrack
Tags: js13k, javascript, music, gamedev
Published: 2023-10-23 15:54:51

The best games all have something in common: great soundtracks.
But I'm sure I don't need to tell you that great game soundtracks don't need big budget philharmonic compositions to e fun experiences. In fact, many fun games have simple tunes created in Javascript using a myriad of tools, or even programmed by hand directly using the Web Audio API.

Despite the tough size constraints, the top games in JS13K wouldn't reach the top if they didn't also get top marks in the audio category. Some of the games offered complex, dynamic, and catchy soundtracks that seamlessly blended with the gameplay.

This year our community decided to extend our cooperation a bit longer. We're banding together to collect these tunes and create the first ever **JS13K Games Community Soundtrack**.

[![Playlist in Bandcamp](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24b72sm7zs1mmb7hm23v.png)](https://js13k.bandcamp.com/album/js13kgames-2023-community-soundtrack)

## Join the project

Did you participate in this year's competition? Has your game included a melody that deserves to be heard on loop? I'd like to invite you to join us over on slack to join our group and share your music. If you need help extracting or recording your music, you'll find some helping hands on slack too.
Placeholder Contributor
Tags: hack23contributor
Published: 2023-10-23 15:54:02

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a contributor. Is this your first Hacktoberfest, or have you contributed to others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your learning or career goals changed since working on these new projects? -->
What is Streaming Buffering and Benefits of Upgrade your Network
Published: 2023-10-23 15:47:13

Dealing with buffering issues can feel like wrestling a nightmare. However, don't fret! The solutions to your bottlenecked network and its related hardware and software problems are often simpler than you think. We've crafted this handy guide for you, pinpointing typical streaming buffering hiccups and how to sidestep each one.

You're in an online meeting with possible customers, ready to share a crucial business proposal. Suddenly, you face internet issues that freeze your screen while speaking. Don't let such nightmares become reality; instead, embark on a journey with us as we delve into What is Streaming Buffering and why [internet needs an upgrade now](https://www.jeebr.net/signs-your-internet-needs-an-upgrade/) - offering solutions for smoother streaming experiences that won't jeopardize your online interactions.

## When should you upgrade your network?

1- Upgrading your network provides security improvements to protect valuable data from hackers.
2- Increased reliability outsmarts downtime and prevents unexpected outages.
3- Enhanced data capacity leads to faster performance times.
4- Help businesses stay ahead and achieve extraordinary results.

## How do I fix lag buffering?

1- Take a break from streaming to allow the stream to recover.

2- Improve the video quality by increasing the resolution.

3- Disconnect other devices using the internet.

4- Restart your router.

5- Close any unused apps on your streaming device or laptop.

6- Upgrade your internet plan for better speed and data capacity.

You can connect your devices directly to your router or Ethernet switch. However, this may require some effort if they are far from each other, and you must run an Ethernet cable throughout your house.

Although video buffering can be a frustrating disruption, it is essential to the background video streaming process. It is possible to resolve if your video streaming is hindered by buffering. Above all, ensure that your internet service can handle the task. Particularly in professional settings, a robust and comprehensive variable bitrate streaming platform is necessary to provide you with the smoothest stream imaginable.
React Native Clavier
Published: 2023-10-23 15:43:08

Bonjour, je développe mon application mobile avec react native mais j'ai un soucis :
Dans l'appli j'ai un input qui ouvre le clavier de l'utilisateur, à l'ouverture du clavier, certain de mes éléments bougent ce qui dérègle le design. Quelqu'un pourrait m'aider à ce sujet. Merci d'avance
Working with multiple versions of PostgreSQL
Tags: postgres
Published: 2023-10-23 15:30:03

Running different versions of PostgreSQL locally can be useful for both production and development purposes.There are several ways you could achieve this; by using Docker,by specifying the absolute path for the specific version you want to run,and by using `pg_wrapper` to enable easier switching between different versions of PostgreSQL.
We are going to see how we can use the three methods to achieve this:
**Using absolute paths in your terminal**
First, we need to have the different versions of PostgreSQL installed. When you run a command like,
`pg_config --version`, the PostgreSQL version that pops up is the first where the PATH is set first. To run the second version of PostgreSQL,we need to specify the absolute path of its installation. There is an easy way to determine where the installation of either of the PostgreSQL versions is, by finding it in the terminal.
In the terminal, we run
`su -` to change user to root, then we find it by
`sudo find / -name pg_config`.
The command return the `pg_config` absolute paths in which there is a bin directory, for instance, `/usr/local/pgsql/bin/pg_config/pg_config`. 
When we run the absolute path above with the `--version` parameter
like this `/usr/local/pgsql/bin/pg_config/pg_config --version`
, we get the version of the PostgreSQL in that path.
We can then set the path for our PostgreSQL version in this way: `export PATH=$PATH:/usr/local/pgsql/bin` to make `initdb postgres` to create `postgres` cluster and later `createdb sampledb` to create `sampledb` in the `postgres` cluster.
Claude: 10 Minute Docs Audit
Tags: claude, ai, documentation, docsaudit
Published: 2023-10-23 15:30:00

[Claude](https://claude.ai/) is a large language model, LLM, created [Anthropic](https://www.anthropic.com/). Claude can answer questions and produce content similar to ChatGPT. Just like ChatGPT, there is a UI for end users, and an API for developers. 

{% embed https://youtu.be/Ig-fQ7TF_9k %}

I run a technical documentation business specializing in writing and editing documentation. I made this series to share my insights and help projects craft impactful documentation.

What's The Criteria?
3- Excellent
2 - OK
1 - Poor

Purposeful: Does the QuickStart explain what problem it's trying to solve? Who is the intended audience?

UX Experience: How seamless is the experience? Must the user create an account to get through the Quickstart? Does the Quickstart elicit a sense of joy and achievement?

Accurate: Are the instructions correct? Are they complete?

## [The Results](https://www.loom.com/share/325c61b409ee4e4984ca00bab91ac0d9?sid=86937bf7-14e7-4387-aedb-b51dfda6ca52)

Developers need an invite to access Claude's API, and the experience went downhill from there. The landing page and the Getting Started page were hard to navigate. I found myself clicking between Claude's landing page, Anthropic's API docs, and Anthropic's GitHub page. A nightmare. 😤

According to Anthropic, it was in the process of making multiple LLMs, but the only one I could find was Claude and [Claude Instant](https://www.anthropic.com/index/releasing-claude-instant-1-2). Where are these other LLMs?

That's it. Wasn't impressed with Claude's/Anthropic's docs. They weren't nearly as well organized or helpful as ChatGPT's.


|               | Score |
|---------------|-------|
| Purposeful    | 1     |
| UX Experience | 1     |
| Accurate      | NA    |


Are you interested in a FREE Quickstart audit for your company? [Start here](https://forms.gle/5jDeuQraBwahkjT16).
SQL - Optimize Your SQL Data Types
Tags: sql, sqlserver, programming, tutorial
Published: 2023-10-23 15:30:00

Choosing the right data types for your database columns can significantly impact storage requirements, query performance, and data integrity. To optimize your SQL data types:

1. **Choose the Most Appropriate Data Type:** Select data types that closely match the nature of the data being stored. For example, use `INT` for whole numbers, `VARCHAR` for variable-length text, and `DATE` for date values.

2. **Use the Smallest Data Type:** Choose the smallest data type that accommodates your data's range and precision. Smaller data types require less storage space and can lead to faster query performance. For example, use `SMALLINT` instead of `INT` for smaller integer values if the range fits your needs. Use `CHAR` for fixed-length strings when the length is consistent and known.

3. **Avoid Using Text or Blob Data Types for Large Text:** Text and blob data types (e.g., `TEXT`, `BLOB`) can be less efficient for searching and sorting than character or binary data types. Use them only when necessary for storing large, unstructured data.

4. **Consider Indexed Columns:** Choose appropriate data types for columns that you plan to index. Some data types are better suited for indexing than others, and your choice can impact query performance.

5. **Be Mindful of Numeric Precision:** Use numeric data types with the appropriate precision and scale. Avoid using overly precise numeric types when less precision is sufficient, as it can increase storage requirements.

6. **Use ENUM or CHECK Constraints:** If you have a limited set of possible values for a column, consider using an `ENUM` data type (if supported) or adding `CHECK` constraints to enforce data integrity and save storage space.

7. **Regularly Review Data Types:** As your data evolves, periodically review your data types to ensure they still align with your data's characteristics and usage patterns. Over time, data requirements may change, and adjustments may be needed.

8. **Monitor and Optimize Storage:** Keep an eye on the storage usage of your database and regularly optimize tables, indexes, and data types to minimize storage requirements.

Choosing appropriate data types and optimizing them for your specific needs can lead to more efficient storage usage, faster query performance, and improved data integrity in your SQL database.
Placeholder Maintainer
Tags: hack23maintainer
Published: 2023-10-23 15:20:30

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->
 vbvb
### Intro
<!-- Share a bit about yourself as a maintainer. Is this your first Hacktoberfest, or have you maintained in others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Project
<!-- Tell us about the repository that you hosted. What processes did you set up to review and merge pull requests? Feel free to embed your GitHub repo by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your project goals changed since publicly maintaining it? -->
Placeholder Contributor
Tags: hack23contributor
Published: 2023-10-23 15:20:07

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a contributor. Is this your first Hacktoberfest, or have you contributed to others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your learning or career goals changed since working on these new projects? -->
What is an ORM
Tags: typeorm
Published: 2023-10-23 15:19:35

An ORM (Object Relational Mapper), is a piece of software designed to translate between the data representations used by databases and those used in object-oriented programming. 
ORM is the layer that connects object-oriented programming (OOP) to relational databases. To perform different operations like creating, reading, updating, and deleting data from a database we use SQL for performing these operations in relational databases. ORM as a tool can help simplify the interaction between the relational databases and different OOP languages that you might be using.

The idea of ORM is based on abstraction. it creates a logical model of the program with a high level of abstraction, i.e., without specifying the underlying code details. The ORM mechanism makes it possible to address, access and manipulate objects without having to consider how those objects relate to their data sources.

Developers can also perform various data-creating, reading, updating, and deleting (CRUD) operations in relational databases without using SQL. This capability is particularly useful for developers who either don't know SQL or don't want to waste time writing SQL code. It's recommended for developers to know SQL queries since behind the hood the operation remains the same old SQL queries are being executed.

to see how ORM is simplifying the SQL let's take as an example 

SQL:

>  ` SELECT  name, email, phone_no FROM users WHERE id= 12`
this query will return the name, email, phone_no from a table called users where users id of 12

the same query can be written in ORM tool as

> users.GetById(12)
So the code above does the same as the SQL query.

Depending on the languages you are using you can find different compatible ORM tools: for example

[TypeORM](https://typeorm.io/): is an ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, and WebSQL databases.

[Sequelize](https://sequelize.org/): is a modern TypeScript and Node.js ORM for Oracle, Postgres, MySQL, MariaDB, SQLite and SQL Server, and more.

Depending on the language you are planning to use you can find an ORM that will work for you.

Thanks for reading.
First month as a DPI Apprentice
Tags: productivity, beginners, webdev, programming
Published: 2023-10-23 15:15:00

**Some highlights and status update from my first month at DPI:**

- Met with companies and improved business skills. Some companies include: SAP, HCSC and All State.

- Completed learning modules; now on the final project. Learned Ruby, Ajax, JS and database management.

- Enjoyed time with awesome staff and peers. Excited to see what my future holds at DPI!
Manual Testing
Published: 2023-10-23 14:59:52


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

Manual Testing is the Software Testing Technique that is carried out using the functions and features of an application. In manual testing, a tester carries out tests on the software by following a set of predefined test cases. In this testing, testers make test cases for the codes and test the software and give the final report about that software. Manual testing is time-consuming testing because it is done by humans and there is a chance of human errors.

Every new application must be manually tested before its testing can be automated. Manual Testing requires more effort rather than automation testing but is necessary to check automation feasibility. There is no requirement for knowledge of any testing tool in manual testing.

Manual testing is requires a large number of human resources. It is very time consuming.

Using the manual testing we test the telegram mobile app.

first the software testing life cycle(STLC) is Requirement analysis, test planning, test designing, test execution, defect and bug reporting and test closure/signoff.

So we follow the life cycle method to test the software. first analysis the app requirement chat, call and etc...next step to planning the test cases for the app testing .what to do the test and how to work the test. next step is to design the test. designing the test cases for the app testing. Execute the test cases this is test execution. And identify the any issues to reporting the bug this is the defect and bug reporting. Finally all steps are close the test is closure or signoff.