Skip to content
Open

1 #196

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
17c3431
Update README.md
hz764 Aug 30, 2025
24333a9
Update README.md
hz764 Aug 30, 2025
d7ddebf
Update README.md
hz764 Aug 30, 2025
f9bd689
Add files via upload
hz764 Aug 30, 2025
66fa214
Delete Lab 1/7 Storyboards.png
hz764 Aug 30, 2025
6b9d3bb
Add files via upload
hz764 Aug 30, 2025
3585c5f
Update README.md
hz764 Aug 30, 2025
3b05a68
Update README.md
hz764 Aug 30, 2025
412ce97
Update README.md
hz764 Aug 30, 2025
1ac0aba
Update README.md
hz764 Aug 30, 2025
27f0801
Update README.md
hz764 Aug 30, 2025
6c67c40
Update README.md
hz764 Aug 30, 2025
4000a51
Add files via upload
hz764 Aug 30, 2025
6404cbc
Add files via upload
hz764 Aug 30, 2025
0dfb9c4
Add files via upload
hz764 Aug 30, 2025
1468fac
Update README.md
hz764 Aug 31, 2025
2aa19e1
Update README.md
hz764 Aug 31, 2025
b0ec31b
Update README.md
hz764 Aug 31, 2025
92f5cf8
Update README.md
hz764 Aug 31, 2025
d144cac
Update README.md
js3888-shunshun Aug 31, 2025
14099ce
Merge pull request #1 from js3888-shunshun/patch-2
hz764 Aug 31, 2025
e0e8932
Add files via upload
hz764 Aug 31, 2025
395786c
Update README.md
hz764 Aug 31, 2025
5abfd95
Update README.md
hz764 Aug 31, 2025
158a799
Update README.md
hz764 Aug 31, 2025
7dd14a6
Update README.md
hz764 Aug 31, 2025
a4accae
Update README.md
hz764 Aug 31, 2025
beffca6
Update README.md
hz764 Aug 31, 2025
d12632e
Update README.md
hz764 Aug 31, 2025
b1c3594
Update README.md
hz764 Aug 31, 2025
36d4410
Update README.md
hz764 Sep 3, 2025
03f6116
Update README.md
hz764 Sep 3, 2025
0c90185
Update README.md
hz764 Sep 3, 2025
47cdb93
Update README.md
hz764 Sep 6, 2025
3350e3f
Add files via upload
hz764 Sep 6, 2025
323a8be
Update README.md
hz764 Sep 6, 2025
5380cc9
Update README.md
hz764 Sep 6, 2025
0534abe
Update README.md
hz764 Sep 6, 2025
61ef734
Update README.md
hz764 Sep 6, 2025
41786a0
Update README.md
hz764 Sep 6, 2025
ad4dbc0
Create Lab1b.images
hz764 Sep 6, 2025
0165f0b
Delete Lab 1/Lab1b.images
hz764 Sep 6, 2025
51768b3
Create Lab1b_images
hz764 Sep 6, 2025
afcff7d
Delete Lab 1/Lab1b_images
hz764 Sep 6, 2025
8055380
Create README.md
hz764 Sep 6, 2025
7e18091
Add files via upload
hz764 Sep 6, 2025
4ff18cf
Delete Lab 1/Lab1b_images/README.md
hz764 Sep 6, 2025
83c3d4c
Update README.md
hz764 Sep 6, 2025
a1c484f
Add files via upload
hz764 Sep 6, 2025
9670b99
Update README.md
hz764 Sep 6, 2025
e3c5fad
Update README.md
hz764 Sep 6, 2025
f42388e
Update README.md
hz764 Sep 6, 2025
1350c19
Update README.md
hz764 Sep 6, 2025
d388737
Update README.md
hz764 Sep 7, 2025
a87d05e
Add files via upload
hz764 Sep 7, 2025
ae9ed99
Update README.md
hz764 Sep 7, 2025
5cb7cb1
Update README.md
hz764 Sep 7, 2025
b504676
Update README.md
hz764 Sep 7, 2025
6a8eeca
Update README.md
hz764 Sep 7, 2025
c03c0d1
Update README.md
hz764 Sep 8, 2025
f1cb157
Update README.md
hz764 Sep 8, 2025
28b41fa
Merge branch 'IRL-CT:Fall2025' into Fall2025
hz764 Sep 13, 2025
1f396d5
Update README.md
hz764 Sep 13, 2025
a3b7433
Create .gitkeep
hz764 Sep 13, 2025
e070862
Add files via upload
hz764 Sep 13, 2025
1d4be84
Update README.md
hz764 Sep 13, 2025
ba4f988
Add files via upload
hz764 Sep 13, 2025
204e463
Add image_fixed.py for fixed button image display
hz764 Sep 13, 2025
aca3e1e
Update README.md
hz764 Sep 13, 2025
ba05652
Add files via upload
hz764 Sep 13, 2025
e306fd1
Delete Lab 2/video_change_image.mp4
hz764 Sep 13, 2025
94c87f5
Add files via upload
hz764 Sep 13, 2025
36c271b
Update README.md
hz764 Sep 13, 2025
e8549d1
Update README.md
hz764 Sep 13, 2025
0571f2e
Update README.md
hz764 Sep 13, 2025
3f24dd1
Add files via upload
hz764 Sep 13, 2025
796f231
Add files via upload
hz764 Sep 13, 2025
d1375a6
Delete Lab 2/images/Lab2_partD.HEIC
hz764 Sep 13, 2025
4e4b77b
Add files via upload
hz764 Sep 13, 2025
31295b5
Update README.md
hz764 Sep 13, 2025
15cf46a
Delete Lab 2/images/.gitkeep
hz764 Sep 13, 2025
2961a34
Add files via upload
hz764 Sep 13, 2025
abd0dc1
Update README.md
hz764 Sep 13, 2025
ed1d97e
Update README.md
hz764 Sep 13, 2025
1bb1e09
Update README.md
hz764 Sep 14, 2025
5b8a34c
Merge branch 'IRL-CT:Fall2025' into Fall2025
hz764 Sep 17, 2025
6758bdd
Add gesture_daemon.py and reminder_clock.py to Lab 2
Alubeto Sep 20, 2025
ebae59e
Update README.md
hz764 Sep 21, 2025
9f2a4a2
Update README.md
hz764 Sep 22, 2025
87d1f41
Update README.md
hz764 Sep 22, 2025
941d0d0
Add Lab 3 from upstream
Sep 24, 2025
04807f2
Add my-scripts folder with Piper TTS test
Alubeto Sep 25, 2025
3821e08
Update README.md
hz764 Sep 25, 2025
1608022
Update README.md
hz764 Sep 25, 2025
e3e7165
Add ask_number_whisper.sh to my-scripts
Alubeto Sep 25, 2025
ffa1a37
Add ignores for generated audio/transcripts
Alubeto Sep 25, 2025
1427088
Update README.md
hz764 Sep 25, 2025
8717ff1
Add files via upload
hz764 Sep 25, 2025
3309a06
Rename Screenshot 2025-09-25 at 12.23.21.png to Screenshot_1.png
hz764 Sep 25, 2025
7cbca32
Update README.md
hz764 Sep 25, 2025
b8efffa
Update README.md
hz764 Sep 25, 2025
32165b0
Merge branch 'Fall2025' into Fall2025
hz764 Sep 26, 2025
8d4c846
Add voice_interaction.py to Lab 3/my-scripts
Alubeto Sep 27, 2025
4140ada
Add files via upload
hz764 Sep 27, 2025
9a243c8
Update README.md
hz764 Sep 27, 2025
7e5169d
Update README.md
hz764 Sep 27, 2025
abc0e59
Add files via upload
hz764 Sep 27, 2025
b8367ab
Update README.md
hz764 Sep 27, 2025
485e0fe
Merge branch 'IRL-CT:Fall2025' into Fall2025
hz764 Oct 1, 2025
fa1934a
Update README.md
hz764 Oct 1, 2025
f697108
Add files via upload
hz764 Oct 6, 2025
4978c08
Update README.md
hz764 Oct 6, 2025
01d5d5a
Update README.md
hz764 Oct 8, 2025
12c0806
Update README.md
hz764 Oct 8, 2025
5ad21a5
Add files via upload
hz764 Oct 10, 2025
988054b
Create .gitkeep
hz764 Oct 10, 2025
a8d5dbe
Add files via upload
hz764 Oct 10, 2025
86f31a6
Delete Lab 4/music/.gitkeep
hz764 Oct 11, 2025
70bfcce
Add files via upload
hz764 Oct 11, 2025
2bd5d3d
Delete Lab 4/music/Lab 4_music_dawn.wav
hz764 Oct 11, 2025
e3d49fa
Delete Lab 4/music/Lab 4_music_main.wav
hz764 Oct 11, 2025
504ce5b
Delete Lab 4/music/Lab 4_music_spring.wav
hz764 Oct 11, 2025
5792e68
Add files via upload
hz764 Oct 12, 2025
69882f1
Delete Lab 4/IMG_6907.HEIC
hz764 Oct 12, 2025
013ffbd
Delete Lab 4/IMG_6908.HEIC
hz764 Oct 12, 2025
12f5c06
Delete Lab 4/IMG_6909.HEIC
hz764 Oct 12, 2025
6bcc55c
Delete Lab 4/IMG_6910.HEIC
hz764 Oct 12, 2025
268a582
Delete Lab 4/IMG_6911.HEIC
hz764 Oct 12, 2025
81355de
Delete Lab 4/IMG_6912.HEIC
hz764 Oct 12, 2025
14ca6da
Delete Lab 4/IMG_6913.HEIC
hz764 Oct 12, 2025
5a9d330
Delete Lab 4/IMG_6914.HEIC
hz764 Oct 12, 2025
07d5075
Delete Lab 4/IMG_6915.HEIC
hz764 Oct 12, 2025
2c9029d
Delete Lab 4/IMG_6916.HEIC
hz764 Oct 12, 2025
ace315c
Add files via upload
hz764 Oct 12, 2025
16d98e2
Add files via upload
hz764 Oct 12, 2025
2254baf
Update README.md
hz764 Oct 12, 2025
8fd16f2
Update README.md
hz764 Oct 12, 2025
271838f
Update README.md
hz764 Oct 12, 2025
ec00b8b
Update README.md
hz764 Oct 12, 2025
0a12746
Add files via upload
hz764 Oct 12, 2025
1e29e6e
Update README.md
hz764 Oct 12, 2025
b7e4f30
Update README.md
hz764 Oct 12, 2025
b2c3b2c
Update README.md
hz764 Oct 12, 2025
2acbe2e
Add all Lab 4 files including music_player.py and .wav songs
Alubeto Oct 12, 2025
581b511
Save local changes before rebase
Alubeto Oct 12, 2025
b677511
Allow WAV in Lab 4/music; add WAV tracks and music_player.py
Alubeto Oct 12, 2025
1d10ddc
Update README.md
hz764 Oct 12, 2025
8ca1e23
Add files via upload
hz764 Oct 12, 2025
ba094e4
Update README.md
hz764 Oct 12, 2025
4b4f7f9
Merge branch 'IRL-CT:Fall2025' into Fall2025
hz764 Oct 15, 2025
fb3f0fa
Update README.md
hz764 Oct 18, 2025
0050d59
Merge branch 'IRL-CT:Fall2025' into Fall2025
hz764 Oct 19, 2025
5d2472a
Add music player with seesaw encoder and LED control
Alubeto Oct 19, 2025
3c23e1b
Merge remote changes and add music player
Alubeto Oct 19, 2025
e230355
Add files via upload
hz764 Oct 19, 2025
7cb3dc4
Add files via upload
hz764 Oct 19, 2025
46e7302
Update README.md
hz764 Oct 19, 2025
a634534
Add Lab 5
Alubeto Oct 20, 2025
1125ac2
Update README.md
wendyju Oct 20, 2025
e158440
Resolve conflicts and sync with upstream
Oct 25, 2025
5ad3562
Remove .tflite files from .gitignore and add model.tflite
HaukeCornell Oct 20, 2025
eaa52b3
add transfer learning
HaukeCornell Oct 22, 2025
36f416c
fix typo
HaukeCornell Oct 22, 2025
1251fc5
streaming moondream
HaukeCornell Oct 22, 2025
f07c54b
add moondream
HaukeCornell Oct 22, 2025
1e40506
Revise README with collaborators and lab details
hz764 Oct 26, 2025
ae0683e
Add files via upload
hz764 Oct 26, 2025
4774fe1
Enhance README with MediaPipe demo image and video
hz764 Oct 26, 2025
d5d1857
Enhance README with gesture control details
hz764 Oct 26, 2025
9a3fb8d
Update README.md
hz764 Oct 26, 2025
a86d1d8
Update README.md
hz764 Oct 26, 2025
5988200
Update README.md
hz764 Oct 26, 2025
26e5e9d
Add gesture-based music controller for Lab 5
Alubeto Oct 26, 2025
5096a95
Update README.md
hz764 Oct 29, 2025
862ee87
Add improved gesture remote v2.0 for Lab 5 Part 2
Nov 2, 2025
112b923
Fix handDetector parameter error
Nov 2, 2025
67490d0
Fix Unicode encoding issues in gesture_remote_v2
Nov 2, 2025
3ba183f
Improve finger detection and volume gesture recognition
Alubeto Nov 2, 2025
3d1bd81
Improve finger detection and volume gesture recognition
Nov 2, 2025
9e8a4bc
Fix thumb detection for 7 gesture
Nov 2, 2025
5222384
Improve 7 gesture detection - remove thumb up requirement
Nov 2, 2025
bd69792
Fix: Remove emoji characters and improve gesture detection
Nov 2, 2025
9df9c73
Improve gesture detection
Nov 2, 2025
f2d7a36
Update README.md
hz764 Nov 2, 2025
7e7df3a
Enhance README with object recognition details
hz764 Nov 2, 2025
bd8e59f
Merge upstream/Fall2025 - accept upstream updates for Lab 5 and 6
Alubeto Nov 7, 2025
d92dbb8
Merge branch 'Fall2025' of github.com:hz764/Interactive-Lab-Hub-hz764…
Alubeto Nov 7, 2025
2d2e67a
Add files via upload
hz764 Nov 7, 2025
86a50b3
Update README.md
hz764 Nov 7, 2025
38df5ed
Update README to remove MQTT test message
hz764 Nov 7, 2025
6b593a9
Expand README with messaging ideas and reflections
hz764 Nov 7, 2025
3ed8842
Update README.md
hz764 Nov 8, 2025
f7f7fcf
Update README.md
hz764 Nov 8, 2025
b7e60ca
Enhance README with details for Collaborative Pixel Grid
hz764 Nov 8, 2025
04e8aed
Update README.md
hz764 Nov 8, 2025
99b9a68
Add files via upload
hz764 Nov 8, 2025
9b7ca34
Update README.md
hz764 Nov 8, 2025
f18356c
Update README with code files and troubleshooting info
hz764 Nov 8, 2025
4e20db1
Add files via upload
hz764 Nov 8, 2025
1b1bcc3
Update README.md
hz764 Nov 8, 2025
cfe432e
Create README.md
hz764 Nov 8, 2025
8d344fc
Add files via upload
hz764 Nov 8, 2025
dad090b
Delete Lab 6/final_code/README.md
hz764 Nov 8, 2025
c8c4a35
Revise README with team names and demo link
hz764 Nov 8, 2025
29fcf07
Create Final project
hz764 Nov 10, 2025
f95fac6
Rename Final project to Final project.md
hz764 Nov 10, 2025
2023b37
Update Final project.md
hz764 Nov 10, 2025
2e6661a
Document fallback plan for hardware failures
hz764 Nov 10, 2025
0296ade
Add files via upload
hz764 Nov 10, 2025
6b1effb
Update Final project.md
hz764 Nov 10, 2025
9b85efa
Update Final project.md
hz764 Nov 10, 2025
881a7c8
Update Final project.md
js3888-shunshun Nov 19, 2025
79c863b
Merge pull request #2 from js3888-shunshun/patch-3
hz764 Nov 19, 2025
d53c3ee
Refine sound output problem section in documentation
hz764 Nov 29, 2025
99ef58a
Create README.md
hz764 Nov 30, 2025
24ad649
Rename Final project.md to final project/Final project.md
hz764 Nov 30, 2025
3f5b9c6
Delete final project/README.md
hz764 Nov 30, 2025
39b1b91
Rename Final project.md to README.md
hz764 Nov 30, 2025
f322315
Create readme.md
hz764 Nov 30, 2025
7925d84
Add files via upload
hz764 Nov 30, 2025
808d680
Rename 16651762814138_.pic_hd.jpg to final project/16651762814138_.pi…
hz764 Nov 30, 2025
98a2762
Move image to images directory
hz764 Nov 30, 2025
5ad549e
Add files via upload
hz764 Nov 30, 2025
68dc083
Update image source path in README.md
hz764 Nov 30, 2025
a67b904
Update README.md
hz764 Nov 30, 2025
8437425
Add Final Project code folder
hz764 Dec 9, 2025
1aae08b
Delete final project/code/prototype.png
hz764 Dec 9, 2025
92906d8
Add files via upload
hz764 Dec 9, 2025
706ba1a
Add files via upload
hz764 Dec 9, 2025
c0c708a
Add files via upload
hz764 Dec 9, 2025
7550234
Delete final project/images/Overall_Setup.png
hz764 Dec 9, 2025
a06e00c
Add files via upload
hz764 Dec 9, 2025
ee78b4a
Update README.md
hz764 Dec 9, 2025
5d10020
Add files via upload
hz764 Dec 9, 2025
ac0de71
Enhance README with detailed system overviews
hz764 Dec 9, 2025
f6e6fcc
Add files via upload
hz764 Dec 9, 2025
2d0c728
Delete final project/images/board_decoration.HEIC
hz764 Dec 9, 2025
7adf559
Add files via upload
hz764 Dec 9, 2025
76e6ded
Update README.md
hz764 Dec 9, 2025
fbbd00b
Update README.md
hz764 Dec 11, 2025
548e3c5
Update README.md
hz764 Dec 11, 2025
8332952
Update README.md
hz764 Dec 11, 2025
aae9ee6
Update README.md
hz764 Dec 12, 2025
dcd0a91
Update README.md
js3888-shunshun Dec 12, 2025
d996cf7
Merge pull request #3 from js3888-shunshun/patch-5
hz764 Dec 12, 2025
ad8404b
Update README.md
js3888-shunshun Dec 12, 2025
336b065
Update README.md
hz764 Dec 12, 2025
e5b62d5
Correct number of Energy Element Cards in README
hz764 Dec 12, 2025
87afcce
Merge pull request #4 from js3888-shunshun/patch-6
hz764 Dec 12, 2025
4501cdb
Update README.md
hz764 Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
247 changes: 247 additions & 0 deletions .venv/bin/Activate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
<#
.Synopsis
Activate a Python virtual environment for the current PowerShell session.
.Description
Pushes the python executable for a virtual environment to the front of the
$Env:PATH environment variable and sets the prompt to signify that you are
in a Python virtual environment. Makes use of the command line switches as
well as the `pyvenv.cfg` file values present in the virtual environment.
.Parameter VenvDir
Path to the directory that contains the virtual environment to activate. The
default value for this is the parent of the directory that the Activate.ps1
script is located within.
.Parameter Prompt
The prompt prefix to display when this virtual environment is activated. By
default, this prompt is the name of the virtual environment folder (VenvDir)
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
.Example
Activate.ps1
Activates the Python virtual environment that contains the Activate.ps1 script.
.Example
Activate.ps1 -Verbose
Activates the Python virtual environment that contains the Activate.ps1 script,
and shows extra information about the activation as it executes.
.Example
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
Activates the Python virtual environment located in the specified location.
.Example
Activate.ps1 -Prompt "MyPython"
Activates the Python virtual environment that contains the Activate.ps1 script,
and prefixes the current prompt with the specified string (surrounded in
parentheses) while the virtual environment is active.
.Notes
On Windows, it may be required to enable this Activate.ps1 script by setting the
execution policy for the user. You can do this by issuing the following PowerShell
command:
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
For more information on Execution Policies:
https://go.microsoft.com/fwlink/?LinkID=135170
#>
Param(
[Parameter(Mandatory = $false)]
[String]
$VenvDir,
[Parameter(Mandatory = $false)]
[String]
$Prompt
)

