teleren/devto huggingface dataset:
Stop Writing Flask to Serve/Deploy Your Model: Pinferencia is Here
Tags: machinelearning, beginners, programming, datascience
Published: 2022-04-27 23:40:14


## Stop Writing Flask to Serve/Deploy Your Model: Pinferencia is Here

Are you still writing flask to serve your model? Stop doing that, you have a much better choice now: Pinferencia.

![](https://cdn-images-1.medium.com/max/3000/0*28XuAr3siG1MBcHa.png)

Pinferencia is a python library aims to be the simplest way to serve your model.

Check out at: [underneathall/pinferencia: Python + Inference — Model Deployment library in Python. Simplest model inference server ever. (github.com)](https://github.com/underneathall/pinferencia)

## What will you get from Pinferencia?

* **Fast to code, fast to go alive**. Minimal codes to write, minimum codes modifications needed. Just based on what you have.

* **100% Test Coverage**: Both statement and branch coverages, no kidding.

* **Easy to use, easy to understand**.

* **Automatic API documentation page**. All API explained in details with online try-out feature. Thanks to FastAPI and Starlette.

* **Serve any model**, even a single function can be served.

* **Support Kserve API**, compatible with Kubeflow, TF Serving, Triton and TorchServe. There is no pain switching to or from them, and Pinferencia is much faster for prototyping!

## Is it really simple and easy?

Yes, and a lot easier than other tools.

**You just need to add three extra lines.**

Checkout the sample on its page to serve a huggingface model:

![](https://cdn-images-1.medium.com/max/3568/0*vqvXaG7vLjgOjRCB.png)

Ready to get start?

Go visit: [Pinferencia (underneathall.app)](https://pinferencia.underneathall.app/) for detailed examples.
Is learning Unity 3D a good alternative to learning C#?
Tags: csharp, unity3d, webdev, discuss
Published: 2022-04-27 23:37:31

For a while I was thinking about learning either C# or Java for backend, right now I'm working as a react developer and I know node and typeScript.


So my question is, if learning the basics of C# with a Unity 3d course, will help me learn enough to keep learning by myself backend in the future, or should I just take a c# course where they focus in making a rest api
Day 19: Hello Redux 1
Published: 2022-04-27 23:06:07

Hi!
so I wanted to name this one Hello Redux because I planned to research about redux today but i couldn't so I went with hello Redux because I plan there will be a "Hello Redux 2" where  I will actually do it and integrate it in the react project I'm working on so today I didn't learn much really I was busy with the issues I had been facing with my network and it's not solved so I think It will take some time tomorrow too but I did got started with the paper and I wrote and interview and I plan to continue today

as expected tomorrow and the rest of the week I will not spare enough time to code with everything going on but maybe I will who knows if I do I don't know which to tackle first in bunch of things that I have to work on. I will see what I come up with 

this is day 19 (I wrote 20 first I had to edit after) by the way getting closer to the first month of consistency I think I should be proud
signing off...
React Tricks Miniseries 2: How to create custom hooks in 1 minute
Tags: react, hooks, theeasydev, javascript
Published: 2022-04-27 23:00:31

# Problem
Often times in a web app or website we find the need to get a user's data, for example, which we fetch from our database. 

This fetch process in react requires us to declare a useEffect and insert our fetch function say "getUserByID()" and we pass some variable(s) in the dependency array.
We need quite a few lines just to get that user's info: UseState hooks to store the uder data, useEffect hook, and a JS function call to the database.

Is there a way to get this data in a single line of code? What's the solution?

# Solution

You guessed it. Custom Hooks. A custom hook is just a fancy term for a JS function doing what we need done above, and returns our user object in one variable thus making it super reusable!

Here's the idea: Create a new file in a folder called hooks and import this file in the component where you need the user info.
(Be careful and make sure to always prefix your custom hook with "use", like "useUser" or "usePerson", otherwise react won't recognize it as a hook!)

```javascript
export const useUser(userID) {
  const [user, setUser] = useState(null)
   useEffect(() => {
    setUser(getUserByID(userID))
  },[userID])
  return user
}
```

Inside our custom hook we make the call to our database with getUserByID() - we pass the user's uid and set the state of user as well and simply return the user data.

Now in our component where we use this user's info, we simply use this one liner to get the user's info:

```Javascript
const user = useUser(userID)
```

And that's it really, now we can use user.firstName, user.email, etc inside our jsx.

# Conclusion

Creating a custom hook is really easy and quick. We create an isolated function and insert our useState and useEffect hooks to get and return the user's data, thus letting us reuse the custom hook in any component.

Have you used custom hooks in the past? Let me know what you think below!
Tools - JSON Visio
Tags: json, tutorial
Published: 2022-04-27 22:01:45

JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

Prepare your JSON data and just paste it on the left side as

![json](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pe39snaefv3nke73enbk.jpg)

and here is the output. 

##  🪄 Wingardium Leviosa 🪄

![json](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1npy2tlqbxph1bbq96nk.jpg)
React Tricks Miniseries 1: How to set up your react folder structure
Tags: react, folder, theeasyde, structure
Published: 2022-04-27 21:59:46

# Problem
There's a lot of discussion out there on how to set up your folder structure. 

Since React is a library and not a framework, there are many ways to correctly structure your react project and there's no wrong way.

But over the years i've developed the best way that works for me in large enterprise applications. 
It allows for easy navigation for seasoned developers and is very intuitive for juniors and developers collaborating in the middle of the development work.

# Solution

The idea is to have all your files grouped by folder categories inside the src folder like so

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

Everything is neatly and comprehensibly organized.
- Algolia index files
- assets such as images and fonts
- auth contains all auth files such as login and registration, forgot password, etc
- components and containers are self eplanatory
- data contains any info like menu data, or long objects and arrays data
- firebase config file 
- hooks for my custom hooks
- pages are a "next style" pages folder that contain all my pages on the app
- services are firebase and other fetch calls that i reuse and make my app scaleable
- store houses my context apis, state management
- utils are my useful utility functions like date utilities that allow me to convert quickly date objects and conversions.

# Conclusion

Using this folder structure will help you navigate your react app smoothly and quickly, especially for new developers joining your project in the middle.

Let me know your thoughts.

Easy out!
C++da Variables and Data types
Published: 2022-04-27 21:47:07

# **Data types**

## **Int** : 

short, long, int (butun sonlar);

## **Real number** :

float, double (kasr sonlar);

## **Character** : 

char (belgilar).

  - int age=14;
  - cout << age + 5 * 26 << endl; (144)
  - age= -15  

## Declaration

- bu o'zgaruvchilarni e'lon qilish;
 - int son;

## Assignment

- bu o'zgaruvchiga qiymat o'zgartirish;
 - son=25;

## Initalization

- o'zgaruvchini e'lon qiish vaqtida birdaniga qiymat berish;
 - int boshqason = 16;

### o'zgaruvchi nomi harflar, raqamlar va _ belgisidan iborat bo'lishi kerak.
 - int a=5;
 - int b=a;
 - int c=a+b;


int a;
float b;        **int a,c;**
int c;          **float b,d;**
float d;

## **Garbage value**

- declaration kiritilsayu, o'zgaruvchi miqdori kiritilmasa councilda chiqadigan taxminiy sonlar

```cpp
   int a= 123.45 --> 123
   float a= 123 --> 123.00
```

int vazn = (int)[majburlash] 120.123


int a=10;
int b= a+10;
int c= a+b;int d+ a+b+c;

a=b=c=d=60

## **cin >>**

- o'zgaruvchini o'qiydigan komanda

## **char** --> Ascii table

- char belgi= 'a'

- cout <<  (char) (belgi/3) << endl; [majburlash]

## **iomanip**

- input output manipulation, kutubxona

## **setw()**

- o'zgaruvchi uchun print qlishda bo'sh katakchalar so'raydi
 - cout << setw(15) << son << endl; [by default right-aligned]
 - cout << left << setw (15) << son << endl;

## **setfill('')**

setw() orqali ajratilgan yacheykalarni belgilar bn to'ldiradi.

## **setprecision**

- double sonlarda anilashtirish vazifani bajaradi, ya'ni kasr sondagi nuqtadan keyin keluvchi sonlarni ham chiqazib beradi. Faqat nuqtadan keyingisiga ta'sir qiladi. 
 - *24.16*

## **fixed**

- *setprecision* komandasi birgalikda ishlatiladigan komanda bo'lib, uqta jooyida qolsin degan ma'noda keladi.
Java - Reflection
Tags: java, programming, tutorial
Published: 2022-04-27 21:37:17

Reflection feature helps us to access classes, methods, variables and other properties of objects. Moreover, it is used to get, control and manage information such as class, method, properties and annotation such as name, parameter. We do this already by defining a variable and when we put "." with the completion of the IDE.

```java
Student student = new Student()
student.
// IDE offers us features such as methods or variables here
```

To start with, a simple Student class

```java
  public class Student {
  public final static int id = 4;
  private String name;
  private int age;
  public Metallica () {
    this ("James", 54);
  }

  //... other getters and setter
}
```

and here is our test class to test what is reflection

```java
Class<?> myClass = Class.forName("com.org.Student");
Object obj = myClass.newInstance();

// varargs can be used for getDeclaredConstructor 
Constructor<?> cons =  myClass.getDeclaredConstructor(String.class, Integer.TYPE);

for (Field field: myClass.getDeclaredFields())
(
   System.out.println("Field:" + field.getName());
)
```

` Field:id
Field:name
Field:age`


Although there is no access to a private field other than getter and setter, we obtained the names of those variables 💡 So this is more beneficial in test and debug.

In the same way we can get the modifiers...

```java
 int modifier = cons.getModifiers();
 System.out.println("Modifer: " + Modifier.toString(modifier));
```

`Modifier: public`

Because our Student class implemented as public.

Moreover, we can invoke public, private and static methods via invoke() in order to get the required information from them.
MANGAFLIX - COVER NETFLIX PAGE
Tags: devops, html, css, javascript
Published: 2022-04-27 21:30:47


Bootcamp DIO Carrefour Web Developer - Criando uma interface simples para streaming de mangas com responsividade. #dev #dio #carrefour #html #css #js

Github: https://github.com/rsgamboa/MangaFlix
Website: http://mangaflix-rho.vercel.app/
Option 3 - API/Product Owner - Wikipedia-Query
Published: 2022-04-27 20:07:15










**What is an API**
API Stands for Application Programming Interface. An API is the glue for two systems communicating with one another to exchange credentials to access information. An API integrates the front-end with back-end.

**Fetch**
The fetch() functionality provides a wait time to achieve a successful connection of fetching a resource from the network to establish a promise from the availability of the response.

The way a fetch() API works is first pass in a URL. This is the first property. The second property is optional, however this is where you put in the post request.

Consider the below image for example. (this.locationEndpoint + userIPdata.ip) is fetching the 'https://freegeoip.app/json/' URL. The '.then(resp.ok){
return resp.json();}'
block of code is returning a promise, specifically the .json function.

The '.then(data => {
console.log(data);'
block of code returns the data latitude, longitude, city, and region name.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9me4f9of5yy3dnkmlt9y.JPG)


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

**Wikipedia Query**
The below code snippet adds the Wikipedia Query Search for location, city, and region.

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

Importing the wikipedia-query web component allows  us to use the html wikipedia page.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18jsll1xbclngj7c5sap.JPG)

[Git Repository](https://github.com/maw6a0/Lab_2_api-project-1)
🚧 What Would You Change About this Website?
Tags: javascript, webdev, discuss, opensource
Published: 2022-04-27 21:08:25

I've been working on this non-profit for a while, and we just finished rebuilding the entire website. Before, it was in vanilla Javascript, HTML, and CSS, but now its a mix of Gatsby, Theme UI, and glorious Server-Side Rendering. It took a few weeks to complete this, but now that it is done, I'm super proud of the result- I just want to know what you think.

[The New Website](fairfieldprogramming.org)

```javascript

if (isGood) 
{ 
     giveItAUnicorn() 
} 
else 
{
     commentWhatYouWouldChange()
}

```

_If you would like to help work on the project, you can drop a comment on this post and say that you would like to help._

And finally, make sure to comment what you like about the website or what you don't like. All of the functionality is there, so you can even create an account if you would like!
Graphics Designers Should Bookmark These 5 Free Stock Images Sites
Tags: graphic, design, resources, graphicdesign
Published: 2022-04-27 21:04:55

A Graphic designer is just not a designer only. Through a graphic designer, a company would be known by the world based on its Brand Logo. A Logo is an essential part of every company whether it’s small or large.

As an example: You cannot find a people in the world who doesn’t know Coca-Cola company. People can easily recognize the coca-cola company with its logo. The Coca-Cola Company logo is made by a graphic designer called Frank M Robinson. Some people might know his name and some don’t. But this is the universal truth.


 
Frank M Robinson is a creative graphic designer and the original designer of the coca-cola logo.

So, why I’m saying you about Frank M Robinson is because of his creativity people know his name.

If you are a graphic designer then you should bookmark these 5 stock image sites immediately. These 5 amazing free stock image sites will help you to improve your productivity.


 
Here is the list of top 5 free stock image sites for educational use and Commercial use.

Free stock images

## 1/ Pexels
As per free stock sites, we think Pexels is one of the best with a large community of photographers and videographers. They are constantly donating their work for everyone to download and use, royalty-free, it’s also the first to respond to current affairs, providing the images we might need to illustrate our timely projects.

Site Reference: [Pexels.com](https://www.pexels.com/)

## 2/  StockSnap.io
StockSnap.io is best known for its high-quality stock images. You don’t need to use a credit card and they always welcome you.

Site Reference: [StockSnap](https://stocksnap.io/)

## 3. Unsplash
Unsplash is a stock photo site. With a friendly community of photographers. All uploading free stock pictures for you to download and use it. A must for any discerning designer.

Site Reference: [Unsplash.com](http://unsplash.com/)

## 4. Pixabay
Pixabay is a free stock image site with a creative community sharing free stock images without copyright.

Site Reference: [Pixabay](https://pixabay.com/)

## 5/ Vecteezy
Vecteezy is free royalty use, stock photo site where you can download all images for educational use and commercial use.

Site Reference: [Vecteezy](https://www.vecteezy.com/)

 

## Read More Articles at [WP Coders Club](https://wpcodersclub.com/)

Why should you bookmark these 5 free stock image sites?
Sometimes, your client might be asked you to use some free stock images for their business promotion without any copyright issue. If they asked you to refer to some stock image site list then you can refer them to these sites. Sometimes you might be too busy with your work and if one of your clients asks you, hey buddy, send me some free stock image sites list, then you can send them easily. But you’ve to bookmark all of these free stock image sites.
I Buy Houses Columbus
Tags: professionalhomebuyer
Published: 2022-04-27 20:58:57

When we provide the right solution for a homeowner it is a win-win.  We are a [real estate investment company](https://www.columbushomeowner.com/), we live in Columbus and we buy and sell houses in Ohio.  We are based in Columbus although we serve all of central Ohio.   We specialize in buying “Pretty Houses” – the kind most people have.   We use the pretty houses to provide a path to homeownership for families who need a little time to qualify for a loan.
We want to provide personalized solutions for every homeowner in Columbus. Our team will always take the time to talk you through our process, discuss the options for selling your house, and recommend other selling options if you choose not to work with us. We’ll provide a fair cash offer within 24 hours that comes with no fees or obligations! If you need to sell your house right now, connect with our team to learn more about our company and how we can give you cash for your house.
If you have any questions about how we work with you through the process of selling a house or just want to learn more about us, don’t hesitate to contact us anytime!
TDD with Livebook
Tags: elixir, liveview
Published: 2022-04-27 20:58:13

I have just published a video about doing TDD with Livebook:

{% youtube HzNdVlIpFgI %}

If you are not a video person, take a look at the notebook [here](https://gist.github.com/adolfont/45cd57d2e9ef020ed164419f970235ad).

If you can run an instance of livebook, click here:

[![Run in Livebook](https://livebook.dev/badge/v1/blue.svg)](https://livebook.dev/run?url=https%3A%2F%2Fgist.github.com%2Fadolfont%2F45cd57d2e9ef020ed164419f970235ad)


The code I typed was that of a very simple calculator. Every function was written after a test for that function was written.

```elixir
defmodule Calculator do
  def add(a, b) do
    a + b
  end

  def multiply(a, b) do
    a * b
  end
end
```

Unfortunately, Livebook seems to force us to put the tests below the code that is being tested.

And, as Bro0klin Myers explained [here](https://www.elixirnewbie.com/blog/writing-tests-in-livebook), you have to add:
```elixir
ExUnit.start(auto_run: false)
```
to the beginning of your test code.

You also have to put this line in your test module: 
```elixir
  use ExUnit.Case, async: false
```

And you have to finish your test code with this line:
```elixir
ExUnit.run()
```



The content for the test code cell is:
```elixir
ExUnit.start(auto_run: false)

defmodule CalcutorTest do
  use ExUnit.Case, async: false

  describe "Testing the addition function" do
    test "2 plus 3 is 5" do
      assert Calculator.add(2, 3) == 5
    end

    test "2 plus 2 is 4" do
      assert Calculator.add(2, 2) == 4
    end
  end

  describe "Testing the multiplication function" do
    test "2 times 3 is 6" do
      assert Calculator.multiply(2, 3) == 6
    end

    test "2 times 20 is 40" do
      assert Calculator.multiply(2, 20) == 40
    end
  end
end

ExUnit.run()
```


What do you think? Is it a good idea to do TDD with Liveview?
Best top quality Drop Shadow Service Online-upload 24 Hours Delivery
Tags: backgroundremoval, clippingpath
Published: 2022-04-27 20:48:37

Hey, my name Dave!! I have worked in the advertising industry as a creative manager and during that time, I have written content, done loads of graphic design, and created concepts. I would love the opportunity to work with clients, no matter how big or small the project. I specialize in photo correction/manipulation, [background removal](https://toucheditingfast.com/services/clipping-path/) and love working on logos and layouts as well. In my free time, I love playing guitar, going to the gym, and learning new things. Looking forward to hearing from you!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hsat2cj23gd4cba54059.jpg)
🏷️ Github CLI v2.9.0 is out : clone labels feature #5452 is here
Tags: github, productivity, terminal, codenewbie
Published: 2022-04-27 19:58:11

## 🙋 Intro

[GitHub CLI `v2.9.0`](https://github.com/cli/cli/releases/tag/v2.9.0) is out and brings some nice new features around [labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) : 

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

{% embed https://github.com/cli/cli/pull/5452 %}

As recently I felt the need (for organizational level reporting) to synchronize labels on distinct repos (see [dedicated feedback](https://github.com/github/feedback/discussions/15300)) :
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rjl5nr77zparqnbpjcje.png)
 
, this latest release was the perfect match ❣️


## 🎞️ The demo

A short video worths a thousand words so here go 👇
{% youtube XhaqCqv1vWA %}


## 📜 Movie script


⚠️ **Replace with your account**⚠️


```shell
clear

# 🤔 So a new release is avilable for Gtihub Cli ❔
# 👉 What's new on v2.9.0... let's find out 👇  
gh release view v2.9.0 --repo cli/cli

# 🎁 ... and what is cli/cli #5452 "label clone" feature ❔
gh issue view 5452 --repo cli/cli

# 🆗 Let's give it a try ❣️

# 1️⃣ Create a master repo 
gh repo create gh-cli-demo-labels-master --public 

# 🏷️ See labels on the newly created repo 👇
gh label list --repo adriens/gh-cli-demo-labels-master

# ➕ Create a custom label 🦩
gh label create SOMETHING_PINK --description "I love pink things" --color FFC0CB --repo adriens/gh-cli-demo-labels-master

# ✅ And check it has been created  👇
gh label list --repo adriens/gh-cli-demo-labels-master

# 🔍 Look for the newly created label 👇
gh label list --repo adriens/gh-cli-demo-labels-master | grep PINK

# ➕  Now, create a new repo...
gh repo create gh-cli-demo-labels-synced --public 

# ... List existing labels on te newly created repo
gh label list --repo adriens/gh-cli-demo-labels-synced

# ✅ Check that the PINK label does not exists
gh label list --repo adriens/gh-cli-demo-labels-synced | grep PINK

# 🪄 Sync labels ✨
gh label clone adriens/gh-cli-demo-labels-master --repo adriens/gh-cli-demo-labels-synced

# 🕵️ See if the clone command did work 🤞
gh label list --repo adriens/gh-cli-demo-labels-synced | grep PINK

# 🎆 Job done 🤸

# 🧽 Cleanup the mess 🧼
gh repo delete adriens/gh-cli-demo-labels-master --confirm
gh repo delete adriens/gh-cli-demo-labels-synced --confirm

# 🎬 That's all folks
gh repo view cli/cli

# 🌟 Go like it 🌟
gh repo view cli/cli --web
```

## 🔖 Resources

- 🎞️ [Github CLI playlist](https://youtube.com/playlist?list=PL7GdrgVAWcDgnslVa345j1xpjFJx9IvrE) on [`DevOPS LABS`](https://www.youtube.com/channel/UCcbQ_euR84DKOf_-ksI5_GQ)
- [Github CLI homepage](https://cli.github.com/)
- [`cli/cli` Manual](https://cli.github.com/manual/)
- [`cli/cli` on Github](https://github.com/cli/cli)
Welcome Thread - v171
Tags: welcome
Published: 2022-04-27 19:54:41

---
title: Welcome Thread - v171
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![The word "hi" waving hi](https://media.giphy.com/media/MPxg9U887PS0B8XT4J/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**