teleren/devto huggingface dataset:
PartyRock With Leftovers!
Tags: aws, cloud, genai, partyrockplayground
Published: 2023-11-19 17:53:54

## As an early Beta tester for the [PartyRock ](https://partyrock.aws/), an Amazon Bedrock Playground, "Everyone can build AI apps with PartyRock, an Amazon Bedrock Playground" 
 If you are like me, you've probably been playing around with natural language processing and generative AI.  The opportunity to preview the PartyRock Playground was a lot of fun, because it made generating an app built on top of a large language model, incredibly easy.

After a long day of work, you need to make dinner for the family, if you don’t have something ready-made, you search through ingredients and try to come up with a recipe.  

## When you’re all out of ideas, leverage #partyrockplayground to build an app to generate recipes for you. 
 
This took me less than 3 minutes once I had the idea to feed ingredients and ask for a recipe.  Sure, there are websites that can do this for you.  The websites I've used in the past provided pretty involved recipes, and I was too tired for that level of effort.  PartyRock was so easy to use, I had simple recipes in under 5 minutes.  
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhfr1ww8yn2lvli2w036.jpg)

For my first app, I was just so tired of trying to figure out what to make for dinner, and the ready-made food started to taste like cardboard after a bit.  I usually don't have all the ingredients to support my existing recipe books, so with just a few ingredients, my "make a meal" app gave me yummy ideas for food.   

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

I have many plans for my next round of apps including a kids toy recommendation based on age.  (Just in time for the holiday shopping season).  

I was thrilled to be invited to participate in the Beta, and as soon as the PartyRock Playground was launched, I had my recipe app running in under 5 minutes.  I found the interface very intuitive, the longest time I spent was figuring out which app to create first.  I am eagerly awaiting future updates and features!
Where can i found projects ideas for my upcoming projects?
Tags: web3
Published: 2023-11-19 17:09:48

Hello everyone , 
I have just finished my journey of learning next.js framework and it's time for practice, practice and practice but i found it so difficult to get an idea for a website to build , also it's not just the idea it's the other things (UI , data ) and so on , so if anyone can help to get beautiful ideas for projects with the other things (UI , database data) so i can practice and expand my knowledge in next.js i would be grateful for that :(
Creating a Contact Form: Key Learnings
Published: 2023-11-19 17:03:20

#### 1. Form Structure:

   - **Action Attribute:**
     - Use the `action` attribute to specify the URL where the form data should be submitted. Example: `action="some URL"`.

   - **Method Attribute:**
     - Set the `method` attribute to "post" to send form data securely.

   - **Button Type:**
     - The default button type is "submit." Placing it inside the form will trigger the `onSubmit` event of the `<form>`.

   - **Input Naming:**
     - Passing a `name` attribute in the input tags establishes the key in the form data.

   Example:
   ```html
   <form action="some URL" method="post" onSubmit={onSubmit}>
       <label htmlFor="name">Name:</label>
       <input type="text" id="name" name="name">
       
       <label htmlFor="email">Email:</label>
       <input type="email" id="email" name="email">

       <button type="submit">Submit</button>
   </form>
   ```

#### 2. Label Accessibility:

   - **HTML for Attribute:**
     - Use the `for` attribute in the `<label>` tag to associate it with a specific input using the `id` of that input.

   Example:
   ```html
   <label htmlFor="username">Username:</label>
   <input type="text" id="username" name="username">
   ```

   This ensures improved accessibility and helps screen readers understand the relationship between labels and inputs.
About Me
Published: 2023-11-19 16:54:27

Hello! I'm Siar A Ghaznawi, an electrical engineering graduate from York University with a passion for software engineering. My journey has equipped me with a strong foundation in problem-solving, analytical thinking, and project management. Now, I'm excited to apply these skills to the dynamic world of software development.
Education

    Bachelor of Engineering in Electrical Engineering
        York University, June 2019

Technical Skills

    Programming Languages:
        Python, Java, C++
    Web Development:
        HTML, CSS, JavaScript
        Frontend Frameworks (e.g., Angular)
        Backend Frameworks (e.g., Springboot, Express)
    Database Management:
        SQL, MongoDB
    Version Control:
        Git, GitHub
    Tools and Technologies:
        Visual Studio Code, Eclipse
        Docker, Jenkins
        Agile/Scrum methodologies

