Sunday, February 15, 2026

[Weka][Machine Learning][Kmeans]Weka labelling result of Kmeans

### The Step-by-Step Process


1. **Run your Clusterer:**

* Go to the **Cluster** tab.

* Select **SimpleKMeans** and configure your  (number of clusters).

* Run the algorithm. Ensure it completes successfully.


2. **Add the Labels via Filter:**

* Switch back to the **Preprocess** tab.

* Click **Choose** under the Filters section.

* Navigate to: `filters` -> `unsupervised` -> `attribute` -> **AddCluster**.


3. **Configure the Filter:**

* Click on the **AddCluster** text to open its configuration box.

* In the `clusterer` field, click "Choose" and select **SimpleKMeans** again (ensure the settings match what you used in the Cluster tab).

* Click **OK**.


4. **Apply and Save:**

* Click **Apply**. You will see a new attribute appear at the end of your attribute list, typically named "cluster."

* Click **Save...** to export your new labeled dataset as an `.arff` or `.csv` file.


---


### Pro-Tips for Labeling


* **The "Ignored" Attributes:** If you want to cluster based on certain features but keep an ID or Name column in the final file, make sure to use the `ignoredAttributeIndices` property within the SimpleKMeans settings inside the **AddCluster** filter.

* **Result Verification:** Before saving, you can click the **Edit...** button in the Preprocess tab to view the data table and confirm that the cluster assignments look correct (e.g., Cluster 0, Cluster 1, etc.).


---


Saturday, February 14, 2026

[perl][ML][Machine Learning]K-means in Perl

#!/usr/bin/perl -w

use strict;

use warnings;

use PDL::LiteF;

use PDL::Stats;


# 1. Define 4 separate arrays (Features)

my $f1 = pdl(1, 2, 1, 10, 11, 12); # Feature 1

my $f2 = pdl(1, 1, 2, 10, 12, 11); # Feature 2

my $f3 = pdl(0, 1, 0, 15, 14, 15); # Feature 3

my $f4 = pdl(2, 2, 1, 20, 21, 22); # Feature 4


# 2. Combine them into a 4-column matrix

# cat() joins them, transpose() makes each row a "person/object"

my $data = cat($f1, $f2, $f3, $f4)->transpose;


# 3. Run K-means for 2 groups

my $k = 2;

my %result = $data->kmeans({k => $k, NCLUS => 2});


# 4. Display which group each of the 6 items belongs to

print "Data Matrix (Rows = Items, Cols = Features):\n$data\n";

print "Cluster Assignments:\n", $result{cluster}, "\n";

print "Final Centroids (The average of each group):\n", $result{centroid}, "\n";


Tuesday, February 10, 2026

Install Snort 2.9 at Ubuntu 24.02 on 20260210

 Installation:

#apt-get update

#apt-cache policy snort

#apt-get install snort -y


Testing:

#snort -T -c /etc/snort/snort.conf


Execution:

#snort -c /etc/snort/snort.conf -A full -D -s

Install and deploy OSSEC at Ubuntu 24.04 on 20260210

Installation:

#sudo apt update

#sudo apt install -y build-essential make gcc wget tar \

libpcre2-dev zlib1g-dev libssl-dev libevent-dev \

libsystemd-dev libsqlite3-dev systemd-dev

#cd /usr/local/sbin

#wget -q -O - https://updates.atomicorp.com/installers/atomic | bash

#apt-get update

#apt-get install ossec-hids-server


Monday, February 9, 2026

[Docker] Docker Compose

 Step 0: Download the Container

docker pull testcontainers/sshd:1.3.0



Step 1: Save the File

Copy the code below and save it as a file named docker-compose.yml in a folder on your computer.


YAML

-----

services:

  sshd:

    image: testcontainers/sshd:1.3.0

    environment:

      - PASSWORD=your_secure_password

    ports:

      - "10022:22"

-----



Step 2: Run the Command

Open your terminal or command prompt, navigate to the folder where you saved the file, and run:


Bash

-----

docker compose up -d

-----

up: Tells Docker to create and start the containers defined in the file.

-d: Runs the container in "detached" mode (in the background) so it doesn't lock up your terminal window.



Step 3: Verify it's Running

You can check if the SSH server is active by running:


Bash

-----

docker compose ps

-----

This should show the sshd service running and mapped to port 10022.



How to actually "use" this specific container

Since this is an SSH server (testcontainers/sshd), its main purpose is to let you log in or create tunnels.


To log in to the container's shell:


Bash

-----

ssh root@localhost -p 10022

-----

(When prompted for a password, use your_secure_password as defined in the YAML file.)



To create a reverse tunnel (the "Testcontainers" way): If you have a service running on your actual computer at port 8080 and you want this Docker container to see it, run this from your computer:


Bash

-----

ssh -R 8080:localhost:8080 root@localhost -p 10022

-----

Now, if you were to enter the container (using the login command above), you could run curl http://localhost:8080 and it would reach the app on your physical machine.



How to Stop It

When you are finished, go back to the terminal in that folder and run:


Bash

-----

docker compose down

-----

This will stop the container and clean up the internal network it created.

Thursday, October 9, 2025

Install Microsoft Intune at Ubuntu

https://learn.microsoft.com/en-us/intune/intune-service/user-help/microsoft-intune-app-linux#install-microsoft-intune-app-for-ubuntu-desktop



Friday, October 3, 2025

[ransomware] No more ransom

 https://www.nomoreransom.org/


crypto-sheriff: Able to identify the category of Ransomware

decryption-tools: Providing download of Decryption tools

report-a-crime: A collection itemizing links of law enforcement agencies