teleren/devto huggingface dataset:
Book No 5: API Testing Using Swagger and Postman in Asp .NET Core Web By (Sardar Mudassar Ali Khan)
Tags: webdev, azure, azurefunctions, programming
Published: 2023-07-22 18:15:30

API Testing using Swagger and Postman in asp.net core web API in this book we adopted a practical approach for the testing the API Endpoints. This book is divided into four parts every part has its dimension. In this book, we will explain the fully featured projects and how we can architect the application using the following architectures.
In part one of the book we will develop the API using Asp .NET Core Web API After development we will test this API using Postman and Swagger.
• API Development in Asp .NET Core
• Swagger Introduction
• API Testing Using Swagger
• API Testing Using Postman
### PART 1: API Development in Asp .NET Core
1) Introduction
2) Why Restful Web Service
3) Implementation
4) Conclusion
5) Complete Project GitHub URL
### PART 2: Swagger Introduction
6) Introduction
7) Swagger API Testing Steps Introduction
8) Implementation
9) Conclusion
10) Complete Project GitHub URL
### PART 3: API Testing Using Swagger.
1) Introduction
2) API Testing Using Swagger in Asp.net Core
3) Test POST, PUT, DELETE, GET, UPDATE Endpoints Using Swagger
4) Conclusion
### PART 4: API Testing Using Postman.
1) Introduction
2) API Testing Using Postman in Asp.net Core
3) Test POST, PUT, DELETE, GET, UPDATE Endpoints Using Postman
4) Conclusion

