Scientific Programming
153 subscribers
158 photos
30 videos
138 files
442 links
Tutorials and applications from scientific programming

https://github.com/Ziaeemehr
Download Telegram
This is an strightforward way to download a whole playlist from youtube:

I have tried different scripts and packages but I always get many error.
So I came up with this solution:


First of all you need to have youtube-dl installed on your machine,
🖥 Debian:
$ sudo apt install youtube-dl
💻 Mac:
$ brew install youtube-dl

Replace PLAYLIST-URL with a url of your interested one:

in 💾 script.sh
———————————————

youtube-dl --get-id PLAYLIST-URL -i > urls.txt
input="urls.txt"
while IFS= read -r line
do
youtube-dl -c -f 22 "https://www.youtube.com/watch?v=""$line" &
done < "$input"

———————————————
videos are downloaded in parallel at the backgound. Do not close the terminal.
if you want to close the terminal put a nohup at the begining of the command.

chmod +x script.sh # to make executable
nohup ./script.sh. # to run in background

22 in commends control the quality of the video. If you need more options use
$youtube-dl -F VIDEO-URL
to select a proper option.
usually 22 is for the best and 18 is for lower quality.


#bash
#youtube-dl
#download

Anyway ther are other options to use youtube-dl:
stackoverflow
ex_savgol_filter.py
1.1 KB
Smoothing Your Data with the Savitzky-Golay Filter and Python

Link
Savitzky-Golay Filter with widget.
â ¿Python Tipâ ¿

Getting the name of the variable using the variable.
Guess the output (no cheating):
False == False in [False]

then you can check the answer from an online Python interpreter.


if you are surprised by the answer, look at "chained comparison" in Python.

credit : svpino
Multiprocessing with progress bar:
GitHub
Using #rsync to transfer files over #ssh
(parallel)
rsync also check for the presence of file at the destination, so can prevent duplicate transfer.
Install_CUDA_UBUNTU.pdf
30.9 KB
Installing #Cuda (nvcc) on #Ubuntu machines.
@scientific_programming
Scientific Programming
Install_CUDA_UBUNTU.pdf
This one also works :

$ conda install -c anaconda cudatoolkit

for a specific version say 11.0:

$ conda install -c conda-forge cudatoolkit=11.0

conda forge is just a channel.
Screenshot from 2022-03-29 17-14-52.png
197 KB
GitHub Copilot
you just need to say what are you thinking about!
The gray part is suggested code by #Copilot.

GitHub Copilot is an AI pair programmer which suggests line completions and entire function bodies as you type. GitHub Copilot is powered by the OpenAI Codex AI system, trained on public Internet text and billions of lines of code.
https://github.com/github/copilot-docs
zc4.gif
1.6 MB
ZSH CODEX

This is a ZSH plugin that enables you to use OpenAI's powerful Codex AI in the command line. OpenAI Codex is the AI that also powers GitHub Copilot. To use this plugin you need to get access to OpenAI's.

https://github.com/tom-doerr/zsh_codex
PyScript

PyScript is a framework that allows users to create rich Python applications in the browser using HTML’s interface. PyScript aims to give users a first-class programming language that has consistent styling rules, is more expressive, and is easier to learn.

pyscript.net