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

https://github.com/Ziaeemehr
Download Telegram
I read this paper a couple of days age,
https://nature.com/articles/ncomms13928
Unfortunately the attached code was in #R, So today I learned R! and provided an interface to #Python for the code.

GitHub
Always use close!
I spent hours on a large code to find out I had not closed the pool in #multiprocessing in #Python
It gives you "too many files open", misleading nasty error 😤.
lmfit.pdf
3.3 MB
Non-Linear Least-Squares Minimization and Curve-Fitting for Python

#lmfit provides a high-level interface to non-linear optimization and curve fitting problems for Python. It builds on and extends many of the optimization methods of scipy.optimize. Initially inspired by (and named for) extending the Levenberg-Marquardt method from scipy.optimize.leastsq, lmfit now provides a number of useful enhancements to optimization and data fitting problems.

Documentation
Neural Networks from Scratch in Python

By Harrison Kinsley
Book
https://nnfs.io/

And his YouTube series.

"Neural Networks From Scratch" is a book intended to teach you how to build neural networks on your own, without any libraries, so you can better understand deep learning and how all of the elements work. This is so you can go out and do new/novel things with deep learning as well as to become more successful with even more basic models.

Github

#course
#book
This media is not supported in your browser
VIEW IN TELEGRAM
ScottPlot is a free and open-source plotting library for .NET that makes it easy to interactively display large datasets. Line plots, bar charts, pie graphs, scatter plots, and more can be created with just a few lines of code.
This media is not supported in your browser
VIEW IN TELEGRAM
Have you ever wanted to quickly try some ideas popping up in your head using a Python Shell (REPL)? You might not want to open a new Jupyter Notebook to experiment with only a few lines of code.
But you might also be hesitant to use a classic Python shell since it doesn’t support auto-completion or docstring as Jupyter Notebook does. You also cannot fix the mistake in the code after hitting Enter.
What if you can turn your boring Python shell into a multi-functional shell like below?

Features:
🌱Syntax highlighting.
🌱Multiline editing (the up arrow works).
🌱Autocompletion
🌱Mouse support
🌱Support for color schemes.
🌱Support for bracketed paste
🌱Both Vi and Emacs key bindings.
🌱Support for double width (Chinese) characters.
🌱... and many other things.


Link
Open in an incognito tab!
Why you should use logging instead of print statements?

It is a common but wrong practice to add print statements inside your code to convey message about the code/function on the standard output.

Logging is a means of tracking events that happen when some software runs. The software’s developer adds logging calls to their code to indicate that certain events have occurred.

Different levels in logging:

DEBUG : Detailed information, typically of interest only when diagnosing problems.
INFO : Confirmation that things are working as expected.
WARNING : An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’). The software is still working as expected.
ERROR : Due to a more serious problem, the software has not been able to perform some function.
CRITICAL : A serious error, indicating that the program itself may be unable to continue running.

Logging HOWTO
Logging in Python
The Virtual Brain

TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologically realistic connectivity.

The TVB EduPack on the TVB main website contains dozens of video lectures explaining TVB’s GUI and scripting interfaces. Some lectures help you reproduce the research done for a peer-reviewed neuroscience publication:
Tutorials.

Basics: My first simulation with The Virtual Brain, lecture by Paul Triebkorn
Basics: Population Models in The Virtual Brain (TVB) and the Phase Plane, lecture by Dr. Michael Schirner
Epilepsy: Modelling Epilepsy with The Virtual Brain, lecture by Julie Courtiol
Epilepsy: The Bayesian Virtual Epileptic Patient (BVEP), lecture by Meysam Hashemi
Stimulation: Brain stimulation in The Virtual Brain, lecture by Andreas Spiegler
Stimulation: Surface-based simulations and deep brain stimulations, lecture by Jil Meier
Stroke: TVB Clinical Applications - Stroke Recovery & Dementia, lecture by Randy McIntosh
Stroke: Hands-On: Modeling stroke brain, lecture by Paul Triebkorn
Model construction: Import Virtual Brain ready data into TVB and create a brain model, lecture by Patrik Bey
Model construction: Integrated workflows: Image processing pipeline, lecture by Dr. Michael Schirner
Special applications: Modeling brain dynamics in brain tumor patients using The Virtual Brain
Special applications: Simulating The Virtual Mouse Brain (TVMB), lecture by Patrik Bey
Advanced simulation: Human Brain Project (HBP) TVB-NEST co-simulation
Advanced simulation: TVB to NEST multi-scale simulation, lecture by Dionysios Perdikis
Other links are Here.

#TVB
Human connectome courses

The Human Connectome Project offers intensive training courses to the neuroscience community in the acquisition, analysis and visualization of data using methods and informatics tools developed by the WU-Minn HCP consortium.

HCP Course : Exploring the Human Connectome
2015-2019 fully available.
timeTable.pdf
431.5 KB
26th Annual IASBS Meeting on Condensed Matter Physics – July 7, 2021-July 9, 2021


Semir Zeki and Bard Ermentrout are among the speakers.

https://iasbs.ac.ir/~condmat-meeting/m26/

توضیحات فارسی
Using #ffmpeg to convert video formats, fast and without sensible loosing quality:

Converted video has only 1/3 of original file size.

🪟 Windows users:

1. Download 'ffmpeg'
https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z

2. unzip file in somewhere like : C:\Program Files\ffmpeg
now you have folders like bin, doc , .. in this directory.

3. add path, so windows know where is it
Properties > Advanced System Settings > Advanced tab > Environment Variables
In the Environment Variables window, click the "Path" row under the "Variable" column, then click Edit > click NEW
paste this address:
C:\Program Files\ffmpeg\bin
Done!

😎 Debian users:
$ sudo apt install ffmpeg
Done!


now you open a windows shell and convert the video:
go to the directory that movie file exist:
for example :
cd .\Downloads\


ffmpeg -i input.webm -r 10 -cpu-used 5 -c:v libx264 -crf 20 -c:a aac -strict experimental -loglevel error output.mp4

20+ FFmpeg Commands For Beginners
A quick guide for using ffmpeg