TIS-TN-python-code
Hier staat de source code van de scripts die door de docenten van TN voor gebruik tijdens de studie gemaakt zijn.
De scripts helpen bij het plotten (standaard mooi opgemaakte figuren), regressie, fourier volgens het wiskunde boek en het uitlezen van sensoren.
Zie verder het voorbeeld gebruik in de voorbeelden directorie. Deze directorie wordt niet met PyPi geïnstalleerd, hiervoor kan je het git-repository gebruiken.
Installatie en afhankelijkheden
Afhankelijkheden (dependencies)
De scripts maken gebruik van (via pip worden ze automatisch meegeïnstalleerd):
- numpy
- matplotlib
- sympy
Voor de hardware-scripts zijn meer afhankelijkheden nodig (worden niet automatisch geïnstalleerd):
- adafruit_circuitpython-ads1x15
- adafruit-circuitpython-mcp3xxx
- sensehat
Om voor alle gebruikers deze afhankelijkheden te installeren is de volgende code nodig (Linux):
sudo apt-get install sense-hat
sudo pip install adafruit_circuitpython-ads1x15 adafruit-circuitpython-mcp3xxx
Raspberrypi
De raspberrypi maakt standaard gebruik van python2. Om voor python3 (de Python versie die je voor je eigen code wilt gebruiken!) de modules te installeren moet de juiste python gebruikt worden om de modules te installeren. Het commando om bijvoorbeeld de adafruit libraries met pip te installeren wordt dan:
sudo python3 -m pip install adafruit_circuitpython-ads1x15 adafruit-circuitpython-mcp3xxx
Door Python (python3) met de -m optie aan te roepen is het volgende argument de module die uitgevoerd moet worden. Zo weet je altijd dat de juiste python-interpreter gebruikt wordt om PyPi packages te installeren.
Installatie via PyPi
Als PyPi aanwezig is kan via PyPi de software voor de huidige gebruiker geïnstalleerd worden:
python -m pip install tn_code
Om system-wide (voor alle gebruikers te installeren):
sudo python -m pip install tn_code
Als virtual environment
mkdir project-naam && cd project-naam
python -m venv .env
source .env/bin/activate
python -m install tn_code
Daarna moet, om gebruik te maken van het virtuele environment, bij het opstarten het environmet geactiveerd worden
Upgrade via PyPi
Om het package TN-code te updaten moet de --upgrade optie toegevoed worden aan het pip installatie commando:
sudo python -m pip install --upgrade tn_code
Metadata
Release files for TN-code 1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| TN_code-1.4.tar.gz | 9.8 kB | Without provenance | Details for TN_code-1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| TN_code-1.4-py3-none-any.whl | Python 3 | none | any | Details for TN_code-1.4-py3-none-any.whl |
Total release size: 20.6 kB
Release files / TN_code-1.4.tar.gz
| Download URL | TN_code-1.4.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b4bba1a5a45fda5c3fe3ca7af03be8dba44240ba9bcb50810cab5fca5632778
|
|
BLAKE2b-256 checksum How to use checksums |
949f2dd1194561187fec3ec32b7eb5065ca40ef0e12e352f6ae0242c28bc7c7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.0
|
Release files / TN_code-1.4-py3-none-any.whl
| Download URL | TN_code-1.4-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c85b597ea96fec156872833c900a688035b1cda4b2e40dbe204c248ae6471a98
|
|
BLAKE2b-256 checksum How to use checksums |
bcc946d6c3f547202d7506019adbe33c30131790a440e8473f6a5d903f135573
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.0
|
Security for TN-code 1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.