teleren/devto huggingface dataset:
Organization repo + hobby plan in Vercel
Tags: deployment, frontend
Published: 2024-05-03 07:40:49

Vercel doesn't support deploying an organization repository for free, you will need some workaround if you want to stay on the hobby plan. In this post, I'll talk how you can do it with github actions. I hope the pricing boundary doesn't stop student developers from building and shipping new ideas.

This post is entirely inspired by [A github gist tutorial](https://gist.github.com/ky28059/1c9af929a9030105da8cf00006b50484).

## Requirements

- This guideline assumes that you're working on a Next.js project.
- Be careful not to leak vercel keys and tokens.

## How to 

- Install vercel cli by running the following command:

```
yarn global add vercel
```

- Check if vercel cil has been successfully installed.

```
vercel --version
```

- Run vercel cli. You'll get some inquiries on how to set up your deployment. **Make sure to deploy to your [username].**

```
vercel
```

- Visit https://vercel.com/account/tokens and generate a token. **Don't leak the generated token anywhere else.**.

![Vercel website - create tokens](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdy9xepmgqxmlzv6d645.png)

- Write github workflow to run github actions. vercel-action[https://github.com/amondnet/vercel-action] will help you deploy to your hobby plan project.

.github/workflows/vercel-merge.yml
```yml
# vercel-merge.yml
name: Deploy to vercel on merge
on:
  push:
    branches:
      - main
jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: amondnet/vercel-action@v25
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
          vercel-args: "--prod"
          vercel-org-id: ${{ secrets.ORG_ID}}
          vercel-project-id: ${{ secrets.PROJECT_ID}}
```
This workflow deploys to vercel on merging to main.

- .github/workflows/vercel-pull-requst.yml

```yml
name: Create vercel preview URL on pull request
on:
  pull_request:
    branches: [main, master]
jobs:
  build_and_deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: amondnet/vercel-action@v25
        id: vercel-deploy
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
          vercel-org-id: ${{ secrets.ORG_ID}}
          vercel-project-id: ${{ secrets.PROJECT_ID}}
      - name: preview-url
        run: |
          echo ${{ steps.vercel-deploy.outputs.preview-url }}
```
This workflow creates a preview on pull request.

- VERCEL_TOKEN is the token you created on the vercel website.
- You can find ORG_ID, PROJECT_ID in `package.json`. They should be created when you run `vercel` command.

Happy Coding!
software testing
Published: 2024-05-03 07:37:01


Software testing is the process of evaluating and verifying that a software product or application does what it's supposed to do. The benefits of good testing include preventing bugs and improving performance. Verify and validate application quality to ensure it meets user requirements.

software testing is the process of assessing the functionality of a software program. The process checks for errors and gapes and whether the outcome of the application desired expectations before the software is installed and goes live.
system software
program software
application software
the three types are software testing.

Application software:
Mobile based application. Use all your web application. front and code programming language.Ex:f12,google, you can see application you need correspond back and code language also an application mode. Ex: python, java
Core Components of DevOps Services
Tags: devops, webdev, javascript, programming
Published: 2024-05-03 07:32:33

DevOps services typically comprise several core components aimed at streamlining software development, deployment, and operation processes. These components include:

**Continuous Integration (CI): **This involves the automated integration of code changes into a shared repository multiple times a day. CI ensures that each code change is tested and verified, reducing integration issues.

**Continuous Delivery (CD):** CD extends CI by automating the deployment process, enabling the rapid and reliable release of code changes into production or staging environments.

**Infrastructure as Code (IaC):** IaC involves managing and provisioning computing infrastructure through machine-readable definition files, such as templates or scripts. This approach ensures consistency and reproducibility in infrastructure deployment.

**Monitoring and Logging:** DevOps emphasizes the importance of monitoring application performance and logging relevant data for analysis. This helps in identifying issues, troubleshooting problems, and optimizing system performance.

**Configuration Management:** This involves automating the configuration and management of infrastructure components, ensuring consistency across environments and facilitating scalability.

**Collaboration Tools:** DevOps relies heavily on collaboration among development, operations, and other stakeholders. Collaboration tools such as issue trackers, version control systems, and communication platforms facilitate seamless cooperation and communication.

**Containerization and Orchestration:** Containerization technologies like Docker enable the packaging of applications and their dependencies into standardized units for easy deployment. Orchestration tools like Kubernetes automate the management and scaling of containerized applications.

**Automated Testing:** Automated testing frameworks and tools help ensure the reliability and quality of software by automatically running tests on code changes. This includes unit tests, integration tests, and end-to-end tests.

**Security Practices:** DevOps incorporates security practices throughout the software development lifecycle, including code analysis, vulnerability scanning, and access control measures.

**Feedback Loops:** DevOps emphasizes the importance of feedback loops to continuously improve processes and outcomes. Feedback mechanisms enable teams to gather insights from users, stakeholders, and system metrics, facilitating iterative refinement and optimization.

By integrating these core components into their workflows, organizations can achieve faster delivery cycles, improved reliability, and enhanced collaboration across development and operations teams.

**Visit Website: ** [Understanding the Core Components of DevOps](https://bytesfarms.tumblr.com/post/749438970261372928/understanding-the-core-components-of-devops)
What Are the Different Levels Of Cloud Computing?
Published: 2024-05-03 07:28:07

Cloud computing generally encompasses three primary service models: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS). These levels differ in terms of the level of abstraction they provide to users, with each level offering a different degree of control and management responsibility. Businesses often engage both **[cloud consulting companies](https://sapizon.com/cloud-services/ )** and cloud service providers to plan, implement, and manage their cloud infrastructure effectively.


Here’s a brief overview:

1.Infrastructure as a Service (IaaS):

In IaaS, cloud providers offer virtualized computing resources over the internet. These resources typically include virtual machines, storage, and networking capabilities.
Users have control over the operating systems, applications, and development frameworks running on the infrastructure, but they are responsible for managing these resources, including installing and maintaining software.
Example providers: Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP).
2. Platform as a Service (PaaS):

PaaS provides a platform allowing customers to develop, run, and manage applications without dealing with the underlying infrastructure.
It typically includes middleware, development tools, database management systems, and other services needed to support the complete lifecycle of building and delivering web applications and services.
Users focus on developing and deploying their applications, while the PaaS provider manages the underlying infrastructure and runtime environments.
Example providers: Heroku, Microsoft Azure App Service, Google App Engine.
3. Software as a Service (SaaS):

SaaS delivers software applications over the internet on a subscription basis, eliminating the need for users to install, maintain, and upgrade software locally.
Applications are accessed via a web browser or API, and users only need an internet connection and a compatible device to use them.
SaaS providers handle all aspects of software maintenance, including updates, security patches, and data backups.
Example providers: Salesforce, Microsoft Office 365, Google Workspace.
Cloud consulting companies offer services to help businesses navigate their cloud journey. They provide expertise in cloud architecture, migration strategies, security, compliance, cost optimization, and ongoing management. Some prominent cloud consulting companies include Accenture, Deloitte, Capgemini, and Cloud reach.

**[Cloud service providers](https://sapizon.com/cloud-services/)**, on the other hand, are the companies that offer the actual cloud computing resources and services, such as IaaS, PaaS, and SaaS. Examples include AWS, Azure, Google Cloud, IBM Cloud, and Oracle Cloud.

Businesses often engage both cloud consulting companies and cloud service providers to plan, implement, and manage their cloud infrastructure effectively.
Online iGaming Software provider - Brino Games
Tags: weeklyretro
Published: 2024-05-03 07:17:04

👋👋👋👋
We have a wide variety of **[casino and card games](https://www.brinogames.com/)** that can be played on any platform or device you want. They are suitable for people of all ages and thus cater to the requirements of all. With huge bonuses, creative UI/UX design and power-packed features; our games can be an instant stress reliever for you. Plus, you get a chance to make a fortune via your gaming skills and knowledge.
How to add update, and delete data in peewee Database Python
Tags: python, database, orm, webdev
Published: 2024-05-03 07:05:51

## Hi 🙂🖐

In this post, I will share with you How to add update, and delete data in peewee Database Python.

## What is peewee
Peewee is a simple and small ORM. It has few (but expressive) concepts, making it easy to learn and intuitive to use.

# Install peewee
```
pip install peewee
```

# Create User Model
```python
from peewee import SqliteDatabase, Model, CharField, IntegerField, UUIDField
from uuid import uuid4

# create database
db = SqliteDatabase('database.db')

# create user model
class User(Model):
    name = CharField(max_length=10)
    age = IntegerField()
    userId = UUIDField(primary_key=True)

    class Meta:
        database = db

# connect to db
db.connect()

# create users table 
db.create_tables([User])

db.commit()
```

## Add new data into table
```python
user = User.create(name = 'test4', age = 10, userId = uuid4())
user.save()
```

## Update user name
```python
# Update user data
User.update(name = '123456').where(
    User.userId == '639bbd66-b0e2-4259-b751-1ee2c7edf1d1'
).execute()


for user in User.select():
    print(user.name, user.userId)
```

## Delete user data
```python
User.delete_by_id(pk = '639bbd66-b0e2-4259-b751-1ee2c7edf1d1')
```

**Note**
`pk` == `primary_key`


## Delete user by name
```python
User.delete().where(User.name == 'test2').execute()
```
Build a site in a low-code framework with a pixel-free studio
Tags: website, css, html, programming
Published: 2024-05-03 06:51:32

The alternative of Webflow and others is that u want to build a powerful app and website via low-code builders. 
Pixel free studio launched in the market that offers low-code builders for coders and programmers. best for developers to develop sites and sell it on high rates here the link

Visit here: [Pixelfreestudio](https://pixelfreestudio.com/?rl=vc-Marketing)
Generate PRO-Code in 6 programming languages. Create your own designs or import your Figma projects and convert them to HTML5, VUE, React, Angular and C#.

Convert your designs quickly and easily to create websites and apps using our revolutionary,
code generating tool.
Say Goodbye to Downloads: Enjoying Free Games Online on Playzen.io
Tags: gamedev, onlinegames, games, freeonlinegames
Published: 2024-05-03 06:47:16



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

In a world where technology is constantly evolving, the way we play games has also evolved. Gone are the days of waiting for lengthy downloads to enjoy a new game - now, you can simply hop online and start playing instantly. And one platform that is making this experience even better is Playzen.io.

**What is Playzen.io?**

Playzen.io is an innovative [online gaming](https://playzen.io/) platform that offers a wide range of free games that you can play directly in your web browser. With no downloads or installations required, you can enjoy hours of fun without any hassle.

**Why Playzen.io?**

**1. Instant Access**

Say goodbye to the frustration of waiting for downloads to finish. With Playzen.io, you can start playing your favorite games instantly. Whether you have a few minutes to spare or want to spend hours gaming, you can jump right in without any delays.

**2. Variety of Games**

From action-packed shooters to brain-teasing puzzles, Playzen.io offers a diverse selection of games to cater to every gaming preference. Whether you're a hardcore gamer or just looking to unwind, there's something for everyone on Playzen.io.

**3. Free to Play**

One of the best things about Playzen.io is that all the games are completely free to play. You don't have to worry about spending a fortune on expensive gaming consoles or subscriptions - simply visit the website and start playing for free.

**4. No Downloads, No Space Required**

Tired of cluttering your device with game downloads? With Playzen.io, you can enjoy a clutter-free gaming experience. Since the games are played directly in your browser, you don't need to worry about taking up precious storage space on your device.

**How to Get Started
**
Getting started on Playzen.io is quick and easy. Simply visit the website, browse through the selection of games.
study develop mobile of h5
Published: 2024-05-03 06:37:57

1. why is layoutViewport？

```
   var layoutViewportWidth = document.documentElement.clientWidth;
```
layoutViewportWidth is width of layoutViewport;OfCause you can regard　is as the width of htmlElement;

2.`window.screen.width　`is  the device screen of width in logical pixel;

3.visualViewPort that you can regard it as eyes; if visualViewPort is big and will see more element; 

```
   var visualViewportWidth = window.visualViewport.width;
   var scale = window.visualViewport.scale
```
if scale == 1 ;visualViewportWidth equal the the width of brower in logical pixel;
4.

```
 var innerWidth = window.innerWidth;
```
innerWidth is wdith of the biggest of element;

sunch as 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/coye8sukwxwswbx97nj0.png)
even　though　the body is 985px but the div width the biggest width  is in body; os the innerwidth is 1200px;
"Used a jailbroken ChatGPT?: Share your story. 😲"
Tags: ai, chatgpt, programming, promptengineering
Published: 2024-05-03 06:33:45

## Have you tried using a jailbroken ChatGPT? 


![GPT -gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxj4ytx0mqt1h6yw71i5.gif)



We want to hear from you! Tell us the most surprising things you've found. Your story could help others!
My First Mobile Game With Flutter
Tags: gamedev, flutter, programming
Published: 2024-05-03 06:33:23

In my life, I've had extensive experience working as a volunteer and leading a volunteer organization. I have organized numerous social activities, including food drives for the homeless, emergency aid for victims of natural disasters, cultural events, and political actions. I have experienced many consequences of this work, from emotional burnout to political oppression and arrests. Thus, the idea emerged in my mind to create a simple mobile clicker game that narrates a volunteer's journey from an activist to a world organization leader. I want to acquaint players with aspects of a volunteer's life, introduce them to tools, prepare them for difficulties, and inspire them to pursue their own dreams of changing the world.

An important aspect of the game is the opportunity to understand the workings of international organizations like the UN, along with the game's communication platform (multiplayer), where players can create their own petitions and collect signatures from other players. This is the point where the game can be translated into reality.

So, I started developing the game with Flutter. It was my first experience as a Flutter developer. I worked on it for several hours a day, beyond my usual working hours, for a month.

{% embed https://youtu.be/X1t6KwVq5A4 %}

This isn't the final version of the game, but it's an engine created by me to make the full game, and I am going to finish it in the near future.

Be that as it may, I've gained good experience in Flutter development and added a new programming language to my knowledge.

I've submitted it [to the Global Gamers Challenge](https://devpost.com/software/one-click-one-world?ref_content=user-portfolio&ref_feature=in_progress), so wish me good luck.

Peace and love to everyone!
🚀 Exploring the Integration of Django with Machine Learning Models for Predictive Analytics in Web Applications
Published: 2024-05-03 06:31:37

Hey everyone!

As a Django developer and Python enthusiast, I've been intrigued by the possibilities of integrating machine learning into web development to enhance predictive analytics capabilities. In this post, let's dive into how we can seamlessly combine Django with machine learning models to bring powerful predictive features to our web applications.

1. **Understanding the Landscape:**
To begin, let's take a quick look at the current landscape of web development and machine learning integration. With the rise of AI-driven applications, incorporating machine learning into web projects has become increasingly common, offering personalized user experiences and smarter decision-making capabilities.

2. **Leveraging Django for Backend Infrastructure:**
Django provides a robust framework for building web applications, offering features such as ORM, authentication, and URL routing out of the box. We can leverage Django's capabilities to create a solid foundation for our machine learning-powered features.

3. **Integrating Machine Learning Models:**
Now, let's explore how we can seamlessly integrate machine learning models into our Django application. For example, we could use libraries like scikit-learn or TensorFlow to develop predictive models for tasks such as recommendation systems, sentiment analysis, or user behavior prediction.

4. **Serving Predictions via Django APIs:**
Once we've trained our machine learning models, we can expose them as APIs using Django's REST framework. This allows our frontend to communicate with the backend and fetch predictions in real-time, enabling dynamic and interactive user experiences.

5. **Example Use Cases:**
Here are a few examples of how we can incorporate Django with machine learning:

Building a movie recommendation system based on user preferences.
Analyzing customer feedback to predict satisfaction levels.
Personalizing content recommendations based on user behavior.
6. Best Practices and Considerations:
Finally, it's essential to consider best practices when integrating machine learning into web applications. This includes aspects such as model scalability, data privacy, and model retraining to ensure optimal performance over time.

In conclusion, by combining Django's powerful backend capabilities with the predictive prowess of machine learning, we can create web applications that are not only dynamic and responsive but also intelligent and personalized to the needs of our users.

I'd love to hear your thoughts and experiences on integrating Django with machine learning in the comments below!

_Happy coding! 💻✨_
How to un-trash Obsidian attachments
Tags: obsidian, shell
Published: 2024-05-03 06:31:00

---
title: How to un-trash Obsidian attachments
published: true
description: Not sure why I need this, but I need this
tags: Obsidian, Shell
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irgyejm5ltwvzod162n0.jpg
published_at: 2024-05-03 06:31 +0000
---

For some reason I'm finding following files in my Obsidian vault attachment folder:

```
Attachment/.trashed-1715241915-BB_LIMBA4.webp
Attachment/.trashed-1716527209-2018 Global shipping cargo by weight.jpeg
Attachment/.trashed-1716527209-7f8c7729e62a9d0703b8ad3ce175a924-493788641.jpg
Attachment/.trashed-1716527209-Drivers of forest loss in the Brazilian Amazon.png
```

Those are legitimate files that _should not_ be trashed. It might be a bug in Obsidian itself or just me doing something silly.

Either way if you need to restore those files, then following one-liner might help:

```sh
rename -n  "s/.trashed-\d*-//g" ./Attachment/.*
```

Explanation of what is happening:

- Assumption is that your working directory is inside your Obsidian vault.
- Assumption is that your attachments are all stored in `./Attachment` folder.
- The `-n` switch will do a _dry run_, so nothing gets renamed _yet_, just prints out what _would_ happen. Remove it once you are sure this is what you want.
- The `s/.trashed-\d*-//g` part basically says "find part of the name that goes `.trashed`, dash, any amount of numbers, dash again. And replace all those characters with nothing.

## Prerequisites

On OSX you need to install the `rename` tool first:

```sh
brew install rename
```

---

Header image generated by ChatGPTv4 via prompt: Image of Comic trash eating computer files --ar 100:42
How to boost your SQL Coding Efficiency in a Multi-Database Environment
Tags: sql, database, coding
Published: 2024-05-03 06:25:04

SQL coding can be a Wild West in multi-database environments.

Consider Ivana who has her hands full working in a tech startup. She’s the go-to person for all things database-related. Her company is using WordPress for their blog. So, MySQL will be the first thing in mind. Then, they acquired a SQL Server-based accounting package for their money-related stuff. Finally, they’re using a PostgreSQL-based CRM for their product sales.

Imagine coding from all these platforms for custom reporting, analysis, and more. You could see Ivana scratching her head during a stressful day. The chaos of the wrong syntax makes her pull her hair when the engine throws an error. How about using GETDATE() in PostgreSQL? And CREATE TEMPORARY TABLE in SQL Server? It never ends there.

She’s mixing stuff from different SQL flavors, and it’s making her crazy. Her integration job just can’t be easier.

So, she needs to be an expert “speaking” all these SQL languages to be productive.

Did you find yourself in the same boat?

You’re not alone. According to the State of the Database Landscape 2024 survey, a whopping 79% of organizations are now rocking two or more database platforms. That’s a big leap from 62% back in 2000!

So, it’s more crucial than ever to embrace multi-database environments. SQL coding is one part of it. And becoming efficient in coding is now a goal for database professionals to stay in the game.

But fear not. This post will give you what you need to up your game in SQL coding: https://www.toolify.ai/ai-news/how-to-boost-your-sql-coding-efficiency-in-a-multidatabase-environment-3146620