Projects
1. IoT Smart Home System (Academic Project)

    Description:
        Implemented an IoT-based smart home system using Arduino and Raspberry Pi.
        Integrated sensors to monitor temperature, humidity, and motion.
        Developed a web interface for users to control devices remotely.

2. E-commerce Website (Personal Project)

    Description:
        Designed and implemented a full-stack e-commerce platform.
        Utilized React for the frontend and Node.js/Express for the backend.
        Integrated a MongoDB database for data storage.

3. Traffic Monitoring System (Internship Project)

    Description:
        Collaborated on a team project to develop a real-time traffic monitoring system.
        Implemented image processing algorithms for vehicle detection using OpenCV.
        Integrated the system with traffic cameras and generated analytics reports.

Certifications

    Post Graduate Program in Full Stack Web Development
        Caltech CTME, Sep 2023

Relevant Coursework

    Discrete Math
    Operating System Fundamentals 
Computer Organization
Software Tools
Object-Oriented Programming in Java
Data Structure

Blog

    Maintained a blog documenting my learning journey and experiences in transitioning from electrical engineering to software engineering. [Blog Link]

GitHub Repository

    GitHub Profile
    Repositories showcasing coding projects, scripts, and collaborative efforts.

Contact Information

    Email: siar.wafa@gmail.com
    LinkedIn: LinkedIn Profile
    GitHub: @sghaznawi
Part-3: System of Equations
Tags: machinelearning, linearalgebra
Published: 2023-11-19 16:46:11

**System of Equations**

We are going to understand what a linear equation is and what a system of linear equations is.

Let's see a glimpse of linear and non-linear equations. 

Linear Equation:
a + b = 10
5a + 2b = 20
9.5a + 36.6b - 3c = 155.9

In a linear equation, a, b, c were allowed only to have numbers or the scalars attached to them. 

Non-Linear Equation:
It can be square (i.e: a^2 + b^2 = 10)
Can have sin, cos, tan, arc tan { i.e: sin( a + c^10 = 18)}
Can have power ( i.e: 5^a - 2^b = 0)
and so on!

Now, Suppose:

_System-1:  _ 
a +b = 10
a +2b = 12
Solving this two equation, it gives unique solution. So, it's a complete system and non-singular.

_System-2_ 
a + b = 10
2a + 2b = 20

Solving these two equations gives infinity many solutions because the two equations are exactly the same.
As in, we can consider it as:
 a = 8,    7,    6
 b = 2,    3,    4
So, it's redundant and singular.

_System-3_
a + b = 10
2a + 2b = 24

No solution here because two equations contradict each other.
The Ultimate Guide to Simple and Delicious Everyday Dishes
Published: 2023-11-19 16:27:51

## Introducing the Ultimate Guide to Everyday Dishes

