Stable Diffusion: AI Image generation
Oracle SOA and Java Blog
by
1M ago
To quote Wikipedia (here): "Stable Diffusion is a deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it can also be applied to other tasks such as inpainting, outpainting, and generating image-to-image translations guided by a text prompt.". This of course sounds nice, but what makes it special and how can you use it? What makes Stable Diffusion special? The dataset The Stable Diffusion model was trained on three subsets of LAION-5B: laion2B-en, laion-high-resolution, and laion-aesthetics v2 5+. These ..read more
Visit website
Python: Batch resize and pad files
Oracle SOA and Java Blog
by
1M ago
When using AI models like Stable Diffusion, sometimes input images need to be of a specific size. In case of Stable Diffusion, multiples of 64 are required. Stable Diffusion (at least 1.5) works best with images of 512 pixels in width or height. If you for example take an image of 599 x 205 pixels and you resize it to 1496 x 512 (maintaining the aspect ratio), you end up with 1496, which is not a multiple of 64. In order to obtain a usable image, it needs to be padded to a size of 1536 x 512 to allow processing. In order to batch resize and pad images I created a Python script using OpenCV. Wh ..read more
Visit website
Apache NiFi: Filter events and only let through the latest in a timeframe
Oracle SOA and Java Blog
by
1M ago
In the IoT world, some devices generate large volumes of events that can be difficult for back-end systems to process in real time. Of course you can use NiFi to throttle messages. However, this will not be sufficient if the flow of events is consistently higher than what can be handled by the back-end system. A way to deal with this is to let Apache NiFi group and filter messages based on a specific attribute and only letting through the latest message for a specific device, in a certain timeframe. In this blog post I'll illustrate how you can do this. The trick is to merge several messages t ..read more
Visit website
Reduce your gas and electricity bill!
Oracle SOA and Java Blog
by
4M ago
This is not a usual topic for this blog but I wanted to share this anyway so people can refer to it and use it. Due to the current challenges on the energy market, prices for both gas and electricity in the Netherlands and probably Europe as a whole have risen dramatically. The prices are currently so high large groups of people cannot pay their gas and electricity bills anymore. In this blog post I'll give some suggestions for things which can help you reduce your gas and electricity bill. Some of these are specific to the Netherlands.  What I'm trying to do is to optimize my gas/energy ..read more
Visit website
Apache NiFi: Monitoring metrics and provenance events using Azure Log Analytics
Oracle SOA and Java Blog
by
4M ago
There are several cases where you might want to use Azure Log Analytics to monitor your NiFi instances. An obvious one is when NiFi is running in Azure. Azure Log Analytics can also be used as single monitoring/alerting solution for multiple applications making operations easier by providing a single interface for this. You might want this if you want to monitor business processes which span multiple applications and you want to monitor the entire process to for example identify bottlenecks. In this blog post I'll show you how easy it is to achieve this using the AzureLogAnalyticsReportingTask ..read more
Visit website
Apache NiFi: Importing and exporting parameters
Oracle SOA and Java Blog
by
9M ago
When you import a new process group or upgrade an existing one, missing parameters contexts and parameters will automatically be added. The new parameters will be filled with values from the environment where the process group was committed to the Registry (except sensitive parameter values). This is usually a development environment. NiFi 1.15 adds parameter context inheritance. If however you are on a lower version and have many similar process groups, you can have many copies of parameter contexts. If you add a large number of flows and need to add a large number of parameter contexts, it c ..read more
Visit website
OWASP Dependency-Check to SonarCloud
Oracle SOA and Java Blog
by
9M ago
SonarCloud is a hosted SonarQube SaaS solution which does not allow 3rd party plugins to be installed. This puts some limitations on the kind of data you can put in SonarCloud. For Java this is limited to Checkstyle, PMD and SpotBugs results. OWASP provides a Dependency-Check plugin to identify vulnerable dependencies in for example your pom.xml file. In this blog post I'll show how to get OWASP Depedency-Check data in SonarCloud without using a 3rd party plugin! Disclaimer: this solution has been created in very little time (~2 hours) and has not been seriously tested, optimized or used ..read more
Visit website
GitHub Actions and SonarCloud
Oracle SOA and Java Blog
by
9M ago
GitHub Actions allow you to do most CI/CD tasks for free, directly from your GitHub repository. One of the challenges however is that there is no build-in facility like for example SonarQube to manage code quality. Luckily, SonarSource provides SonarCloud; a SonarQube SaaS offering which is free for public projects! It is also easy to feed SonarCloud from GitHub Actions. In this blog post I'll describe how you can do this. Limitations There are of course some limitations on usage for the free GitHub and SonarCloud accounts. Next to that however, SonarCloud does not allow 3rd party plugins. I ..read more
Visit website
OWASP ZAP: A quick introduction
Oracle SOA and Java Blog
by
9M ago
OWASP ZAP or Zed Attack Proxy is an open source dynamic application security testing (DAST) tool. It is available here and has a website with documentation here. I recently encountered it when looking for open source security test tools to embed in a CI/CD pipeline (here). I was surprised by how versatile this tool is. In this blog post I'll summarize several ways how you can use it.  Demo application I've used a small Spring Boot service to illustrate the different ways you can use OWASP ZAP. You can find it in DockerHub here and in GitHub here.  To create a Docker network an ..read more
Visit website
Java Agent: Rewrite Java code at runtime using Javassist
Oracle SOA and Java Blog
by
9M ago
There are situations where you want to change Java code not at the source code level but at runtime. For example when you want to instrument code for logging purposes but do not want to change the source code (because you might not have access to it). This can be done by using a Java Agent. For example, Dynatrace uses a Java agent to collect data from inside the JVM. Another example is the GraalVM tracing agent (here) which helps you create configuration for the generation of native images. Logging is one use-case but you can also more dramatically alter runtime code to obtain a completel ..read more
Visit website

Follow Oracle SOA and Java Blog on Feedspot

Continue with Google
OR