<# Function declarations --------------------------------------------------- #>

<#
.Synopsis
Remove all shell session elements added by the Activate script, including the
addition of the virtual environment's Python executable from the beginning of
the PATH variable.
.Parameter NonDestructive
If present, do not remove this function from the global namespace for the
session.
#>
function global:deactivate ([switch]$NonDestructive) {
# Revert to original values

# The prior prompt:
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
}

# The prior PYTHONHOME:
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
}

# The prior PATH:
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
}

# Just remove the VIRTUAL_ENV altogether:
if (Test-Path -Path Env:VIRTUAL_ENV) {
Remove-Item -Path env:VIRTUAL_ENV
}

# Just remove VIRTUAL_ENV_PROMPT altogether.
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
}

# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
}

# Leave deactivate function in the global namespace if requested:
if (-not $NonDestructive) {
Remove-Item -Path function:deactivate
}
}

<#
.Description
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
given folder, and returns them in a map.
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
two strings separated by `=` (with any amount of whitespace surrounding the =)
then it is considered a `key = value` line. The left hand string is the key,
the right hand is the value.
If the value starts with a `'` or a `"` then the first and last character is
stripped from the value before being captured.
.Parameter ConfigDir
Path to the directory that contains the `pyvenv.cfg` file.
#>
function Get-PyVenvConfig(
[String]
$ConfigDir
) {
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"

# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue

# An empty map will be returned if no config file is found.
$pyvenvConfig = @{ }

if ($pyvenvConfigPath) {

Write-Verbose "File exists, parse `key = value` lines"
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath

$pyvenvConfigContent | ForEach-Object {
$keyval = $PSItem -split "\s*=\s*", 2
if ($keyval[0] -and $keyval[1]) {
$val = $keyval[1]

# Remove extraneous quotations around a string value.
if ("'""".Contains($val.Substring(0, 1))) {
$val = $val.Substring(1, $val.Length - 2)
}

$pyvenvConfig[$keyval[0]] = $val
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
}
}
}
return $pyvenvConfig
}