[Download My Complete Book About API Testing Using Swagger and Postman in Asp .NET Core Web](https://a.co/d/ijraXy0)
Book No 4: Top 20 Microsoft Azure Cloud Services : Microsoft Azure Cloud Services By (Sardar Mudassar Ali Khan)
Tags: webdev, azure, azurefunctions, eventgrid
Published: 2023-07-22 18:08:35

Introduction
Microsoft is offering a cloud computing service. It was made available in the fall of 2008. In 2014, it was given the moniker Windows Azure. It was formerly known as Project Red Dog. It serves 42 regions better than any other cloud provider and easily connects data centers to the cloud. Cloud-native applications are created using well-known tools like Visual Studio, ASP.NET, and programming languages like Visual Basic, C++, C#, etc. Blockchain as a Service (BaaS), machine learning, bots, and cognitive APIs are exclusively available on the Azure cloud platform.
Top 20 Azure Services and Products
An overview of some of the most well-known Microsoft Azure services, specifically the top 20 azure services and how to use them throughout the complete architecture, can be found below:

1. Azure DevOps
2. Azure Blob Storage
3. Azure Virtual Machines
4. Azure Backup
5. Azure Cosmos DB
6. Azure Logic Apps
7. Azure Active Directory
8. API management
9. Azure Content Delivery Network
10. Azure Site Recovery
11. Azure Bots Azure Free Services
12. Azure API Management
13. Azure Cloud Storage
14. Azure Logic Apps
15. Azure Key Management
16. Azure Key Vault
17. Azure Bot Service
18. Azure Fabric Service
19. Azure Data Lake Service
20. Azure Event Grid
More than 200 Microsoft Azure products exist, though. You can explore the free azure services by following the given below link. https://azure.microsoft.com/en-us/pricing/free-services/ I will discuss All the Services with practical labs in my upcoming Articles.
Conclusion
The needs of your business should guide your choice of the cloud service provider. Considering this, search for the greatest supplier and you'll come across Azure. This is because it is dependable and offers excellent value for the money invested in it. You don't need anything more than its dependable environment security and wide range of services to grow your organization. We advise you to obtain certification as soon as possible because the cloud is a highly sought-after product.
[Top 20 Microsoft Azure Cloud Services : Microsoft Azure Cloud Services](https://a.co/d/i2hBc19)
Structural vs Nominal typing🌟
Tags: programming, typescript, java, tutorial
Published: 2023-07-22 17:46:54

## Introduction: 📝 
As technology advances, our preferences for programming languages are evolving too. Nowadays, more people are favoring statically typed languages like TypeScript, Go, and Rust over dynamically typed ones like Python, Ruby, and JavaScript. While there's no need to dislike dynamic languages (they have their strengths!), personally, I find statically typed languages my top choice, even if they can be a bit tricky to work with sometimes. 💻💪

## Understanding Structural Typing 🛠️
Structural typing is well illustrated in TypeScript. Let's see an example:
```ts
type Car = {
  name: string;
}

type Bike = {
  name: string;
}

const myCar: Car = {
  name: "Fortuner"
}

const myBike: Bike = myCar;
```
In this TypeScript example, there are no errors when we assign a variable of type `Car` to a variable of type `Bike`. Why? Because both types have the same structure, even though they have different names for their definitions. They both have a property called `name` with a type of string. This flexibility is a key feature of structural typing, which applies to classes and interfaces in TypeScript too. 🏗️🧱

## Exploring Nominal Typing 🏭
Java represents nominal typing. Let's see how it works:
```java
class Car {
    String name;
}

class Bike {
    String name;
}

public class Program
{
    public static void main(String[] args) {
        Car car = new Car();
        car.name = "Fortuner";
        
        Bike bike = car; // This line will raise a type error in Java
    }
}
```
In this Java example, you'll encounter an "incompatible types" error when trying to assign a variable of type `Car` to a variable of type `Bike`. Java strictly enforces nominal typing, so even if the types have the same structure, they must explicitly be of the same named type. 🛠️🚧

## Pros and Cons of Each Approach 🤝✅❌

Structural typing offers incredible flexibility, following the famous "Duck typing" principle: "If it walks like a duck and it quacks like a duck, then it must be a duck!" It also maintains a good level of security similar to nominal typing.

On the other hand, nominal typing, seen in languages like C++ and Java, has its own set of use cases. However, it often involves writing more boilerplate code to handle the relationships between various types.

## Conclusion: 🎯 
Understanding the differences between static and dynamic typing, along with the nuances of structural and nominal typing, can give you an advantage in your programming journey. Making informed decisions when choosing the right language for specific projects becomes easier. Happy coding! 🚀👩‍💻

> That's a wrap! Creating content like this for my blogs allows me to share these insightful details with you all. 📚🔍 If you found this helpful, stay tuned for more tech-focused content in the future! Feel free to share your thoughts and experiences in the comments below. 🗣️😊
Pre-Training LLM
Tags: ai, llm, pretrainin, finetuning
Published: 2023-07-22 17:14:11

For the last 9 months I have been working on a project that integrates OpenAI's ChatGPT into our project to help create creative marketing assets for our customers. Over the last couple of months I have been working with LLM (Large Language Models) and trying to get a deeper understanding of what they are and how they work. One of the first things I wanted to understand is how they are built. One of the steps in building a LLM is pre-training. I wanted to understand what pre-training is and how it works. This blog is a summary of what I have learned.

An LLM at its core is really a prediction engine that given a sequence of words or sentence it will predict what is the next set of works that should come. Pre-training is the process where the LLM is provided a huge amount of data to recognize syntax, grammar and common phrases. As an example GPT-3 was pre-trained on 0.5 Trillion words and the outcome was a 175 Billion Parameter model. The pre-training process is a very compute intensive process and requires a lot of compute power. During the Pre-Training process, we use Self-Surpervised Learning (SSL) to get the model to solve pre-training tasks to help it learn the language.

Some common pre-training tasks used in SSL include:

**Masked Language Modeling (MLM**): The model tries to predict randomly masked words based on context. Helps learn relationships between words. Used in BERT.

**Next Sentence Prediction (NSP)**: Model predicts if two sentences are consecutive. Learns sentence structure. Used in BERT.

**Causal Language Modeling (CLM)**: Model predicts next word in a sequence. Learns fluency. Used in GPT-1.

The loss function for SSL combines the losses from the different pre-training tasks. Each task has its own specialized loss function that the model tries to minimize during training. Using multiple complementary tasks makes the model robust.

The loss function is key to how the LLM learns to predict the next words. The different losses and tasks teach the model important language skills like word meaning, sentence structure, grammar rules, and fluency. This develops a strong language foundation.

Pre-training is an essential first step when creating large language models. It builds a deep understanding of language from huge datasets that enables LLMs to perform well on downstream tasks.
Is Rust a Complex one ?
Tags: rust, system, macros, syntax
Published: 2023-07-22 17:21:31

I have been working with `Python`, `Golang`, and `JavaScript` for more than 5 years, with C/C++ as slightly lesser. Each of the syntax, file structures, and even package management ecosystem (be it in existence or not), has largely been friendly to pickup as beginner coder. Myself as an example, is a self taught developer, using extensive Google, YouTube, and of-course, StackOverflow!

Recently, I have looked back into `Rust`, an programming language having complexity on-par, or even surpass that of C++, apart from `cargo` being the well controlled portion.

Nevertheless, the common concept of `types`, `classes` in conventional OOP, with functional `methods` and `interface` coding methodology are combined, with more granular controls in-built called `macro`, which added on each version update on rust core, has made it ever-harder to grasp fully.

This is my humble opinion on Rust, as of my current knowledge while learning it. Suggestion on learning methods on Rust are welcome and appreciated.

I will definitely keep this learning journey posted, that is if I ever climb up this rabbit hole.

Cheers!
为什么我选择了苹果开发
Tags: apple, why, ios, swift
Published: 2023-07-22 17:11:39

2010年、2013年、甚至2017年的我，一定不会想到，自己参加工作后的第一种工作内容，是苹果平台软件开发。

在决定自己将要至少从事几年程序员的职业后，摆在我面前的一个重要问题：做哪个方向？

当时，受到移动互联网浪潮的影响，大部分“转码”的同学都在学习后端开发。无论是传统的J2EE、PHP、RoR，还是新兴的Golang、NodeJS、Python等后台开发语言和框架，大家都走在一条“狂刷LeetCode、猛做项目”的康庄大道上。而余下的同学，则五花八门：前端、机器学习、网络安全、硬件驱动、测试等等。一时间方向众多，让我这个初入编程大门的人挑花了眼。

我的编程历史可以追溯到文曲星上的“GVBASIC”时代。中学阶段的编程则从初中的VB6.0和Macromedia Flash，到高中的Visual C++ 6.0，实际上只学了个皮毛，根本连当年那些牛人搞的NOI之类的活动边儿都没沾到。大学本科阶段的编程完全等于MATLAB和Verilog——完全的面向过程编程，几乎不涉及任何设计模式、代码结构、模块化等等软件工程的知识。

因此，来到将要选择编程方向的路口，摆在我面前最可行的两条路：更偏向用户界面的编程，和/或更偏向通过编程解决一个实际问题。

我在2018年下半年接触到iOS应用程序开发与Swift这门编程语言。简而言之，Swift是我所接触过的面向对象的编程语言里，设计模式最为合理、语法最清晰简洁的语言。它吸取了过去20年里主流语言的诸多优点：优化后的值类型、编译器约束的强类型检查、自动引用计数、异步关键词；也引领了许多潮流，促使其他语言进化：富枚举类型、协议设计模式、合理的可选类型和错误处理。在Swift面世之前，这些语法特性大多只是零星分布于各个不同的语言当中；Swift横空出世后，许多主流编程语言都跟进补足了这些好用的语法功能。Rust、TypeScript、Kotlin、Dart等等新兴语言，更是像素级借鉴Swift的优秀设计模式，某种程度上使Swift成为了“学习一次，融会贯通”的最佳切入点。苹果公司站在微软C#“巨人的肩膀”上，将编程语言的易用性，提升到一个新的高度。

而iOS上的两大官方UI组件库：UIKit/SwiftUI，则是我从开始编程以来，见过的最优秀的原生库。在此之前，为了写用户界面我尝试过许多方案：MFC、GTK、前端三件套、PyQt、甚至MATLAB自带的GUI工具。这些工具配置复杂，使用起来不流畅，想设计出简洁自适应的现代化UI难如登天。iOS的UI极大地减轻了“开发者兼职界面设计”这件事带来的心理负担。写功能的同时捎带手就能把UI搞定，开发的体验非常好。

回到标题中的问题，我为什么选择了苹果开发？

1. 我希望自己写出的程序是“高可读”的，即使完全不懂编程的人，也能像阅读常规文本一样理解程序语句的含义。
2. 我希望自己写出的程序运行在任何时代当下最好的平台上，拥有最先进的性能与功能，充分发挥硬件的优势。我不希望自己的程序因为需要满足兼容性的要求，而变得冗长、需要取舍、运行缓慢、充满跨平台配置。
3. 我希望自己写出的程序拥有谁都可以理解、上手即用、简洁易懂的用户界面。就像谷歌首页的搜索框、苹果设备的面容解锁、谷歌地球一样。
4. 我希望自己写的程序和现实世界存在直接联系。反例是完全和机器打交道的程序，例如硬件驱动、服务器分布式调度程序、测试集成发布脚本等等。

简言之，如果从事编程，那我希望自己做出的贡献是熵减的，能够让人们的生活和工作更轻松，而非反之。

苹果平台软件开发，在我转码的时间点，是这些问题最好的答案。🍎
The Nx Node/React Stack part 2 - Libraries
Tags: react, node, nx
Published: 2023-07-22 17:08:26

Now we have an environment, we need to start building our project, but nx will split the codebase into `apps` & `libs` let's make our understanding around both.

1. Apps: It contains mono projects, like web/backend apps, each app will contain code related to the respected service.
2. Library: The shared code code and types between apps, or it could be the logic container to a specific domain. ex: you may add a package for `redux slices` where it will share the slices across the micro frontends, or you can add classes that will be used across backend and frontend this will help teams to mutate one class across the domain, rather than having one class one the server and one on the browser aka `isomorphism`, some `libs` will not share code between `apps` specially with `core lib` where it will host the business logic of a domain.

> Each `lib/app` is a monorepo by itself

We need to install `next` & `node` where they will generate our ui and server `apps/libs`

add the following prop into `nx.json` from root dir
```json
"workspaceLayout": {
    "appsDir": "apps",
    "libsDir": "libs"
  },
``` 
make sure that you have `apps`/`libs` dirs, if not run:
```shell
mkdir ./apps
mkdir ./libs
```

Now let's install the `nx generators`
```shell
npm i @nx/node @nx/next --save-dev
```

Now we will generate shared-types lib:
```shell
nx g lib `shared-types`
```
now choose `@nx/node` package because we want `shared-types` lib to be served on both ends it needs to be on `node esm` standards, you may get mistaken and related @nx/node to `cjs` but it is not, nx is following the standards which makes it easier to share code.
![@nx/node package](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/reyytehg2sog2d8ze64k.png)

In the next section we will start setting up the next app!
Moving Writing to developing.dev
Published: 2023-07-22 16:56:56

I've been writing weekly for DEV for 4 months now (22 posts). Distribution is two orders of magnitude lower here compared to [my Substack](https://www.developing.dev/) so I'm going to stop posting here and just post there instead.

If you're looking for my writing, you may be interested in [subscribing to my Substack.](https://www.developing.dev/)

Thanks for reading,
[Ryan Peterman](https://www.linkedin.com/in/ryanlpeterman/)
Laravel 10 Tutorial
Published: 2023-07-22 16:32:30

If you're new to Laravel and are looking to create an e-commerce website with full featured admin panel, then this Laravel 10 tutorial is for you! 

In this first part of Laravel 10, you will learn, how to create an administrative panel in Laravel. We'll be using XAMPP / Composer / Laravel 10 to do this, so going to install this in this video!

After learning, how to create an admin panel in Laravel, you'll be able to manage your Laravel applications in a more centralized fashion. You'll also have a better understanding of how the Laravel admin panel works, which will make managing your applications easier!

We are going to use one of the best admin template i.e. AdminLTE 3 template for creating the admin panel in Laravel 10.0.

Laravel is one of the most popular PHP framework to develop websites. And recently, the Laravel 10 version has been launched that we will install and use it for creating the basic admin panel that can be used for any type of website like E-commerce, Social Networking, Forum, Education related etc.

You need to follow the below steps to install Laravel 10:-

1) Install Xampp or any other Apache Server
You can install the latest Xampp version from the below link:-
https://www.apachefriends.org/downloa...

2) Install Composer :-
Install Composer from the below link:-
https://getcomposer.org/download/

3) Install Laravel 10:-
Finally, install Laravel 10 via Composer Command:-
composer create-project --prefer-dist laravel/laravel project_name "10.*"

