Skip to content

Instantly share code, notes, and snippets.

@dineshadepu
dineshadepu / Machine_learning_guide.md
Created April 30, 2025 04:34
Machine learning till neural networks path

To effectively learn Neural Networks, it’s best to build your understanding step-by-step, starting from foundational concepts in math and programming, and progressing through machine learning. Here's a clear learning path:


🔹 1. Prerequisites

Mathematics:

  • Linear Algebra – Vectors, matrices, matrix multiplication
  • Calculus – Derivatives, gradients (for backpropagation)
  • Probability & Statistics – Basics of distributions, expectation, Bayes’ theorem
@dineshadepu
dineshadepu / vertex_cfd_fem.md
Created April 4, 2025 10:59
Vertex-CFD FEM solver

Trilinos installation

mkdir trilinos
cd trilinos/
git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git

Then source the spack

source spack/share/spack/setup-env.sh
@dineshadepu
dineshadepu / pysph_install.md
Created November 6, 2024 13:27
PySPH working installation instructions

Install pysph

pip install 'cython<3'
pip install 'numpy==1.23'
pip install h5py
pip install https://github.com/pypr/pysph/zipball/master
@dineshadepu
dineshadepu / makefile
Created November 3, 2024 09:46
Run tests in Cabana if ctests are not working
# Define the build directory containing binaries
BUILD_DIR := /home/dineshadepu/life/softwares/Cabana_package_template/build
# for mac os
BUILD_DIR := /Users/dineshadepu/life/softwares/Cabana_package_template/build
# Find all binaries in BUILD_DIR with "test" in the name (Ubuntu compatible)
TEST_BINARIES := $(shell find $(BUILD_DIR) -type f -executable -name "*test*")
# for mac os
# TEST_BINARIES := $(shell find $(BUILD_DIR) -type f -perm +111 -name "*test*")
@dineshadepu
dineshadepu / ubuntu_setup.md
Last active October 9, 2024 07:18
Ubuntu setup

Make mouse fast

Search "Mouse and Touchpad" and change the speed.

Bring dock down and make icons small

Go to "Appearance" and change the dock properties

Make the cross button to left

@dineshadepu
dineshadepu / Cabana_post_processing.md
Created August 7, 2024 16:39
Analyzing Particle Simulation Output Using HDF5

Documentation for Analyzing Particle Simulation Output Using HDF5

This section provides a step-by-step guide on how to analyze and visualize the output data from a particle simulation using HDF5 files. We will demonstrate how to load the results, process the data, and plot the variation of a specific quantity (in this case, the position of a particle) over time using Python libraries such as h5py and matplotlib.

Simulation Overview

@dineshadepu
dineshadepu / bodies_settling_in_tank_under_gravity_Cabana.cpp
Created April 24, 2024 17:52
Rigid bodies settling under gravity in a tank simulated with Cabana
/****************************************************************************
* Copyright (c) 2018-2022 by the Cabana authors *
* All rights reserved. *
* *
* This file is part of the Cabana library. Cabana is distributed under a *
* BSD 3-clause license. For the licensing terms see the LICENSE file in *
* the top-level directory. *
* *
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/
@dineshadepu
dineshadepu / convert.md
Last active August 6, 2024 14:12
Video formats conversion commands

ffmpeg -i 3d_dam_break.webm -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" 3d_dam_break.mp4

ffmpeg -i dinesh_2024_single_particle_swelling_N_15_buoyancy_check.webm -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" dinesh_2024_single_particle_swelling_N_15_buoyancy_check.mp4

ffmpeg -i fifty_bodies_500_density_sph_representation.webm -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" fifty_bodies_500_density_sph_representation.gif

To make movies out of images png, such as simulations movies of PySPH

@dineshadepu
dineshadepu / fast_nnps_pysph.txt
Created December 14, 2023 16:40
Fast nnps different resolution SPH
https://gitlab.com/pypr/adaptive_sph/-/blob/master/code/fpc_auto.py#L795
https://gitlab.com/pypr/adaptive_sph/-/blob/master/code/fpc_auto.py#L435