teleren/devto huggingface dataset:
Flow, SharedFlow, StateFlow Class Diagram
Tags: android, kotlin, beginners
Published: 2023-05-13 00:59:00

**Kotlin Flow, SharedFlow, MutableSharedFlow, StateFlow, MutableStateFlow and FlowCollector class diagram**

This is part of the asynchronous flow series:

* [Part 1 - Exploring Android LiveData Usages and Behaviors](https://vtsen.hashnode.dev/exploring-android-livedata-usages-and-behaviors)
    
* [Part 2 - Introduction to Kotlin Flows and Channels](https://vtsen.hashnode.dev/introduction-to-kotlin-flows-and-channels)
    
* [Part 3 - Exploring Different Ways to Collect Kotlin Flow](https://vtsen.hashnode.dev/exploring-different-ways-to-collect-kotlin-flow)
    
* [Part 4 - Convert Flow to SharedFlow and StateFlow](https://vtsen.hashnode.dev/convert-flow-to-sharedflow-and-stateflow)
    
* **Part 5 - Flow, SharedFlow, StateFlow Class Diagram**
    
* [Part 6 - Kotlin Flow - Combine, Merge and Zip](https://vtsen.hashnode.dev/kotlin-flow-combine-merge-and-zip)
    

Since I've been playing around with asynchronous Kotlin flow in Android, I have to admit that the class relationship between all these flow classes is not clear even though I know how to use them.

Therefore, I drew this diagram below to get me to understand them.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1682128085939/8c01244a-d083-4b70-b746-34c0d2239a68.png)

There are a few things that I did not expect before I get to see this big picture.

* I didn't know `StateFlow` extends `SharedFlow` interface. I thought there are completely independent.
    
* I didn't know `MutableSharedFlow` extends `FlowCollector` interface.
    

The green boxes in the above class diagram are interfaces and the purple boxes are the implementations of those interfaces, which you rarely need to care about it.

A few quick notes about the class diagram:

* `Flow.ShareIn()` converts `Flow` to `SharedFlow`
    
* `Flow.StateIn()` converts `Flow` to `StateFlow`
    

The rest should be self-explanatory. To understand the usage of these interfaces in detail, you can refer to my previous articles, start with part 2.

I hope you find these class diagram helpful. Enjoy! Code examples that you can play around with:

GitHub Repository: [Demo\_AsyncFlow](https://github.com/vinchamp77/Demo_AsyncFlow)

---

*Originally published at [https://vtsen.hashnode.dev](https://vtsen.hashnode.dev/flow-sharedflow-stateflow-class-diagram)*.
Why Laravel is the suitable Choice for Your Micro SaaS Project
Tags: laravel, php, vue, webdev
Published: 2023-05-13 00:42:05

Are you planning to launch a micro SaaS project but not sure which framework to choose? Look no further than Laravel! Laravel is a popular PHP framework known for its simplicity, elegance, and extensive features. In this article, we'll explore why Laravel is the perfect choice for your micro SaaS project.

**Easy to Learn and Use**
One of the biggest advantages of Laravel is its ease of use. It has a clean and intuitive syntax that makes it easy for developers to write code. Laravel also has comprehensive documentation and a supportive community, making it easy for developers to learn the framework quickly.

**Security**
When it comes to micro SaaS projects, security is crucial. Laravel has built-in security features such as password hashing, encryption, and CSRF protection. These features help protect your application and its data from malicious attacks.

**Scalability**
As your micro SaaS project grows, you need a framework that can scale with it. Laravel's modular structure and robust architecture make it easy to scale your application without sacrificing performance.

**Rich Ecosystem**
Laravel has a rich ecosystem of packages and tools that can help you develop your micro SaaS project quickly and efficiently. From authentication to payment gateways, there's a package for almost every feature you need.

**Built-in Blade Templating Engine**
Laravel comes with its own templating engine called Blade, which makes it easy to create and manage views. Blade is intuitive and easy to learn, allowing developers to build beautiful and responsive user interfaces.

**Artisan Command-Line Interface**
Laravel's command-line interface (CLI) called Artisan is a powerful tool that helps developers automate repetitive tasks. Artisan can be used to generate code, run migrations, and even create database seeds.

Laravel is an excellent choice for your micro SaaS project. Its ease of use, security, scalability, rich ecosystem, Blade templating engine, and Artisan CLI make it an ideal framework for developing micro SaaS applications quickly and efficiently. So, what are you waiting for? Give Laravel a try and see the difference it can make in your micro SaaS project's success!
Enhancing User Experience with Dislike and Undo Features in a Freelancer-Client Matching App
Tags: webdev, javascript, beginners, programming
Published: 2023-05-13 00:02:59

Day 102 of #365DaysOfCode
Today's work focused on implementing the dislike functionality and adding an undo button for instances when a user accidentally dislikes a freelancer. This enhancement allows users to reverse their decision and reconsider their choices, thereby improving the overall user experience of the application.

Step 1: Creating an array of disliked users

The first step in implementing the undo feature was to create an array of disliked users in the database. This array would store the user IDs of the freelancers that the client did not want to work with.

Step 2: Implementing the 'dislike' button

Next, I implemented the 'dislike' button functionality. When a user clicks the 'dislike' button, the disliked freelancer's ID is added to the user's array of disliked freelancers. The current index is then updated and the disliked freelancer is added to the swiped cards array.

Step 3: Adding the 'undo' button functionality

The 'undo' button functionality is the core of this blog post. When a user clicks the 'undo' button, the last swiped card is removed from the swiped cards array, and the current index is reset to the last swiped card's index. If the last swiped card was 'liked', the freelancer is removed from the liked array; if it was 'disliked', the freelancer is removed from the disliked array.
FOSSY '23 CfP Open
Tags: opensource, arm64, aarch64, conference
Published: 2023-05-12 23:12:24


![Software Freedom Conservancy's logo ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ewqv3a7p6q84c2h1ucal.png)

The Ampere/AArch64 Server community is fortunate to have been accepted to host a track at the Software Freedom Conservancy’s inaugural [FOSSY](https://bit.ly/fossy23) (Free and Open Source Software Yearly) conference in Portland, Oregon July 13-16.  The [CfP](https://bit.ly/fossy-CFP) is currently open and we are looking for submissions for the AArch64/ARM64 community.  

The theme for the track is the journey that a developer, architect, or dev ops person would go through from the discovery of AArch64/ARM64, learning why to use them, who is using them, and how to get started.   Please see the our [introduction document ](https://bit.ly/FOSSY_Intro) for more details for more details. 

The CfP closes next Thursday, 18 May.
What do employers look for in candidate when hiring?
Tags: webdev, beginners, productivity, career
Published: 2023-05-12 22:01:20

Most employers that I’ve spoken say following: 

People with most experience are generally the favorites. Capability is the key.

So if you have worked on complex projects over the years and dug into the details, fixed the bugs, refactored the code, made changes on regular basis, wrote unit tests, added new features then you have gained the experience and made yourself capable.

Note how I didn’t say anything about how you did that, as long as you did it.

Experience can be gained by working for yourself as long as it matches the work you’d be doing if you were working for a company.

The tricky part is finding what to work on.

Do this: Pick a project that’ll take atleast 3-4 months to complete.

This is the trick.

(If you’re beginner then you’re better off working your way through basics. Couple months in you will have to pick a project aswell)

Big projects will give you real experience.

REAL EXPERIENCE!

Download source code of an existing project written in language of your choice and make it work locally.

Make a list of features project has. 

Understand each feature. Each functionality, add details to each step and create Jira ticket. 

Once you’ve got the tickets ready you’re ready to build an exact same project yourself.

That’s the secret. Yup.

That’s the way to fill your CV with lots of experience.

You’ll also be able to talk about it because you actually built it all. No gimmicks.

This will teach you exactly what real life experience teaches.

This will also teach you to take accountability for your code.

Lastly you’ll learn to work on things that you don’t understand, exactly like in a real job.

If you get stuck, look at the source code, the downloaded source code will act as a Senior Dev ready to guide you, if that’s not enough use ChatGPT to explain the code.

Best of luck!
When try to apply to MLH Fellow ...
Tags: mlh, webdev
Published: 2023-05-12 21:37:59

Hi everyone, this is part of my request to enter to the MLH Fellow. If you like, good!

#1:
> I'm interested in MLH Fellow because I want to learn and leverage this opportunity to make more skills with the help of others participants to develop the communication skills. So, I'm learning in high school and much people say how I can make some activities in tech to keep the social health & the notes. It's necessary for me to make the opportunity's that I want. For this, I request help me for improving my level skills in dev and in all the environment. Other point is that I like to learn and understand that this is more average skill, and want to help to others to involve in this world and understand it. Although much people it's brilliant more that me, how say a teacher "It is worth more who, understanding his ability, persists and learns that the intelligent one who does not apply", my first page with CMS was in 2016, and overtime I'm learning faster and faster. Thanks beforehand. 

#2:
> I'm more autonomous learner with use actually YouTube videos or with Platzi. I like Web development, like hackathons. Like to teach others and ask questions in all areas.

#3:
> This not is related about the tech but, I like to play guitar, basketball and volleyball and the Latin comedy & stand up. I'm was practice acting & boy scout and win an art competence in 2018. With the Covid-19 pandemic, I depended on more of the computer, but actually I leave of this problem because it's bad for my health. I participate in hackathons and my first hackathon was in 2020 in Supercivicos for LATAM, and in same year I see a much Twitter messages of participants of MLH, but not knew how to enter to the events. For this year I'm active in MLH hackathons, I participate in 2 Hack weeks & other events.

Finally, I want to enter to the MLH Fellow, and today I applied to this. Also, You want to apply? Enter now to: [Here](https://fellowship.mlh.io/?utm_campaign=fellowship-hackers-just_applied_community_referrals&utm_medium=social&utm_source=devto)
Best Travel Apps for Planning your Trip in USA
Tags: travel, travelapps, appsync
Published: 2023-05-12 18:13:34

Are you planning a trip to the USA and need help with the planning process? Look no further than these best travel apps that can make your trip easier and stress-free.
## Airbnb

Airbnb is a popular app for finding unique accommodations at affordable prices. The app allows you to search for properties based on your preferences and budget. With Airbnb, you can book everything from a private room in a local's home to a luxury villa with a pool.

## Google Maps

Google Maps is a must-have app for any traveler. It provides detailed maps and driving directions, as well as information on public transportation routes and estimated travel times. You can also use the app to search for nearby restaurants, attractions, and other points of interest.

## Roadtrippers

If you're planning a road trip in the USA, Roadtrippers is the perfect app for you. It allows you to plan your route and discover interesting places to visit along the way. You can search for attractions, hotels, restaurants, and more, and save them to your itinerary for easy reference.

## Hopper

Hopper is a travel app that helps you find the best deals on flights and accommodations. The app uses predictive analytics to analyze prices and alert you when prices are likely to go up or down. You can also use Hopper to book flights and hotels directly within the app.

## Yelp

Yelp is a popular app for finding the best restaurants, bars, and other places to eat and drink. The app provides user-generated reviews and ratings, as well as information on hours of operation, pricing, and other details. You can also use Yelp to book reservations at restaurants and bars.

## TripIt

TripIt is a travel app that helps you organize all of your travel plans in one place. You can forward your flight and hotel confirmation emails to the app, and it will automatically create a detailed itinerary for you. The app also provides real-time flight updates, maps, and directions to your destination.

## Uber/Lyft

Uber and Lyft are two popular ride-sharing apps that can help you get around in the USA. You can use the apps to request a ride from a local driver, and pay for the ride directly within the app. Both apps also provide estimated wait times and pricing information.

In conclusion, these are some of the best travel apps that can help you plan your trip in the USA. However, You can book flights by other option also. Suppose If you want to book a United flight then you can visit the official site also. Make sure you know [how to contact a live person at United airlines](https://www.flightadvisers.com/airlines-info/how-to-contact-someone-at-united-airlines.php)?.

Whether you're looking for a unique place to stay, the best restaurants in town, or a convenient way to get around, these apps have got you covered. Happy travels!
Crafting an Impressive Developer free CV/Resume: A Step-by-Step Guide by CVRest.com
Published: 2023-05-12 20:59:15

In today's competitive job market, having a well-crafted and attention-grabbing CV (Curriculum Vitae) is crucial for developers looking to secure their dream job. A developer CV serves as a gateway to showcase your skills, experience, and achievements to potential employers. CVRest.com is here to provide you with a comprehensive step-by-step guide on creating a standout developer CV that will help you stand out from the crowd.

![Free CV and Resume Builder - CVRest](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdw9bf3gynufjwhampe5.png)

To create your developer CV using [CVRest.com](https://cvrest.com/), follow these steps:

- Go to [https://cvrest.com/en/create-cv](https://cvrest.com/en/create-cv).

- Select your CV language from the available options, which include English, Arabic, French, German, Spanish, Russian, Italian, Portuguese, Japanese, and Chinese.


- Choose your preferred PDF CV template from the selection provided.

![Choose PDF CV template ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pn5d6l2o7ae0r7jb08ao.png)

- Decide whether you want to use the Online CV feature or not.

- Enter your name, current position, email, and password.

- Next, you can utilize the Smart CV Builder tool to create your CV step by step. Once you're satisfied with your CV, you can download it as a PDF.

![Download your CV](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vodnlgk3mwppu7jzb1pg.png)

CVRest.com allows you to create not only your PDF CV but also your cover letter and an online CV.

The best part is that CVRest.com is completely free to use.

By following these steps and utilizing the features of CVRest.com, you can create a professional and impressive developer CV that will effectively showcase your skills and help you stand out in the competitive job market.
Clojure bites - dynamically add depencencies at runtime!
Tags: clojure, buildinpublic, beginners, programming
Published: 2023-05-12 17:34:51

[Full article](https://fpsd.codes/clojure-bites---dynamically-add-depencencies-at-runtime.html)

# Overview

One pain point of REPL driven development is that even if it is possible to
change an application while it is running, if you want to experiment with a
new library it is need to add a new dependency to your project and restart the
REPL to use it, possibly breaking your flow.

Fortunately a new set of functions to alleviate this pain are in the [works](https://clojure.atlassian.net/browse/CLJ-2761)
and ready to be tested since Clojure [1.12.0-alpha2](https://clojure.org/releases/devchangelog#v1.12.0-alpha2):

- add-lib: Given a lib that is not yet on the repl classpath, make it available by downloading the library if necessary and adding it to the classloader.
- add-libs: Given lib-coords, a map of lib to coord, will resolve all transitive deps for the libs together and add them to the repl classpath, unlike separate calls to add-lib.
- sync-deps: Calls add-libs with any libs present in deps.edn but not yet present on the classpath.

# Get the full content

This time the content of the post is be available on my [site](https://fpsd.codes/clojure-bites---dynamically-add-depencencies-at-runtime.html), especially to avoid editing it in too many places. Please let me know it is a deal breaker! If that is the case, I'll replicate it here.

Looking forward your feedback!
Introduction to data science in python.
Tags: python
Published: 2023-05-13 02:43:41

---
title: Introduction to data science in python.
published: true
date: 2023-05-12 20:21:53 UTC
tags: python
canonical_url: https://dlcoder.medium.com/introduction-to-data-science-in-python-79512ff22c2f
---

[![](https://cdn-images-1.medium.com/max/600/0*HWynb9EMn4MTpNRR.png)](https://dlcoder.medium.com/introduction-to-data-science-in-python-79512ff22c2f?source=rss-93bca1b4c1e9------2)

Data Science has become a fundamental component of any business or organization. It is the process of extracting insights and knowledge…

[Continue reading on Medium »](https://dlcoder.medium.com/introduction-to-data-science-in-python-79512ff22c2f?source=rss-93bca1b4c1e9------2)
How Rompt Helped Me Optimize My GPT-Powered Product Through Massive A/B Testing
Tags: ai, gpt3, openai, webdev
Published: 2023-05-12 20:18:55

## Introduction

One of the main challenges developers of AI-powered products face is refining the prompts that power my GPT-based applications. Fine-tuning prompts is a guessing game that involves intuition and trial and error, but that's where [Rompt](https://rompt.ai) comes in.

Rompt is a platform that allows developers to perform massive A/B tests for the GPT prompts used in their applications. In this article, I'll share my experience using Rompt and how it helped me optimize the prompts for my AI-powered product.

![Hero image rompt.ai](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pbqoh13808wkseitvvr.png)

## Setting up experiments

The first step in using Rompt is inputting a set of potentially optimal prompts. These prompts can have embedded variables, which are wrapped in curly brackets. For instance, my initial prompt was: "Write a summary of the {book_title} book."

Next, I had to set the experiment parameters, which included:

## Assigning models to each prompt

Defining a set of possible values for the variables in the prompts
Specifying the number of outputs to generate for each prompt
In my case, I assigned the GPT-4 model to my prompt, set the book_title variable to a list of popular book titles, and requested 10 outputs for each prompt.

## Blind rating of generated outputs

Once Rompt generated the outputs, I received a flat list of responses without any indication of the source prompt. This blind rating system ensured that I could evaluate the quality of each output based solely on its appropriateness for my product, without any bias towards a specific prompt.

As I went through the list, I rated each output on a scale of 1 to 5, with 1 being the least appropriate and 5 being the most appropriate.

Identifying the highest-performing source prompts
After I completed rating all the outputs, Rompt revealed a list of the highest-performing source prompts. This allowed me to identify the prompts that generated the most appropriate responses for my product.

With this information, I could make data-driven decisions about which prompts to use in my AI-powered application, ultimately leading to better user experiences and more relevant content generation.

## Conclusion

Rompt is a valuable tool for developers working with GPT-powered applications. It takes the guesswork out of optimizing prompts by enabling massive A/B testing, blind rating, and data-driven decision-making. As a user, I found Rompt easy to use, and it saved me countless hours that I would have spent manually testing and tweaking prompts. If you're a developer looking to improve the quality of your AI-generated content, give [Rompt](https://rompt.ai) a try.

![Final output rompt.ai](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/io7bdyjzbf6uwkq75uos.png)
JavaScript Closure
Tags: javascript, react
Published: 2023-05-12 20:16:33

While working with a React Hook, I came across closures. Although I had read about them in a document, I found it difficult to apply them to actual code. This article provides a summary of closures.

1. JavaScript functions and scopes
2. Closure with example codes

**JavaScript functions and scopes**
A JavaScript function allows the inner function to access the variable in its outer scope.

When a variable is declared outside of a function or as a global variable, assigning a new value to the variable changes its value.
It can affect the behavior of the program in ways that may be unexpected or undesirable.


```
let x = 10;

function myFunction(){
    return x + x;
}

myFunction() // 20

x = 20;

myFunction() // 40
```

When a variable is declared inside a function with an initial value, it sets to the initial value every time the function is called.

```
function outerFunction(){
    let count = 10;
    console.log("initialized", count)
    
    function innerFunction(){
        count -= 1;
        console.log("decremented", count)
        return count;
    }
    
    innerFunction()
}

outerFunction() // initialized 10, decremented 9
outerFunction() // initialized 10, decremented 9
outerFunction() // initialized 10, decremented 9
```


Here comes the Closures.

**Closures**

According to MDN:
_A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function's scope from an inner function._

When calling the outer function, the outer function references its inner function.
The outer variables can keep their states between multiple calls.

```
function countdown(){
    let count = 10;
    
    function decrement(){
        return count -= 1;
    }
    
    return decrement;
}

let counter = countdown();

counter() // 9
counter() // 8
counter() // 7
```

**Why do we store the function in a global variable?**
To store the result of the variable and its inner function, which allows the outer variable to maintain its state even after the function has been called multiple times.

We can create a new, separate counter, "counter2" by calling countdown() again. This counter has its own count variable.

```
function countdown(){
    let count = 10;
    
    function decrement(){
        return count -= 1;
    }
    
    return decrement;
}

let counter = countdown();

counter() // 9
counter() // 8
counter() // 7

let counter2 = countdown();
counter2() // 9
counter2() // 8
counter2() // 7
```

This blog post provides a simplified summary of JavaScript functions and scopes, focusing on the concept of closures. Closures allow inner functions to access variables in their outer scope and retain state information between multiple calls.

If you're struggling with closures or have encountered problems related to function scopes, I hope this summary helps you understand the basics and get unstuck.