Dahlia  Muller

Dahlia Muller

1605673499

First Helmet Detector using YOLOv5

Mobility is a priority theme for the European Union in the context of urban development. At the same time, hundreds of people, including cyclists and pedestrians, lose their lives on the roads. Therefore, planning and ordering of cities through appropriate infrastructures is urging, alongside a safe and efficient transport network aimed at active mobility — both on foot and by bicycle.It is now presented the object detection model that was trained to identify whether cyclists are wearing a helmet and, potentially, studying their prevalence.YOLOv5YOLOv5 is the most recent version of YOLO which was originally developed by Joseph Redmon. First version runs in a framework called Darknet which was purposely built to execute YOLO. Version 5 is the second model that was not developed by the original author (after version 4), and the first running in a state-of-the-art machine learning framework — PyTorch. YOLOv5 GitHub repository contains a pre-trained model in the MS Coco dataset. Plus, benchmark tests (Figure 1) on the same dataset and detailed documentation on how to execute or retrain it using different data.

Image for post

Figure 1 The most up to date YOLO model is the version 5 (July 2020). It was released with 4 different sets of weights varying in accuracy and storage requirements. The presence of EfficientDet (the most accurate OD model) highlights the speed of detection of YOLOv5, while keeping the same high accuracy.

In Table 1, there is a comparison in terms of precision, speed and storage requirements for each YOLOv5 set of available weights.

Image for post

Table 1 Specifications for all sets of weights released with YOLOv5. Generally, as average precision increases, more processing power is required from the GPU to be executed.

The architecture of YOLOv5 consists in three important parts, as in any single-stage object detector: model backbone, neck and head. The first is used to extract the main features of a given input image. In version 5, Cross Stage Partial Networks are used. These have shown significant improvements in processing time with deeper networks. Model neck PANet was used to obtain feature pyramids and helps generalizing the model on object scaling. The final detection part is performed by the head of the model (same as in YOLOv3 and YOLOv4). It applies anchor boxes on features and generates output vectors including class probabilities and bounding boxes.Each potential detection has an associated confidence score. This indicates how certain is the model about the presence of an object inside the bounding box and, at the same time, whether the box is capturing it correctly.

#deep-learning #yolo #artificial-intelligence #developer

What is GEEK

Buddha Community

First Helmet Detector using YOLOv5

Why Use WordPress? What Can You Do With WordPress?

Can you use WordPress for anything other than blogging? To your surprise, yes. WordPress is more than just a blogging tool, and it has helped thousands of websites and web applications to thrive. The use of WordPress powers around 40% of online projects, and today in our blog, we would visit some amazing uses of WordPress other than blogging.
What Is The Use Of WordPress?

WordPress is the most popular website platform in the world. It is the first choice of businesses that want to set a feature-rich and dynamic Content Management System. So, if you ask what WordPress is used for, the answer is – everything. It is a super-flexible, feature-rich and secure platform that offers everything to build unique websites and applications. Let’s start knowing them:

1. Multiple Websites Under A Single Installation
WordPress Multisite allows you to develop multiple sites from a single WordPress installation. You can download WordPress and start building websites you want to launch under a single server. Literally speaking, you can handle hundreds of sites from one single dashboard, which now needs applause.
It is a highly efficient platform that allows you to easily run several websites under the same login credentials. One of the best things about WordPress is the themes it has to offer. You can simply download them and plugin for various sites and save space on sites without losing their speed.

2. WordPress Social Network
WordPress can be used for high-end projects such as Social Media Network. If you don’t have the money and patience to hire a coder and invest months in building a feature-rich social media site, go for WordPress. It is one of the most amazing uses of WordPress. Its stunning CMS is unbeatable. And you can build sites as good as Facebook or Reddit etc. It can just make the process a lot easier.
To set up a social media network, you would have to download a WordPress Plugin called BuddyPress. It would allow you to connect a community page with ease and would provide all the necessary features of a community or social media. It has direct messaging, activity stream, user groups, extended profiles, and so much more. You just have to download and configure it.
If BuddyPress doesn’t meet all your needs, don’t give up on your dreams. You can try out WP Symposium or PeepSo. There are also several themes you can use to build a social network.