Stay tuned to learn more about "Laravel 10". Watch this video until the end so that you don't miss any important information.

{% embed https://youtu.be/0bfpkZ_kcjI %}
Elixir Weekly Tips #1 (Tips 1-5)
Tags: elixirtips
Published: 2023-07-22 16:38:10

---
title: Elixir Weekly Tips #1 (Tips 1-5)
published: true
date: 2023-07-22 16:14:14 UTC
tags: ElixirTips
canonical_url: https://www.thestackcanary.com/elixir-tips-of-the-week-1/
---

![Elixir Weekly Tips #1 (Tips 1-5)](https://www.thestackcanary.com/content/images/2023/07/Purple-Modern-Digital-Marketing-Banner.png)

## #1. IEx Helpers in Livebook

{% embed https://twitter.com/ac_alejos/status/1681115754442178561 %}

## #2. **`mix_recompile``?/0`** Function

{% embed https://twitter.com/ac_alejos/status/1681455512011911168 %}

## #3. `match?/2` Macro

{% embed https://twitter.com/ac_alejos/status/1681799287900971008 %}

## #4. The ` __binding__ /1` Macro

{% embed https://twitter.com/ac_alejos/status/1682516314584145924 %}

## #5. The ` __deriving__ /3` Macro

{% embed https://twitter.com/ac_alejos/status/1682165183416860672 %}
My First Post!
Tags: firstpost
Published: 2023-07-22 16:05:48

Hello everyone!

This is my first blog. I just wanted to get a feel of what it’s like to start blogging on Dev Community for the first time. I hope to turn my profile into a successful journey for everyone to learn more about software engineering. I have experience developing software and web applications using the latest framework technologies (primarily Node.JS and Python Django). My professional experience involves data engineering and manipulation, so I’m sure I will attract viewers interested to learn more about ETL/ELT and other data pipelines. I hope to gain some attraction here and create more content soon!
Learn Redis Or How DevOps Had To Do Back-End Work
Tags: database, python, docker, tutorial
Published: 2023-07-22 16:03:01

Welcome dear reader, I am Silent-Mobius, AKA Alex M. Schapelle, your devoted mechanical puppet that will lead with example of going through the learning of new topic.

As part of trying to understand back-end developers suffering, I have devised a plan to embark onto journey of building  python based micro-service application with local development on docker-compose and stage/prod deployment to Kubernetes with helm chart.

Yet, all that we already know how to do. What is missing database interaction, which I would like to get better at. Thus I have decided to learn Redis and to develop with it my home page application on : [My Web-Site](https://aschapelle.com)

As mentioned I have a plan that looks like this:

| Learn Redis With Project|Description|
|--------------|----------------------|
| Project      | Create architecture  |
| Application  | Create application and Version control |
| Database     | Learn basics of Redis and implement with application |
| Micro Services | Set all local development env with docker-compose | 
| Migration to K8S | Setup k8s manifests and generate helm chart |

This will be for starters. Hope that this makes you hyped as I am at the moment. Thus follow my example and do try to have some fun.
The fastest way to update Node.js on your Mac
Tags: node, npm, macos, javascript
Published: 2023-07-22 15:38:52

If you are using any new JavaScript libraries in the NPM, it is important to ensure that you have the latest version of Node.js installed. Keeping your Node.js up to date is crucial.

Now, let’s explore the simplest and fastest method to accomplish this on your macOS!

Type this command in terminal to check your Node.js version:

```
$ node -v
```

Here’s what the output should look like:

```
v x.x.x
```

If you haven’t installed the n package yet, use npm to install it.

```
$ sudo npm install -g n
```

After installing the n package, you can proceed to update your Node.js to the desired version.

Use this command to install the stable node release:

```
$ sudo n stable
```

Use this command to install/update the latest node release:

```
$ sudo n latest
```

Use this command to install/update the latest LTS node release:

```
$ sudo n lts
```

![Output of “sudo n lts“ command.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9abw7kkjxsmh7gqitecy.png)

That’s all! You can confirm the successful update by checking your Node.js version once again.

Thank you for Reading. 😃
AI in Wildlife Conservation: Transforming the Future of Animal Protection
Tags: ai
Published: 2023-07-22 14:37:00

Artificial Intelligence (AI) is revolutionizing various industries, and wildlife conservation is no exception. In recent years, AI-powered solutions have emerged as powerful tools to address critical challenges in animal protection and conservation efforts. This article explores the exciting ways AI is being employed to safeguard endangered species, monitor wildlife populations, and foster sustainable coexistence between humans and animals.

## AI-Driven Image Recognition for Species Identification

Traditional methods of species identification in the field can be time-consuming and error-prone. We delve into how AI-based image recognition systems are being deployed to automatically identify and track wildlife species from camera trap footage, drone images, and even photographs shared by citizen scientists. This technology streamlines data analysis, empowering researchers and conservationists to efficiently monitor species populations and trends.

## Predictive Analytics for Habitat Preservation

AI-powered predictive analytics offer the potential to revolutionize habitat preservation and restoration efforts. By analyzing vast amounts of environmental data, including climate patterns, land use changes, and habitat health, AI algorithms can forecast potential threats to animal habitats and suggest proactive conservation measures. We examine case studies where AI-driven predictions have successfully guided conservation efforts, preventing habitat loss and ensuring the survival of endangered species.

## Smart Collars and Tracking Devices for Wildlife Management

AI-enhanced smart collars and tracking devices have opened new avenues for wildlife management and understanding animal behavior. These devices can gather intricate data on an animal's movement patterns, feeding habits, and interactions with their environment. We explore how AI algorithms process and analyze this data, providing valuable insights into animal migrations, habitat preferences, and potential conflicts with human activities.

## AI-Powered Anti-Poaching and Wildlife Crime Prevention

Poaching and illegal wildlife trade continue to pose significant threats to many species. AI is playing a critical role in combating these crimes by analyzing data from various sources, such as satellite imagery, social media, and online marketplaces. We shed light on how AI algorithms can detect suspicious activities, identify potential poaching hotspots, and assist law enforcement agencies in their efforts to curb wildlife crimes. If you are a animal lover checkout this [website](https://ohanimal.com/).

## Conclusion

As technology and AI continue to advance, their integration with animal conservation efforts offers unprecedented potential for safeguarding our planet's biodiversity. The combination of tech and animal conservation represents a powerful partnership that will undoubtedly shape the future of wildlife protection and promote harmony between humans and the animal kingdom.