<# Begin Activate script --------------------------------------------------- #>

# Determine the containing directory of this script
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$VenvExecDir = Get-Item -Path $VenvExecPath

Write-Verbose "Activation script is located in path: '$VenvExecPath'"
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"

# Set values required in priority: CmdLine, ConfigFile, Default
# First, get the location of the virtual environment, it might not be
# VenvExecDir if specified on the command line.
if ($VenvDir) {
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
}
else {
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
Write-Verbose "VenvDir=$VenvDir"
}

# Next, read the `pyvenv.cfg` file to determine any required value such
# as `prompt`.
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir

# Next, set the prompt from the command line, or the config file, or
# just use the name of the virtual environment folder.
if ($Prompt) {
Write-Verbose "Prompt specified as argument, using '$Prompt'"
}
else {
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
$Prompt = $pyvenvCfg['prompt'];
}
else {
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
$Prompt = Split-Path -Path $venvDir -Leaf
}
}

Write-Verbose "Prompt = '$Prompt'"
Write-Verbose "VenvDir='$VenvDir'"

# Deactivate any currently active virtual environment, but leave the
# deactivate function in place.
deactivate -nondestructive

# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
# that there is an activated venv.
$env:VIRTUAL_ENV = $VenvDir

if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {

Write-Verbose "Setting prompt to '$Prompt'"

# Set the prompt to include the env name
# Make sure _OLD_VIRTUAL_PROMPT is global
function global:_OLD_VIRTUAL_PROMPT { "" }
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt

function global:prompt {
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
_OLD_VIRTUAL_PROMPT
}
$env:VIRTUAL_ENV_PROMPT = $Prompt
}

