Skip to main content

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)

Source distribution for TN-code 1.4
File Size Uploaded
TN_code-1.4.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TN-code 1.4
File Interpreter ABI Platform
TN_code-1.4-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.4 This release

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.92

2 release files

0.91

1 release file

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