This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Wait-File { | |
| <# | |
| .SYNOPSIS | |
| Monitors a file system path for changes and executes a script block in response to specified events. | |
| .DESCRIPTION | |
| The Wait-File function creates a FileSystemWatcher to monitor a specified directory for file system changes. | |
| It registers event handlers for specified events (Created, Changed, Deleted, Renamed) and executes a | |
| custom action when those events occur. The function runs continuously until manually stopped (Ctrl+C) | |
| or until an exit condition is satisfied (see -ExitCondition or -Once). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # add to ur Powershell profile | |
| # needed to be installed/be in path - yt-dlp, ffmpeg, aria2, libwebp. maybe i forgot smth. | |
| # adjust music path, also u can adjust number of parallel processes by editing "-ThrottleLimit" variable | |
| Function parallel-music-playlist { | |
| param ( | |
| $url_to_playlist | |
| ) | |
| $playlist_name = yt-dlp -i -o "%(playlist)s" --get-filename --skip-download --playlist-end 1 $url_to_playlist | |
| $download_folder = "C:\!!Downloads\Music\!!youtube\$playlist_name\" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * | |
| !Microsoft.*_profile.ps1 | |
| !.gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #shamelessly copied from here https://discuss.pytorch.org/t/utility-function-for-calculating-the-shape-of-a-conv-output/11173/7 | |
| # original docs at https://pytorch.org/docs/master/nn.html#conv2d | |
| import math | |
| def num2tuple(num): | |
| return num if isinstance(num, tuple) else (num, num) | |
| def conv2d_output_shape(h_w, kernel_size=1, stride=1, pad=0, dilation=1): | |
| h_w, kernel_size, stride, pad, dilation = num2tuple(h_w), \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ######################################## | |
| # | |
| # BeginSystemConfig.ps1 | |
| # iex ((New-Object System.Net.WebClient).DownloadString('https://bit.ly/2R7znLX')); | |
| # | |
| # Author: roysubs@hotmail.com | |
| # | |
| # 2019-11-25 Initial setup | |
| # 2020-10-19 Latest Version | |
| # |