Skip to main content

CyberPlain is a defensive cybersecurity toolkit for Python and the command line. It uses normal English in its names, output, errors, and documentation so beginners can understand what a check did and experienced practitioners can automate it.

Learn neural networks

For a tiny, dependency-free neural network, describe the layer sizes, give it examples, and ask it a question:

from cyberplain import make_brain

brain = make_brain()
brain.train(
	[[0, 0], [0, 1], [1, 0], [1, 1]],
	[0, 1, 1, 0],
	epochs=2_000,
)
print(brain.predict([1, 0]))  # close to 1
print(brain.predict([1, 1]))  # close to 0

make_brain() creates a small network with sensible defaults. Use NeuralNetwork(2, 3, 1) when you want to choose every layer yourself. train() returns the error history, while weights and biases stay visible so learners can see what practice changes.

For words and short sentences, let TextBrain handle the number conversion:

from cyberplain import learn_text

brain = learn_text(
	["hello", "good morning", "bye", "good night"],
	["greeting", "greeting", "farewell", "farewell"],
)

print(brain.predict("hello"))  # greeting
print(brain.scores("bye"))

Metadata

Release files for cyberplain 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cyberplain 0.3.2
File Size Uploaded
cyberplain-0.3.2.tar.gz 29.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cyberplain 0.3.2
File Interpreter ABI Platform
cyberplain-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 61.1 kB

Release files / cyberplain-0.3.2.tar.gz

Download URL cyberplain-0.3.2.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fb5a29bbbc179fa305a44542356270ed2dd3e46e9de96f64d354660593397dad
BLAKE2b-256 checksum
How to use checksums
7829f7026fdaaef8e9385d7f6227df9a3990cfdc024b314ee8ae609c020a2f45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.1

Release files / cyberplain-0.3.2-py3-none-any.whl

Download URL cyberplain-0.3.2-py3-none-any.whl
Size 31.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ad451585d905c5d5c81ea18a509afe896f824503fe8c7a8e4ad3ffe21a38106
BLAKE2b-256 checksum
How to use checksums
03d395c4b3b9912a2e89b25547a81dc46444a66436db9c773d4b80c2f7248940
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page