3. Create A Forum For Your Brand’s Community
Communities are very important for your business. They help you stay in constant connection with your users and consumers. And allow you to turn them into a loyal customer base. Meanwhile, there are many good technologies that can be used for building a community page – the good old WordPress is still the best.
It is the best community development technology. If you want to build your online community, you need to consider all the amazing features you get with WordPress. Plugins such as BB Press is an open-source, template-driven PHP/ MySQL forum software. It is very simple and doesn’t hamper the experience of the website.
Other tools such as wpFoRo and Asgaros Forum are equally good for creating a community blog. They are lightweight tools that are easy to manage and integrate with your WordPress site easily. However, there is only one tiny problem; you need to have some technical knowledge to build a WordPress Community blog page.

4. Shortcodes
Since we gave you a problem in the previous section, we would also give you a perfect solution for it. You might not know to code, but you have shortcodes. Shortcodes help you execute functions without having to code. It is an easy way to build an amazing website, add new features, customize plugins easily. They are short lines of code, and rather than memorizing multiple lines; you can have zero technical knowledge and start building a feature-rich website or application.
There are also plugins like Shortcoder, Shortcodes Ultimate, and the Basics available on WordPress that can be used, and you would not even have to remember the shortcodes.

5. Build Online Stores
If you still think about why to use WordPress, use it to build an online store. You can start selling your goods online and start selling. It is an affordable technology that helps you build a feature-rich eCommerce store with WordPress.
WooCommerce is an extension of WordPress and is one of the most used eCommerce solutions. WooCommerce holds a 28% share of the global market and is one of the best ways to set up an online store. It allows you to build user-friendly and professional online stores and has thousands of free and paid extensions. Moreover as an open-source platform, and you don’t have to pay for the license.
Apart from WooCommerce, there are Easy Digital Downloads, iThemes Exchange, Shopify eCommerce plugin, and so much more available.

6. Security Features
WordPress takes security very seriously. It offers tons of external solutions that help you in safeguarding your WordPress site. While there is no way to ensure 100% security, it provides regular updates with security patches and provides several plugins to help with backups, two-factor authorization, and more.
By choosing hosting providers like WP Engine, you can improve the security of the website. It helps in threat detection, manage patching and updates, and internal security audits for the customers, and so much more.

Read More

#use of wordpress #use wordpress for business website #use wordpress for website #what is use of wordpress #why use wordpress #why use wordpress to build a website

Suresh Ramani

Suresh Ramani

1646831366

How to use Tailwind CSS with a React App

What is Tailwind CSS?

Tailwind is a modern CSS framework. It is a utility-first-based framework and provides you with a unique set of utility classes which makes the development process very easy and results in making a unique design. Utility-first CSS is fast, robust, and very efficient making your coding hassle-free. Tailwind CSS is also not opinionated; it means you are totally free to customize the design lament and website's component.

Tailwind is a power pack of everything you need to create a website without writing any custom CSS. The main difference between Tailwind and its competitors is that it gives developers complete control over the styling of a web application.

Why Use Tailwind CSS?

There’s a lot that goes on in web development. It can sometimes, thus, become an overly complicated task. Mapping the impact of styling might become tedious and time-consuming hampering the progress of the application/website.

Implementing Tailwind CSS will eliminate all the above-mentioned issues. Tailwind CSS creates small utilities with a defined set of options enabling easy integration of existing classes directly into the HTML code. Custom styling can be provided to the components with the help of this framework.

Tailwind CSS: Pros and Cons

Tailwind CSS: Advantages

  1. Control Over Styling
  2. Faster CSS Styling Process
  3. Responsiveness and Security
  4. Additional Features

Tailwind CSS: Disadvantages

  1. Styling and HTML are Mixed
  2. It Takes Time to Learn
  3. Lack of Important Components
  4. Documentation

In this blog, we’ll demonstrate how to make Tailwind CSS work inside your React project without having to eject Create React App.

Using Tailwind CSS in your React App

First, open your terminal and type the following commands to create a new project.

#using NPX
npx create-react-app tailwindreact-app

#using NPM
npm init react-app tailwindreact-app

#using yarn 
yarn create react-app tailwindreact-app

