How to load an image in Keras from a url ?
How to load an image in Keras for machine learning from a url ?
For loading image in Keras we used to write code like this
img = keras.utils.load_img(path="OIP.jpg",
color_mode = "grayscale",target_size=(28,28,1))
How about using a image URL instead of the above code?
Need to perform couple of things.
Get response from the image url.
Get the image as byte using ByteIO
Covert the image as…
View On WordPress
0 notes
Get predicted class in Keras Sequential Model
 In Keras Sequential Model problems we can get predicted result as output. As a beginner you may note that it is not what you expected.
So how do we get the actual label for that image.?
In image classification we get a predicted result which is pointed to corresponding label.Â
In such a case use the NumPy’s argmax function.
img_class = model.predict(test_img)
prediction =…
View On WordPress
0 notes
Hand Picked free AI tools for content managers
AI content generators are the future of copywriting. With the help of AI, copywriters can generate high-quality content at scale. No longer do you need to spend hours on research and writing, as an AI writer can generate content for you in a fraction of the time. Moreover, AI writers are programmed to understand human language and provide relevant and accurate responses to queries. Companies…
View On WordPress
0 notes
Create a dark mode theme switch in Nextjs 13
Creating React powered JavaScript application using Nextjs is easy. This example utilizes the experimental features of Nextjs 13.
I assume that you have Nextjs project ready in hand, otherwise follow the Next 13 app setup guide.
Theming the App
For theming I have been using Tailwind and for dark theme we can use a minimal library, next-themes.
Install the library using yarn or npm
$ npm…
View On WordPress
0 notes
Ultimate DevExpress WinForm Guides
DevExpress is a professional .Net library enriched data capability which allows developers easy generates reports, analytics, generate reports in various formats.
I wrote few of the WinForm guides which may help beginners to tune the DevExpress.
Bing List with Grid Control
Add a custom summary to Grid Control
Format Grid Column with Currency Format
Ultimate DevExpress WinForm Guides
View On WordPress
0 notes
C#.Net connecting strings
I found the following guide useful for setup databases for projects (.Net). This includes the setup guides for MySQL, MariaDB and SQLite connections , can be used with MVC and Repository pattern and Dapper ORM
MariaDB Guide
Sqlite Guide
MySQL Guide
View On WordPress
0 notes
Inner join
Hobby meet my profession Manoj AP, github.com/devmnj
View On WordPress
0 notes
Zustand, a minimal store for Rreactjs
Zustand, a minimal store for Rreactjs
I have been depending on Context for passing state through components in React and eventually thinks complicated when data is become complex. Move on to beautiful Redux is a bit expensive.
For learning Redux I have spent lots of time and Redux Toolkit, easy to use Redux, saved me a lot.
Even though RTK is ok, it is not a simple library. I am fan of Svelte store and Vuex, Pinia store. Is there…
View On WordPress
0 notes
Layout roots in Remix
Layout roots in Remix
Under the route folder we can create our folder-based route in Remix. The home route can be found named as index.jsx.
Sometimes we need to display same UI for all pages, for instance a navbar for every route or sidebar links for every marketing page. This is where layouts come into play.
Root
Root layout is the default layout. If you need different layout for every page leave the root.jsx…
View On WordPress
0 notes
Matching a non-existing/404 route in Remix
Matching a non-existing/404 route in Remix
The route directory of Remix is the home for all of the navigation paths, or they are the individual pages.
So how should I catch a route when someone hit non existing page? A default route will fire automatically, but sometimes we need to create one. How?
Remix allow us to define a $.jsx route and export a React component which will catch all routes. So, try to create one now. See the…
View On WordPress
0 notes
How to use styles in Remix
How to use styles in Remix
In Reactjs and Nextjs we usually use module bases styles. Remix has its own way for handling style sheets.
links
By defining and expoerting a links funtion in any component, route, Remix will apply those styles to that file. Go head and use those classes.
I gusess that , we can use multipple style sheets since the links functions return an array of style object.
import React from "react";
import…
View On WordPress
0 notes
Not found page UI in Nextjs 13
Not found page UI in Nextjs 13
Nextjs 13 comes with lots of experimental features, one of them was the appDir. Let’s talk about the setup a not found page.
Suppose we want to show not found page for the non-existing route. Nextjs allow you to define a custom Not Found page in app directory.
Create a not-found.jsx/tsx file in the route path and export a component with some cool UI and that’s it.
Each time a wrong path is…
View On WordPress
0 notes
Async Data fetching in Remix
Async Data fetching in Remix
Remix is another JavaScript framework for building beautiful web app. May be a better Nextjs killer framework.
So let’s talk about the data fetching in Remix route.
In Remix we can fetch date from API with useLoaderData hook. First up all define and export a loader function in the route.
export const loader = async () => {
const res = await client.fetch(
`*[_type ==…
View On WordPress
0 notes
Implementing a loading UI in Nextjs 13
Implementing a loading UI in Nextjs 13
Nextjs 13 comes with lots of experimental features, one of them was the appDir. Let’s talk about the loading UI.
Suppose we want to show some UI, may be some cool spinner while data is fetching from the server.
Usually, such UI can be implemented by checking the loading status or wrapping the JSX within a suspense block.
In Next’s latest version they have provided a loading UI, which handle…
View On WordPress
0 notes
How to fetch data in Nextjs 13 appDir
How to fetch data in Nextjs 13Â appDir
Nextjs 13 comes with lots of experimental features, one of them was the appDir. Let’s talk about the data fetching in Nextjs 13.
In the older version we have fetched data in Next app with static props function and passes it down to component as props.
Things have been changed a lot. In appDir data fetching is done at server side and will be available to client. It also improvises the…
View On WordPress
0 notes
Nextjs 13 Sanity Blog app
Nextjs 13 Sanity Blog app
A super-fast, SEO ready front-end app made Nextjs 13 experimental features. Fo styling, I rely on Tailwind CSS and DaysiUI .
Features
Versel deployable
SEO enabled
Comment section
Dark theme based
Packages Used
Nodejs
Nextjs 13
Sanity CMS
Syntax Highlighter
Tailwind
Project Repo and source code
Feel free to fork and use the GitHub Repo and please leave comments and suggestions.
View On WordPress
0 notes
Svelte Sanity Blog App
Svelte Sanity Blog App
A super-fast, SEO ready front-end app made Svelte and Svelte Kit. Fo styling, I rely on Tailwind CSS and DaysiUI .
Svelte made me to build this app with ease and peace. Compared to react I made it with lesser effort.
Features
Versel deployable
SEO enabled
Comment section
GA enabled
Super-fast
Performant
Dark theme based
Packages Used
Nodejs
Svelte
Sanity CMS
Syntax…
View On WordPress
0 notes