Skip to content

Instantly share code, notes, and snippets.

View jesuino's full-sized avatar

William Antônio Siqueira jesuino

View GitHub Profile

create minikube

The following create a minikube with 10 CPU cores and 32GB memory. This is for experiments with heavy workload.

It uses kvm hypervisor. Make sure the qemu and libvirt have already installed

minikube start --cpus 10 --memory 32GB --disk-size=400g --extra-disks=2 --driver=kvm2 --force --container-runtime cri-o

install prometheus and grafana

///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS info.picocli:picocli:4.5.0
//DEPS org.slf4j:slf4j-nop:1.7.30
//DEPS org.datavec:datavec-local:1.0.0-beta7
//DEPS joinery:joinery-dataframe:1.9
//DEPS org.apache.poi:poi:4.1.2
//DEPS tech.tablesaw:tablesaw-core:0.38.1
@saudet
saudet / RedBloodCellDetection.java
Last active March 2, 2024 17:14
Example of object detection with DL4J on images of red blood cells
package org.deeplearning4j.examples.convolution.objectdetection;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.bytedeco.javacv.CanvasFrame;
import org.bytedeco.javacv.OpenCVFrameConverter;
@davecg
davecg / keras_1_to_2.py
Created April 9, 2017 18:01
Convert Keras 1 models to Keras 2
#!/usr/bin/env python3
'''
This will convert Keras 1 model weights and configurations
to their Keras 2 equivalent. Please note that all optimizer
configuration is ignored with this script and models will
need to be recompiled.
'''
import h5py
@yograterol
yograterol / gist:99c8e123afecc828cb8c
Created January 8, 2016 05:45
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" workaround
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround
Install `redhat-rpm-config`
$ sudo dnf install redhat-rpm-config
@raymondchua
raymondchua / AstarSearchAlgo
Last active June 28, 2024 02:00
A Star Search Algorithm, Java Implementation
import java.util.PriorityQueue;
import java.util.HashSet;
import java.util.Set;
import java.util.List;
import java.util.Comparator;
import java.util.ArrayList;
import java.util.Collections;
public class AstarSearchAlgo{
@ge0ffrey
ge0ffrey / gist:5909266
Last active August 13, 2019 11:31
Is this progress? ... KieBase (drools 6) versus RuleBase (drools 4)
Given List<String< scoreDrlList, how do we build a RuleBase/KieBase?
Drools 4 (building a RuleBase):
PackageBuilder packageBuilder = new PackageBuilder();
for (String scoreDrl : scoreDrlList) {
InputStream scoreDrlIn = getClass().getResourceAsStream(scoreDrl);
packageBuilder.addPackageFromDrl(new InputStreamReader(scoreDrlIn, "UTF-8"));
}
RuleBaseConfiguration ruleBaseConfiguration = new RuleBaseConfiguration();
@hoheinzollern
hoheinzollern / WekaTest.java
Created August 2, 2012 09:07
Clustering in Weka
import java.awt.Container;
import java.awt.GridLayout;
import java.util.ArrayList;
import javax.swing.JFrame;
import weka.clusterers.HierarchicalClusterer;
import weka.core.Attribute;
import weka.core.DenseInstance;
import weka.core.EuclideanDistance;
@indy
indy / improved-perlin-noise.java
Created February 6, 2010 12:22
Perlin noise - Java implementation
// JAVA REFERENCE IMPLEMENTATION OF IMPROVED NOISE - COPYRIGHT 2002 KEN PERLIN.
public final class ImprovedNoise {
static public double noise(double x, double y, double z) {
int X = (int)Math.floor(x) & 255, // FIND UNIT CUBE THAT
Y = (int)Math.floor(y) & 255, // CONTAINS POINT.
Z = (int)Math.floor(z) & 255;
x -= Math.floor(x); // FIND RELATIVE X,Y,Z
y -= Math.floor(y); // OF POINT IN CUBE.
z -= Math.floor(z);