create-react-app is the official React build tool for scaffolding new React projects. It leverages webpack and babel and reduces the hassle of configuring and setting up the build processes for projects, allowing you to focus on writing the code that powers your app.

Next, install Tailwind and its dependencies:

cd tailwindreact-app

npm install tailwindcss postcss-cli autoprefixer -D

We need to initialize Tailwind CSS by creating the default configurations. Type the command below in your terminal:

npx tailwind init tailwind.config.js --full

This command creates a tailwind.js in your project’s base directory; the file contains the configuration, such as our colors, themes, media queries, and so on. It’s a useful file that helps with predefined sets of properties which will aid the need to re-brand certain conventions or properties if the need arises.

Now update tailwind.config.js:

module.exports = {
  content: ["./src/**/*.{js,jsx,ts,tsx}"],
}

Checkout This Tool: Open Port Check Tool

How To Configure PostCSS?

The PostCSS documentation states that:

“PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more.”

Why Autoprefixer?

It’s necessary to install Autoprefixer alongside Tailwind CSS because Autoprefixer usually tracks caniuse.com to see which CSS properties need to be prefixed. Hence, Tailwind CSS does not provide any vendor prefixes. If you’re curious as a cat in regards to PostCSS navigates to their documentation.

Create a PostCSS configuration file in your base directory manually or using the command:

touch postcss.config.js

Add the following lines of code to your PostCSS file:

const tailwindcss = require('tailwindcss');
module.exports = {
    plugins: [
        tailwindcss('./tailwind.config.js'),
        require('autoprefixer')
    ],
};

Because PostCSS is necessary to lint our CSS, hence this configuration.

Read More

Dejah  Reinger

Dejah Reinger

1599921480

API-First, Mobile-First, Design-First... How Do I Know Where to Start?

Dear Frustrated,

I understand your frustration and I have some good news and bad news.

Bad News First (First joke!)
  • Stick around another 5-10 years and there will be plenty more firsts to add to your collection!
  • Definitions of these Firsts can vary from expert to expert.
  • You cannot just pick a single first and run with it. No first is an island. You will probably end up using a lot of these…

Good News

While there are a lot of different “first” methodologies out there, some are very similar and have just matured just as our technology stack has.

Here is the first stack I recommend looking at when you are starting a new project:

1. Design-First (Big Picture)

Know the high-level, big-picture view of what you are building. Define the problem you are solving and the requirements to solve it. Are you going to need a Mobile app? Website? Something else?

Have the foresight to realize that whatever you think you will need, it will change in the future. I am not saying design for every possible outcome but use wisdom and listen to your experts.

2. API First

API First means you think of APIs as being in the center of your little universe. APIs run the world and they are the core to every (well, almost every) technical product you put on a user’s phone, computer, watch, tv, etc. If you break this first, you will find yourself in a world of hurt.

Part of this First is the knowledge that you better focus on your API first, before you start looking at your web page, mobile app, etc. If you try to build your mobile app first and then go back and try to create an API that matches the particular needs of that one app, the above world of hurt applies.

Not only this but having a working API will make design/implementation of your mobile app or website MUCH easier!

Another important point to remember. There will most likely be another client that needs what this API is handing out so take that into consideration as well.

3. API Design First and Code-First

I’ve grouped these next two together. Now I know I am going to take a lot of flak for this but hear me out.

Code-First

I agree that you should always design your API first and not just dig into building it, However, code is a legitimate design tool, in the right hands. Not everyone wants to use some WYSIWYG tool that may or may not take add eons to your learning curve and timetable. Good Architects (and I mean GOOD!) can design out an API in a fraction of the time it takes to use some API design tools. I am NOT saying everyone should do this but don’t rule out Code-First because it has the word “Code” in it.

You have to know where to stop though.

Designing your API with code means you are doing design-only. You still have to work with the technical and non-technical members of your team to ensure that your API solves your business problem and is the best solution. If you can’t translate your code-design into some visual format that everyone can see and understand, DON’T use code.

#devops #integration #code first #design first #api first #api

Noah Saunders

Noah Saunders

1637306902

How List Comprehension Works in Python

List Comprehension in Python