See or not see, determine whether you feel interesting or bored [every day dishes](https://malacasa.com/blogs/news/what-is-the-best-material-for-everyday-dishes?utm_source=dev_to&utm_medium=rankking). 

Have you ever found yourself in a cooking rut, unsure of what to make for dinner? Fret not, for the Ultimate Guide to Simple and Delicious Everyday Dishes is here to save the day. This comprehensive guide is designed to help novice and experienced cooks alike, providing a wide variety of easy-to-follow recipes for breakfast, lunch, and dinner.

## The Benefits of Everyday Dishes

At its core, the Ultimate Guide to Simple and Delicious Everyday Dishes is all about practicality. With busy schedules and limited time, it can be tempting to resort to ordering takeout or microwaving frozen meals. However, by incorporating a few simple recipes into your regular routine, you can enjoy a healthier, more fulfilling lifestyle.

  * Save money: Cooking at home is significantly less expensive than dining out or ordering in.
  * Better nutrition: When you cook your own meals, you have more control over the ingredients and the nutritional value of your food.
  * Practice new skills: Cooking is a valuable life skill, and everyday dishes are a great way to practice and refine your technique.



## How to Use the Guide

The Ultimate Guide to Simple and Delicious Everyday Dishes is organized by meal, with options for breakfast, lunch, and dinner. Each recipe includes a list of ingredients, clear instructions, and estimated prep and cook times.

Feel free to modify the recipes to suit your tastes or dietary preferences. The best part about everyday dishes is their adaptability – don't be afraid to experiment!

## Elevating Everyday Dishes

While most of the recipes in the Ultimate Guide to Simple and Delicious Everyday Dishes are straightforward, there are plenty of ways to elevate them and make them feel special. Here are a few ideas:

## References

  * [every day dishes](https://ngmedia.org.au/?URL=https://malacasa.com/blogs/news/what-is-the-best-material-for-everyday-dishes "every day dishes")



  1. Use high-quality ingredients: Splurging on fresh herbs, organic produce, or artisanal cheeses can make a huge difference in the flavor of your dishes.
  2. Add a personal touch: Infuse your dishes with your own personality by incorporating seasonal ingredients, experimenting with different spices, or adding a pop of color with fresh garnishes.
  3. Presentation is key: Take a few extra minutes to plate your dishes in a visually pleasing manner – it can make a world of difference in how the dish is perceived.



### Additional Resources

  * [Food Network Quick and Easy Dinners](https://www.foodnetwork.com/recipes/photos/quick-and-easy-dinners)
  * [Delish Everyday Menus](https://www.delish.com/cooking/menus/)
  * [Allrecipes Everyday Cooking](https://www.allrecipes.com/recipes/)
Navigating React.js SEO Challenges: A Case Study with CoderKit
Tags: webdev, javascript, react
Published: 2023-11-19 16:19:19

### Introduction:
Embarking on the journey of launching CoderKit, a React.js application, brought with it the daunting challenge of Search Engine Optimization (SEO). This blog recounts the SEO hurdles faced and the inventive solutions employed to ensure visibility on Google.

### The SEO Conundrum:
Post-launch, the realization struck that the application wasn't making its way to Google search results. Traditional solutions pointed toward static site generators or frameworks like Next.js, but migrating the project wasn't an option. Delving into SEO implementation nuances and website essentials, initial efforts to update meta descriptions in index.html proved futile.

### Discovering the Power of Sitemap.xml:
A breakthrough emerged with the revelation of the significance of sitemap.xml. Creating a script to automatically generate this file based on known routes, devoid of dynamic backend-driven URLs, became pivotal. Configuring the Search Console to index these pages marked progress, but a notification soon arrived—indexing failure.

### Addressing Redirection Woes:
Upon inspection, the issue lay in redirection. React applications default to landing on index.html, hindering search engines from indexing individual pages. An innovative solution materialized: generating HTML pages for each known route during the pre-build phase. These pages mirrored index.html structure but contained distinct meta tags and content pulled from the route config.

### Making Redirection Seamless:
Concerns about server-level configurations were assuaged by platforms like Netlify, which inherently checked for file name matches with requested URLs. If found, they returned the file; otherwise, they defaulted to redirecting requests to index.html. This seamless redirection is crucial for React applications, ensuring that custom error components function effectively.

### Testing and Triumph:
With all configurations updated in the Search Console, the real test began. After a day, a notification arrived—success! All pages were now indexed. However, the ranking was modest due to the application's novelty. A search appended with "coderkit" yielded optimal results, but there was room for improvement.

### Conclusion:
This SEO journey with CoderKit reflects the iterative and adaptive nature of problem-solving in the tech realm. While the current approach has yielded positive results, the ever-evolving landscape of SEO beckons exploration. Feedback and alternative approaches are welcomed. Check out [CoderKit](https://coderkit.dev) to witness these strategies in action.
Why Every Man Needs a Pair of Linen Pants in His Wardrobe
Published: 2023-11-19 16:02:19

## Introduction

From its origins to its current state, it has undergone many significant changes [linen pants mens](https://coofandy.com/collections/mens-linen-pants?utm_source=dev_to&utm_medium=rankking). 

When it comes to men's fashion, there are certain items that are considered essential. A well-tailored suit, a classic white shirt, and a pair of leather shoes are just a few examples. However, one item that is often overlooked but should not be is a pair of linen pants. In this article, we will explore why every man needs a pair of linen pants in his wardrobe.

## Comfort and Breathability

Linen is a lightweight and breathable fabric that is perfect for warmer weather. Unlike other fabrics, linen allows air to circulate around the body, keeping you cool and comfortable. This makes linen pants an ideal choice for summer events such as weddings, garden parties, and outdoor concerts.

## Versatility

One of the great things about linen pants is their versatility. They can be dressed up or down depending on the occasion. For a more formal look, pair them with a blazer and dress shoes. For a more casual look, wear them with a t-shirt and sneakers. Linen pants also come in a variety of colors, so you can choose a pair that complements your existing wardrobe.

## Durability

Despite its lightweight feel, linen is a durable fabric that can withstand wear and tear. This means that a pair of linen pants will last you for years to come, making them a worthwhile investment. Additionally, linen is easy to care for and can be machine washed and dried.

## Conclusion

In conclusion, every man should have a pair of linen pants in his wardrobe. They are comfortable, versatile, and durable, making them a great choice for any occasion. Whether you're attending a summer wedding or just running errands on the weekend, linen pants are a stylish and practical choice.

## References

  * [linen pants mens](https://illinoismatmen.com/adserver/www/delivery/ck.php?ct=1&oaparams=2__bannerid=29__zoneid=9__cb=0a4f40b89c__oadest=https://coofandy.com/collections/mens-linen-pants "linen pants mens")



## Related Websites

  * [Brooks Brothers](https://www.brooksbrothers.com/)
  * [J.Crew](https://www.jcrew.com/)
  * [Mr. Porter](https://www.mrporter.com/)
JavaScript is amazing trash. Rust too.
Published: 2023-11-30 19:52:38

---
title: JavaScript is amazing trash. Rust too.
published: true
date: 2023-11-19 15:38:40 UTC
tags: 
canonical_url: https://jak2k.schwanenberg.name/post/javascript-trash-rust/
---

JavaScript is amazing trash. Rust too. Let me explain. [Read more...](https://jak2k.schwanenberg.name/post/javascript-trash-rust/)
C# - Init-Only Setters for Immutable Properties
Tags: csharp, programming, beginners, tutorial
Published: 2023-11-19 15:30:00

C# has init-only setters, which provide a more concise and expressive way to create immutable properties. They are particularly useful when creating objects with properties that can only be set during object initialization and remain immutable afterward.

Here’s how you can use init-only setters:

1. **Declare Properties with `init` Accessor:**
   Use the `init` keyword instead of `set` for properties. This makes the property writable only at the time of object initialization.

2. **Object Initialization with Object Initializers:**
   You can still use object initializers, but the properties become read-only after the object is fully constructed.

Example:

```csharp
public class Product
{
    public string Name { get; init; }
    public decimal Price { get; init; }
}

public static void Main()
{
    var product = new Product
    {
        Name = "Coffee Mug",
        Price = 9.99M
    };

    // product.Name = "Tea Cup"; // This line would cause a compile-time error

    Console.WriteLine($"Product: {product.Name}, Price: {product.Price}");
}
```

Init-only setters are a great way to ensure immutability in your objects, enhancing the robustness and predictability of your code. This feature is especially useful for data models in applications where immutability is desired, such as in multi-threaded scenarios or when working with data transfer objects in web applications.
WhatsApp Mods
Tags: whatsapp, download, webdev, javascript
Published: 2023-11-19 15:24:02

WhatsApp Mods are customized versions of the popular messaging app, WhatsApp, offering users additional features and enhanced customization options not found in the official version. These modifications, often developed by third-party developers, can include a variety of functionalities such as advanced privacy settings, diverse themes, increased file-sharing capabilities, and unique user interfaces.

[WhatsApp Mods](https://apkwa.net/) provide users with a more personalized and feature-rich messaging experience, allowing them to tailor the app to their preferences. While these mods can offer exciting enhancements, users should exercise caution, as they may involve security risks or violate WhatsApp's terms of service.

It's essential for users to stay informed about the source of the mod and any potential implications, as the official WhatsApp application prioritizes security and data privacy. WhatsApp Mods cater to those seeking additional flexibility and features beyond the official app, but users should weigh the benefits against potential risks before opting for such modifications.
Running (deploying) a Flask app in the cloud, in record time 🚀⏱️
Tags: python, flask, cloud, api
Published: 2023-11-19 15:11:12

This tutorial explains how to run a containerised Flask application in the cloud ([Choreo](https://wso2.com/choreo/)) within a record time.

Link to the tutorial is available in [here](https://medium.com/@slahiruc/getting-a-flask-app-to-the-cloud-in-record-time-%EF%B8%8F-83e5a14ab7af).

**All the required sample code snippets are available in the article.** 

Within **few clicks** anyone can deploy a containerised Flask application to the cloud considering above platform. Additional to that, below features are by default available and you can enhance your Flask application's performance, availability, resiliency, security.

- Applying security for endpoint resources
- Rate-limit applying for the API resources
- Obtaining insights relevant to the API invocations
- Allocating memory or CPU for the containerised application
- Utilising health probes

Additional to the above many more features are available. Feel free to explore all of them since all those are available in **FREE** tier.
Using Firestore with ERB view and table
Published: 2023-11-19 14:53:52

Here is a simple example for querying data from Firestore to be displayed in a table. Ensure that you have Firestore properly installed and configured.

1. Define a route that gets the documents (in this example, meal_events) from Firestore and renders a view:

```
require 'sinatra'
require 'firebase'

get '/meal_events' do
  base_uri = 'https://<your-firebase-app>.firebaseio.com/'
  firebase = Firebase::Client.new(base_uri)
  response = firebase.get('meal_events')
  @meal_events = response.body

  erb :meal_events
end
```

In this handler, we’re using the firebase gem to connect to Firestore, then we’re fetching the meal events and storing them in the instance variable @meal_events. This instance variable will be available in our view.

2. Next, in your views/meal_events.erb file, you can iterate over @meal_events to generate your table rows:

```
<table>
     <thead>...</thead>
     <tbody>
          <% @meal_events.each do |meal_event| %>
               <tr>
                    <td><%= meal_event.fetch('name') %></td>
                    <td><%= meal_event.fetch('parent_meal_event') %></td>
                    <td><%= meal_event.fetch('min_foods') %></td>
                    <td><%= meal_event.fetch('max_foods') %></td>
               </tr>
          <% end %>
     </tbody>
</table>
```

This will create a new table row for each meal event, with the table data filled in from the meal event.

Remember to replace `<your-firebase-app>` with your actual Firebase app’s name!
Using Firestore in a Sinatra Web App
Published: 2023-11-19 14:27:02

Firestore is a NoSql DB created by Google that allows for simple querying. Data is stored as documents within collections. For example, "restaurants" can be a collection and "McDonald's" can be a document with id "mcdonaldsid" and name "McDonald's". To install Firestore, run

```
gem 'google-cloud-firestore'
```

and make sure to add

```
'google-cloud-firestore'
```

to your Gemfile. Then, to use Firestore in an erb file, `require` it and create a firestore object which takes your `project_id` and `credentials`. Remember that your `credentials` file is the entire JSON object while `project_id` is one field within that object. You can find this JSON object in your Firestore settings:

```
require 'google/cloud/firestore'

firestore = Google::Cloud::Firestore.new(
    project_id: 'your-project-id',
    credentials: '/path/to/your/credentials/file.json'
)
```

and the entire JSON object, which you can put in a file called `initialize_firestore.erb`:


```
require 'google/cloud/firestore'

firestore = Google::Cloud::Firestore.new({
  :project_id => ENV.fetch('GOOGLE_PROJECT_ID'),
  :credentials => {
    :type => ENV.fetch('GOOGLE_TYPE'),
    :project_id => ENV.fetch('GOOGLE_PROJECT_ID'),
    :private_key_id => ENV.fetch('GOOGLE_PRIVATE_KEY_ID'),
    :private_key => ENV.fetch('GOOGLE_PRIVATE_KEY'),
    :client_email => ENV.fetch('GOOGLE_CLIENT_EMAIL'),
    :client_id => ENV.fetch('GOOGLE_CLIENT_ID'),
    :auth_uri => ENV.fetch('GOOGLE_AUTH_URI'),
    :token_uri => ENV.fetch('GOOGLE_TOKEN_URI'),
    :auth_provider_x509_cert_url => ENV.fetch('GOOGLE_AUTH_PROVIDER_X509_CERT_URL'),
    :client_x509_cert_url => ENV.fetch('GOOGLE_CLIENT_X509_CERT_URL')
  }
})
```

Now onto the fun! In the example below, we are referencing a document holding info for "frank" in the "users" collection:

```
doc_ref = firestore.doc "users/frank"
```

Then, we get the contents, which holds metadata like `id` and the actual `data`:

```
doc_snapshot = doc_ref.get
puts "Document data: #{doc_snapshot.data}."
```

You can also get all documents in a collection, create a snapshot on a collection that fires when documents are added, edited, or deleted, filter data, and much more!