# Clear PYTHONHOME
if (Test-Path -Path Env:PYTHONHOME) {
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
Remove-Item -Path Env:PYTHONHOME
}

# Add the venv to the PATH
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
69 changes: 69 additions & 0 deletions .venv/bin/activate
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# This file must be used with "source bin/activate" *from bash*
# you cannot run it directly

deactivate () {
# reset old environment variables
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
PATH="${_OLD_VIRTUAL_PATH:-}"
export PATH
unset _OLD_VIRTUAL_PATH
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
export PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
fi

# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi

if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
export PS1
unset _OLD_VIRTUAL_PS1
fi

unset VIRTUAL_ENV
unset VIRTUAL_ENV_PROMPT
if [ ! "${1:-}" = "nondestructive" ] ; then
# Self destruct!
unset -f deactivate
fi
}

# unset irrelevant variables
deactivate nondestructive

VIRTUAL_ENV=/home/pi/Interactive-Lab-Hub-hz764/.venv
export VIRTUAL_ENV

_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/"bin":$PATH"
export PATH

# unset PYTHONHOME if set
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
# could use `if (set -u; : $PYTHONHOME) ;` in bash
if [ -n "${PYTHONHOME:-}" ] ; then
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
unset PYTHONHOME
fi

if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
PS1='(.venv) '"${PS1:-}"
export PS1
VIRTUAL_ENV_PROMPT='(.venv) '
export VIRTUAL_ENV_PROMPT
fi

# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
hash -r 2> /dev/null
fi
26 changes: 26 additions & 0 deletions .venv/bin/activate.csh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file must be used with "source bin/activate.csh" *from csh*.
# You cannot run it directly.
# Created by Davide Di Blasi <davidedb@gmail.com>.
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>

alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'

# Unset irrelevant variables.
deactivate nondestructive

setenv VIRTUAL_ENV /home/pi/Interactive-Lab-Hub-hz764/.venv

set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"


set _OLD_VIRTUAL_PROMPT="$prompt"

if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
set prompt = '(.venv) '"$prompt"
setenv VIRTUAL_ENV_PROMPT '(.venv) '
endif

alias pydoc python -m pydoc

rehash
Loading