Lists are a helpful and frequently used feature in Python.

And list comprehension gives you a way to create lists while writing more elegant code that is easy to read.

In this beginner-friendly article, I'll give an overview of how list comprehension works in Python. I'll also show plenty of code examples along the way.

Let's get started!

How to use a for loop to create a list in Python

One way to create a list in Python is by using a for loop.

For example, you can use the range() function to create a list of numbers ranging from 0 - 4.

#first create an empty list
my_list = []

#iterate over the numbers 0 - 4 using the range() function
#range(5) creates an iterable, starting from 0 up to (but not including) 5
#Use the .append() method to add the numbers 0 - 4 to my_list

for num in range(5):
    my_list.append(num)
    
#print my_list
print(my_list)

#output
#[0, 1, 2, 3, 4]

What if you already have a list of numbers, but want to create a new list with their squares?

You could again use a for loop, like so:

#initial list of numbers
numbers = [1,2,3,4,5,6]

#create a new,empty list to hold their squares
square_numbers = []

#iterate over initial list
#multiply each number by itself
#use .append() method, to add the square to the new list, square_numbers

for num in numbers: 
    square_numbers.append(num * num)

#print new list
print(square_numbers)

#output
#[1, 4, 9, 16, 25, 36]

But there is a quicker and more succinct way to achieve the same results – by using list comprehension.

What is list comprehension in Python? A syntax overview

When you're analyzing and working with lists in Python, you'll often have to manipulate, modify, or perform calculations on every single item in the list, all at once.

You may also need to create new lists from scratch, or create a new list based on the values of an already existing list.

List comprehension is a fast, short, and elegant way to create lists compared to other iterative methods, like for loops.

The general syntax for list comprehension looks like this:

new_list = [expression for variable in iterable]

Let's break it down:

  • List comprehensions start and end with opening and closing square brackets, [].
  • Then comes the expression or operation you'd like to perform and carry out on each value inside the current iterable. The results of these calculations enter the new list.
  • The expression is followed by a for clause.
  • variable is a temporary name you want to use for each item in the current list that is going through the iteration.
  • The in keyword is used to loop over the iterable.
  • iterable can be any Python object, such as a list, tuple, string and so on.
  • From the iteration that was performed and the calculations that took place on each item during the iteration, new values were created which are saved to a variable, in this case new_list. The old list (or other object) will remain unchanged.
  • There can be an optional if statement and additional for clause.

How to use list comprehension in Python

Using the same example from earlier on, here is how you'd create a new list of numbers from 0 - 4 with the range() function in just one single line, using list comprehension:

new_list = [num for num in range(5)]

print(new_list)

#output
#[0, 1, 2, 3, 4]

This has the same output as the for loop example, but with significantly less code!

Let's break it down:

  • the iterable in this case is a sequence of numbers from 0 to 4, using range(5). range() constructs a list of numbers.
  • You use the in keyword to iterate over the numbers.
  • The num following the for clause is a variable, a temporary name for each value in the iterable. So num would be equal to 0 in the first iteration, then num would be equal to 1 in the next iteration and so on, until it reached and equalled the number 4, where the iteration would stop.
  • The num before the for clause is an expression for each item in the sequence.
  • Finally, the new list (or other iterable) that is created gets stored in the variable new_list.

You can even perform mathematical operations on the items contained in the iterable and the result will be added to the new list:

new_list = [num * 2 for num in range(5)]

print(new_list)

#output
#[0, 2, 4, 6, 8]

Here each number in range(5) will be multiplied by two and the new value will be stored in the variable new_list.

What if you had a pre-existing list where you wanted to manipulate and modify each item in it? This would be similar to the example from earlier on, where we created a list of squares.

Again, you can achieve that with just one line of code, using list comprehension:

#initial list
numbers = [1,2,3,4,5,6]

#new list
#num * num is the operation that takes place to create the squares

square_numbers = [num * num for num in numbers]

print(square_numbers)

#output
[1, 4, 9, 16, 25, 36]

How to use conditionals with list comprehension in Python

Optionally, you can use an if statement with a list comprehension.

The general syntax looks like this:

new_list = [expression for variable in iterable if condition == True]

