Tag: python

  • [Python] Unittest

    Introduction unittest is a built-in library in Python that is used for unit testing. It provides a way to test individual units of source code, such as functions or classes, to ensure they work as intended. It is based on the xUnit architecture and features a similar interface to other xUnit frameworks, such as JUnit…

  • [Python] Flask-Boostrap – Python based web development frameworks

    Introduction Flask-Bootstrap is a Flask extension that makes it easy to use Bootstrap with Flask. It provides a simple way to include Bootstrap in your Flask application by adding a few lines of code. Flask-Bootstrap provides a set of base templates and utilities that make it easy to include Bootstrap’s CSS and JavaScript in your…

  • Front-end Web Frameworks

    List of Front-end Web Frameworks Most Popular Frameworks These frameworks are widely used and have a lot of features and functionalities, they are also updated frequently to meet the developer’s needs.

  • [Python] glob package : Search for Files with a Specific Name but You Don’t Know the File Extension

    If you want to search for files with a specific name (e.g. “example”), but you don’t know the file extension, you can use the glob module to search for files with a specific pattern. The glob module provides a function called glob() that can be used to search for files with a specific pattern in…

  • [Python] File find by os.path and pathlib

    using os.path There are several ways to check if a file exists in Python, one of the most common ways is using the os.path module, specifically the os.path.exists() function. The os.path.exists() function takes a file path as an argument and returns True if the file exists, and False if it does not. Here’s an example…

  • Pyvista

    Introduction PyVista is a 3D data visualization library for the Python programming language. It is built on top of the popular VTK library and provides a simple and intuitive interface for working with 3D data. PyVista allows users to create, manipulate, and visualize 3D data in a variety of formats, including STL, PLY, OBJ, VTK,…

  • Django Stack

    Introduction Django is a web framework for building web applications using the Python programming language. It follows the Model-View-Controller (MVC) architectural pattern and encourages the use of reusable code. Django provides an ORM(Object-Relational Mapping) to interact with databases and map Python objects to database tables. PostgreSQL is a popular open-source relational database management system that…

  • How to Use Geometry Generation Functions of GMSH by Python (1) Basics

    You can export Gmsh geometry in a Python environment by using the Python bindings that are provided with Gmsh. The process for doing this is as follows: Here is an example of a script that exports a 3D geometry to a .stl file: STL format is typically used for solid models. If you want to…

  • NGSolve Tutorials (3) Dirichlet Boundary Conditions Part C

    Solve for the free dofs¶ We need to assemble the right hand side of $A_{FF}u_{0,F}=f_F-\left[ Au_D \right]_F$, namely This code creates a linear form f, and it represents the left hand side of the weak form of a PDE. In this case, a constant function 1 is used as a forcing term and multiplied by…

  • NGSolve Tutorials (3) Dirichlet Boundary Conditions Part A

    This tutorial goes in depth into the mechanisms required to solve the Dirichlet problem with a nonzero Dirichlet boundary condition The same mechanisms are used in solving boundary value problems involving operators other than the Laplacian. You will see how to perform these tasks in NGSolve: Spaces with Dirichlet conditions on part of the boundary The first…