Conditionals act as a filter and add an extra check for additional precision and customisation when creating a new list.

This means that the value in the expression has to meet certain criteria and a certain condition you speficy, in order to go in the new list.

new_list = [num for num in range(50) if num % 2 == 0]

print(new_list)

#output
#[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48]

In the example above, only the values where the condition num % 2 == 0 is checked and evaluates to True will enter new_list.

The modulo operator is used on every single one of the numbers in the sequence of numbers starting from 0 and ending in 49.

If the remainder of the numbers when divided by 2 is 0, then and only then does it enter the list.

So in this case, it creates a list of only even numbers.

You can then make it as specific as you want.

For example, you could add more than one condition, like so:

new_list = [num for num in range(50) if  num > 20 and num % 2 == 0]

print(new_list)

#output
#[22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48]

In this example, there are two conditions num > 20 and num % 2 == 0.

The and operator indicates that both have to be met in order for the value to be added to the new list.

The values that don't meet the conditions are excluded and are not added.

How to use list comprehension on strings in Python

You can create a new list with the individual characters contained in a given string.

fave_language_chars = [letter for letter in "Python"]

print(fave_language_chars)

#output
#['P', 'y', 't', 'h', 'o', 'n']

The new list that gets created is comprised of all the separate letters contained in the string "Python", which acts as an iterable.

Just like numbers, you can perform operations on the characters contained in a string and customize them depending on how you want them to be in the new list you create.

If you wanted all letters to be uppercase, you would do the following:

fave_language_chars_upper = [letter.upper() for letter in "Python"]

print(fave_language_chars_upper)

#output
#['P', 'Y', 'T', 'H', 'O', 'N']

Here you use the .upper() method to convert every single letter in "Python" to uppercase and add them to the fave_language_chars_upper variable.

The same goes if you wanted all your letters to be lowercase - you'd instead use the lower() method.

Conclusion

And there you have it! You now know the basics of list comprehension in Python.

It offers an elegant and concise syntax for creating new lists based on existing lists or other iterables.

Original article source at https://www.freecodecamp.org

#python 

What is Helmet.insure (HELMET) | What is HELMET token

What is Helmet?

Helmet is a peer-to-peer price-shield insurance protocol on BSC ( Binance Smart Chain), originated from option trading logic. Helmet allows everyone to create insurance policy of any cryptoasset easily in the market, protecting DeFi users against the risk of price fluctuations.

Token distribution:

  • HELMET (Helmet.insure Governance Token) is a governance token issued by helmet.insure. The total supply is 100 million.
  • The HELMET token will witness a multi-year schedule, with the first year of a total of 50 million tokens distribution. Details :
  • 10% (10 million) for IFO boarding plan
  • 7.5% (27.5 million) will be allocated to HELMET community members.
  • 30% can be earned through policy mining in the first year
  • 50% can be earned through LPT mining in the first year.
  • 20% can be earned through governance or vote on proposals in the first year.
  • 5% (5 million) will be farmed and reserved for one year as developer fund
  • 7.5% (7.5 million) will be use for partner with BSC ecological construction as Vault

Features:

  • Redefine Option trading. Option tokens do not rely on the Oracle or the Admin, but operate independently as a smart contract.
  • Market-oriented without complex mathematics. Types of insurance are designed by policy suppliers, allowing them to flexibly assemble the parameters of insurance policy. Anyone can participate in this market and earn rewards by simply depositing an underlying token asset.
  • Each policy (option) is endorsed at the nominal value held by users, which eliminates counterparty’s risk and ensures that the option holder can always purchase the underlying token;
  • Add the mining part in hedging price vilotation risks. SHORT Token (get by supplying policy) and HELMET can be used in mining HELMET.
  • Open to all defi protocols. Partners of helmet could share users traffic in the whole ecosystem.

Why Helmet?

In traditional financial market , derivatives such as options has been shown as effective in hedging the risks of market volatility. But the market lack transparency and better infrastructure to improve efficiency. Considering that assets with high liquidity were eligible to be designed as options products, “The Options” became a unique tool to serve commodity traders.

With DeFi’s infrastructure, anyone has right to price an asset on SWAP with unlimited liquidity. What makes us thinking is that if there’s a tool or a platform where a crypto trader or holder could simply issue an advanced ‘price based insurance’ which could hedge price fluctuation and get rewards at the same time. Such things could help DeFi users and traders to reasonably evaluate their holding and risks.

We expect a picture that anyone in DeFi world, instead of centralized institutions, could create hedging tool for others at any time.

It’s time to redefine"Option".

Introduction

Helmet is a peer-to-peer insurance protocol written by option trading logic, which allows anyone to create any insurance policy easily in the market**.**

Unlike other insurance products you may have used, Helmet does not solve the problem of “Code Attack Risk” but allows DeFi users to be protected against the risk of price fluctuations.

Helmet.insure, developed on BSC ( Binance Smart Chain), specialize in providing price-shield insurance for BSC assets. The types of insurance depends on token holders and traders.

Helmet offers insurance suppliers the right to “LOGO” modules by four elements——including insurance usage scenarios, type of insurance asset, insurance period, and insurance prices, allowing suppliers to flexibly assemble the types of insurance to sell and giving a variety of hedging strategies to the market.

In order to brief how to use the product, we have developed several insurance products as examples : “Cover 100% up” , "Cover 50% off ".

There are two roles in Helmet eco, Policy Supplier and Policy Holder. Supplier is the creator & seller of insurance policy. When they make the selling order to market, they could earn a little stable Helmet token reward. Holder is the buyer of insurance, and they could get the policy by paying to Supplier. When the policy mature, they could choose to claim or abstain the insurance based on the SWAP price. For example, Peter bought a 1 month of "Cover 50% off " insurance of A token, in this period, the price of A dump 50%, then Peter could claim it and earn a premium to hedge his lose.

How does Helmet work?

Policy Supplier

Policy Supplier publish an insurance policy for sale by deposit the denominated assets and get SHORT Token.

We encourage project teams themselves or Token holders of project to become Suppliers to show reasonable expectation of token price for users.

How to become a Supplier

  1. Ready denominated asset, choose the insurance type (cover up or off)
  2. Price the premium
  3. Publish insurance policy by depositing denominated assets
  4. Get back the denominated assets or get the insured assets from buyers after they activate the policy

Benefits

Cover up:

  • Provide insurance for LPs, encourage more people provide liquidity
  • Earn premium
  • Participates in SHORT Token mining by staking the Short Token

Cover off:

  • Provide a bottom price of Token for users
  • Avoid the underlying assets(object be insured)liquidity provider’s impermanent loss
  • Earn premium
  • Participates in SHORT Token mining by staking the Short Token
  • Another way to buy insured assets at a reasonable price with earning premium when the token’s liquidity is low.

Policy holder

Policy holder could get LONG Token to avoid the price dump loss when they “farm”.

How to become a holder

  • Buy a cover up or cover off policy in the market

Benefits

  • The insured asset’s price will be protected in policy time period
  • When the price of insured assets higher or lower than the policy set price, holders could activate the policy to claim.

Risk

  • If holders do not activate the policy, they would lose the premium

Example

Ryan who holds BNB, wants to participate in LPT(Liquidity provider Token)mining, but he worries about the HELMET dump. So he needs a hedging tool.

If 1 HELMET is equal to 4.5 BNB. He spends 0.1 BNB to buy a cover 50% off policy at 2.25 BNB on Helmet.insure. A week later, Ryan decides to stop mining and withdrew HELMET, finding that the HELMET dump to 2 BNB, so he activated the policy. Correspondingly, he could swap 1 HELMET for 2.25 BNB, avoiding the loss of 0.25 BNB by paying only 0.1 BNB premium.

Please add our communication channel to keep you up to date! Looking for more information…

WebsiteExplorerExplorer 2Source CodeSocial ChannelMessage BoardCoinmarketcap

Would you like to earn HELMET right now! ☞ CLICK HERE

Top exchanges for token-coin trading. Follow instructions and make unlimited money

BinanceBittrexPoloniexBitfinexHuobi

 Thank for visiting and reading this article! I'm highly appreciate your actions! Please share if you liked it!

#bitcoin #blockchain #helmet.insure #helmet