Saravanan666/pypi-org huggingface dataset:
Package: fenics-ffcx
FFCx: The FEniCSx Form CompilerFFCx is a new version of the FEniCS Form Compiler. It is being actively
developed and is compatible with DOLFINx.FFCx is a compiler for finite element variational forms. From a
high-level description of the form in the Unified Form Language (UFL),
it generates efficient low-level C code that can be used to assemble the
corresponding discrete operator (tensor). In particular, a bilinear form
may be assembled into a matrix and a linear form may be assembled into a
vector.  FFCx may be used either from the command line (by invoking theffcxcommand) or as a Python module (import ffcx).FFCx is part of the FEniCS Project. For more information, visithttps://www.fenicsproject.orgInstallationTo install FFCx from PyPI:$ pip install fenics-ffcxTo install FFCx from the source directory:$ pip install .DocumentationDocumentation can be viewed athttps://docs.fenicsproject.org/ffcx/mainInterface file installation onlyFFCx provides theufcx.hinterface header for finite element kernels,
used by DOLFINx.ufcx.his installed by FFCx within the Python site
packages, but it is sometimes helpful to install only the header file.
This can be done usingcmake:$ cmake -B build-dir -S cmake/
$ cmake --build build-dir
$ cmake --install build-dirLicenseThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with this program. If not, seehttps://www.gnu.org/licenses/.
Package: fenics-plotly
FEniCS-PlotlyA package for plotting FEniCS objects using plotlyFree software: MIT licenseDocumentation:https://finsberg.github.io/fenics-plotlySource code:https://github.com/finsberg/fenics-plotlyFeaturesPlot almost all types of FEniCS objects using one interfaceCreditsThis package was created withCookiecutterand thefinsberg/cookiecutter-pypackageproject template.This package is also inspired bybvpy
Package: fenicsprecice
FEniCS-preCICE adapterpreCICE-adapter for the open source computing platform FEniCS.Installing the packageUsing pip3 to install from PyPIIt is recommended to installfenicsprecice from PyPIviapip3install--userfenicspreciceThis should work out of the box, if all dependencies are installed correctly. If you face problems during installation or you want to run the tests, see below for a list of dependencies and alternative installation proceduresClone this repository and use pip3Required dependenciesMake sure to install the following dependencies:preCICEpython3 (this adapteronly supports python3)the python language bindings for preCICEFEniCS(with python interface, installed by default)and scipy (pip3 install scipy)Build and install the adapterAfter cloning this repository and switching to the root directory (fenics-adapter), runpip3 install --user .from your shell.Test the adapterAs a first test, try to import the adapter viapython3 -c "import fenicsprecice".You can run the other tests viapython3 setup.py test.Single tests can be also be run. For example the testtest_vector_writein the filetest_write_read.pycan be run as follows:python3-munittesttests.test_write_read.TestWriteandReadData.test_vector_writeTroubleshootingFEniCS is suddenly broken:There are two known issues with preCICE, fenicsprecice and FEniCS:If you seeImportError: cannot import name 'sub_forms_by_domain'runpip3 uninstall -y fenics-ufl. For details, refer toissue #103.If you seeImportError: cannot import name 'cellname2facetname' from 'ufl.cell', refer toissue #154.If you seeModuleNotFoundError: No module named 'dolfin'and have installed PETSc from source, refer tothis forum post. Short version: Try to use the PETSc that comes with your system, if possible. Note that you can alsocompile preCICE without PETSc, if necessary.If this does not help, you can contact us ongitteroropen an issue.Use the adapterPlease refer toour website.PackagingTo create and install thefenicsprecicepython package the following instructions were used:How To Package Your Python Code from python-packaging.readthedocs.io.CitingFEniCS-preCICE: If you are using this adapter (fenics-adapter), please refer to theciting information on the FEniCS adapter.preCICE: preCICE is an academic project, developed at theTechnical University of Munichand at theUniversity of Stuttgart. If you use preCICE, pleasecite preCICE.FEniCS: If you are using FEniCS, please also consider the information onthe official FEniCS website on citing.Development historyThe initial version of this adapter was developed byBenjamin Rodenbergduring his research stay at Lund University in the group forNumerical Analysisin close collaboration with Peter Meisrimel.Richard Hertrichcontributed the possibility to perform FSI simulations using the adapter in hisBachelor thesis.Ishaan Desaiimproved the user interface and extended the adapter to allow for parallel FEniCS computations and 3D cases in certain scenarios.
Package: fenics-pulse
pulseA software for solving problems in cardiac mechanics.Overviewpulseis a software based onFEniCSthat aims to solve problems in cardiac mechanics (but is easily extended to solve more general problems in continuum mechanics).pulseis a results of the author'sPhD thesis, where most of the relevant background for the code can be found.While FEniCS offers a general framework for solving PDEs,pulsespecifically targets problems in continuum mechanics. Therefore, most of the code for applying compatible boundary conditions, formulating the governing equations, choosing appropriate spaces for the solutions and applying iterative strategies etc. are already implemented, so that the user can focus on the actual problem he/she wants to solve rather than implementing all the necessary code for formulating and solving the underlying equations.Installation instructionsInstall with pippulsecan be installed directly fromPyPIpython3 -m pip install fenics-pulseor you can install the most recent development versionpython3 -m pip install git+https://github.com/finsberg/pulse.gitInstall with condaYou can also install the package usingcondaconda install -c conda-forge pulseDockerIt is also possible to use Docker. There is a prebuilt docker image
using the development version of FEniCS, python3.10 and pulse. You can get it by typingdocker pull ghcr.io/finsberg/pulse:latestRequirementsFEniCS version 2019.1.0 or newer (older versions might work but is not tested against anymore)Note that if you install FEniCS using anaconda then you will not get support for parallel HDF5
see e.gthis issue.Getting startedCheck out the demos in the demo folder. These demos are currently in jupyter notebook format.
If you want to run them as python files you can convert the notebooks to.pyfiles using e.gjupytextIf you have a question about how to use the software you can ask a question or start a new discussion in thediscussion sectionAutomated testTest are provided in the foldertests. You can run the test
withpytestpython3 -m pytest tests -vvDocumentationDocumentation can be found atfinsberg.github.io/pulseYou can create documentation yourselves by typingmake htmlin the
root directory.CitingIf you usepulsein your own research, please cite theJOSS paper@article{pulse,
  doi = {10.21105/joss.01539},
  url = {https://doi.org/10.21105/joss.01539},
  year  = {2019},
  month = {sept},
  publisher = {The Open Journal},
  volume = {4},
  number = {41},
  pages = {1539},
  author = {Henrik Finsberg},
  title = {pulse: A python package based on FEniCS for solving problems in cardiac mechanics},
  journal = {The Journal of Open Source Software}
}Known issuesIf you encounter errors withh5pytry to uninstall it (pip uninstall h5py) and then re-install it without installing any binary packages, i.epython3 -m pip install h5py --no-binary=h5pyContributingSeeCONTRIBUTING.md
Package: fenics-pulse2
Pulse2pulse2is a FEniCS-based cardiac mechanics solver. It is in part inspired byfenics-pulseandpulsebut it created to make the transition tofenicsx-pulseeasier.Installpython3 -m pip install fenics-pulse2QuickstartTBWContributingSeehttps://finsberg.github.io/fenicsx-pulse/CONTRIBUTING.html
Package: fenics-ufl
The Unified Form Language (UFL) is a domain specific language for
declaration of finite element discretizations of variational forms. More
precisely, it defines a flexible interface for choosing finite element
spaces and defining expressions for weak forms in a notation close to
mathematical notation.UFL is part of the FEniCS Project. For more information, visithttps://www.fenicsproject.orgDocumentationDocumentation can be viewed athttps://fenics-ufl.readthedocs.org/.LicenseThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Package: fenics-ufl-legacy
The Unified Form Language (UFL) is a domain specific language for
declaration of finite element discretizations of variational forms. More
precisely, it defines a flexible interface for choosing finite element
spaces and defining expressions for weak forms in a notation close to
mathematical notation.UFL is part of the FEniCS Project. For more information, visithttps://www.fenicsproject.orgDocumentationDocumentation can be viewed athttps://fenics-ufl.readthedocs.org/.LicenseThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Package: fenicsx-plotly
fenicsx-plotlyfenicsx-plotlyis package for plotting FEniCSx objects using plotly. It is a successor offenics-plotly.Documentation:https://finsberg.github.io/fenicsx-plotly/Source code:https://github.com/finsberg/fenicsx-plotlyInstallTo installfenicsx-plotlyyou need to firstinstall FEniCSx. Next you can installfenicsx-plotlyvia pippython3 -m pip install fenicsx-plotlyWe also provide a pre-built docker image with FEniCSx andfenicsx-plotlyinstalled. You pull this image using the commanddocker pull ghcr.io/finsberg/fenicsx-plotly:v0.3.0Simple Exampleimportdolfinxfrommpi4pyimportMPIfromfenicsx_plotlyimportplotmesh=dolfinx.mesh.create_unit_cube(MPI.COMM_WORLD,3,3,3)plot(mesh)Supported objects (and object that will be supported in the future)dolfinx.mesh.Meshdolfinx.mesh.MeshTagsMetaClassdolfinx.fem.FunctionSpacedolfinx.fem.FunctionScalarVectordolfinx.fem.bcs.DirichletBCMetaClassScalarVectorUsage with JupyterBookIf you want to embed the visualizations generated byfenicsx-plotlyinto a webpage generated by JupyterBook such asthe documentation forfenicsx-plotlyyou need to add the following configuration in your_config.ymlsphinx:config:html_js_files:-https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.jsSeehttps://jupyterbook.org/en/stable/interactive/interactive.html#plotlyfor more information.ContributingContributions are welcomed!Seehttps://finsberg.github.io/fenicsx-plotly/CONTRIBUTING.htmlfor more info.
Package: fenicsx-pulse
fenicsx-pulsefenicsx-pulseis a cardiac mechanics solver based on FEniCSx. It is a successor ofpulsewhich is a cardiac mechanics solver based on FEniCS.NoticeThis repo is a complete rewrite ofpulseto work with FEniCSx. The package is not yet ready for release.If you are using FEniCS please check outpulseinsteadDocumentation:https://finsberg.github.io/fenicsx-pulse/Source code:https://github.com/finsberg/fenicsx-pulseInstallTo installfenicsx_pulseyou need to firstinstall FEniCSx. Next you can installfenicsx_pulsevia pippython3 -m pip install fenicsx-pulseWe also provide a pre-built docker image with FEniCSx andfenicsx_pulseinstalled. You pull this image using the commanddocker pull ghcr.io/finsberg/fenicsx-pulse:v0.1.5Simple Exampleimportdolfinximportnumpyasnpimportfenicsx_pulsefrommpi4pyimportMPIfrompetsc4pyimportPETSc# Create unit cube meshmesh=dolfinx.mesh.create_unit_cube(MPI.COMM_WORLD,3,3,3)# Specific list of boundary markersboundaries=[fenicsx_pulse.Marker(marker=1,dim=2,locator=lambdax:np.isclose(x[0],0)),fenicsx_pulse.Marker(marker=2,dim=2,locator=lambdax:np.isclose(x[0],1)),]# Create geometrygeo=fenicsx_pulse.Geometry(mesh=mesh,boundaries=boundaries,metadata={"quadrature_degree":4},)# Create passive material modelmaterial_params=fenicsx_pulse.HolzapfelOgden.transversely_isotropic_parameters()f0=dolfinx.fem.Constant(mesh,PETSc.ScalarType((1.0,0.0,0.0)))s0=dolfinx.fem.Constant(mesh,PETSc.ScalarType((0.0,1.0,0.0)))material=fenicsx_pulse.HolzapfelOgden(f0=f0,s0=s0,**material_params)# Create model for active contractionTa=dolfinx.fem.Constant(mesh,PETSc.ScalarType(0.0))active_model=fenicsx_pulse.ActiveStress(f0,activation=Ta)# Create model for compressibilitycomp_model=fenicsx_pulse.Incompressible()# Create Cardiac Modelmodel=fenicsx_pulse.CardiacModel(material=material,active=active_model,compressibility=comp_model,)# Specific dirichlet boundary conditions on the boundarydefdirichlet_bc(state_space:dolfinx.fem.FunctionSpace,)->list[dolfinx.fem.bcs.DirichletBCMetaClass]:V,_=state_space.sub(0).collapse()facets=geo.facet_tags.find(1)# Specify the marker used on the boundarydofs=dolfinx.fem.locate_dofs_topological((state_space.sub(0),V),2,facets)u_fixed=dolfinx.fem.Function(V)u_fixed.x.set(0.0)return[dolfinx.fem.dirichletbc(u_fixed,dofs,state_space.sub(0))]# Use a traction on the opposite boundarytraction=dolfinx.fem.Constant(mesh,PETSc.ScalarType(-1.0))neumann=fenicsx_pulse.NeumannBC(traction=traction,marker=2)# Collect all boundary conditionsbcs=fenicsx_pulse.BoundaryConditions(dirichlet=(dirichlet_bc,),neumann=(neumann,))# Create mechanics problemproblem=fenicsx_pulse.MechanicsProblem(model=model,geometry=geo,bcs=bcs)# Set a value for the active stressTa.value=2.0# Solve the problemproblem.solve()# Get the solutionu,p=problem.state.split()# And save to XDMFxdmf=dolfinx.io.XDMFFile(mesh.comm,"results.xdmf","w")xdmf.write_mesh(mesh)xdmf.write_function(u,0.0)xdmf.write_function(p,0.0)ContributingSeehttps://finsberg.github.io/fenicsx-pulse/CONTRIBUTING.html
Package: fenix-checker
fenix-checkerA small server which checks if user's IP is in a trustedFenixnetwork. Used byipv6widgetandstandard-konektivity.cz.DependenciesPython >= 3.6pyaml >= 17psycopg2 >= 2.7.4Installation$ virtualenv -p `which python3.6` .venv
$ source .venv/bin/activate
$ pip install fenix_checker
$ cp config.example.yml config.yml
$ $EDITOR config.yml # set DB credentialsRunning in productionuWSGI:$ uwsgi --master --single-interpreter --threads 2 --http :5000 -H .venv -w fenix_checker.serverGUnicorn:$ gunicorn -w 2 -k gevent --timeout 160 -n netmetr-proxy fenix_checker:server:appUsageGET /
-> 200
   {"result": 1}Result is:0for non-Fenix networks>= 1for Fenix networksIP is validated with Python'sipaddressmodule before passing it to DB:GET /  # with client IP somehow spoofed to eg. "127.0.0.1'); DROP TABLE networks;"
-> 400
  {"error": "Invalid IP"}DevelopmentStarting server with auto reload on file changes:$ FLASK_APP=fenix_checker/server.py FLASK_DEBUG=1 flask runLinting Python code:$ flake8 --config=.flake8rc *pyLicenseGPLv3
Package: fenix-library-configuration
Configuration - Fenix Library - RebornOS TeamDocumentation by @shivanandvp (shivanandvp@rebornos.org)Please refer toLICENSEfor license information.OverviewTheconfigurationpackage consists of the tools required to read and writeJSONconfiguration files.Warning: This package is still in the Alpha stage. It is not ready for production projects. Please do not use for any critical softwarePLEASE CLICK HEREfor the full documentation
Package: fenix-library-running
Running - Fenix Library - RebornOS TeamDocumentation by @shivanandvp (shivanandvp@rebornos.org)Please refer toLICENSEfor license information.OverviewTherunningpackage contains the tools required to run and live-logOS commands,functions,scripts, andbatch jobseither immedietly, or queued for later execution.Warning: This package is still in the Alpha stage. It is not ready for production use. Please do not use for any critical softwarePLEASE CLICK HEREfor the full documentation
Package: fenkeysmanagement
FenKeysManagementSimple key management. Generate tokens for any usage.FenKeysManagement is a simple tool for manage and generate tokens that can be
used in different applications. Like for example a flask API.UsageKey managementFor managing your keyfile you have a commandfenkmwhere you can add, see and revoke tokens.usage: fenkm [-h] [genkey ...] [revokekey ...] [listkeys ...]

Simple key management. Generate tokens for any usage.

positional arguments:
  genkey      Generate a new key. Optional argument comment in the format comment=<comment>
  revokekey   Revoke a key. The format should be <key>=<value> where <key> cant be the id or the key directly
  listkeys    List all the key available

options:
  -h, --help  show this help message and exitModule usageAs an example, here is a snippet of how I use this in some flask applications.
This is not a working flask application, don't copy past without understanding it.import json

from fenkeysmanagement import KeyManager

# ... more imports and flask related code

key_manager = KeyManager()

# .. more flask related code

def check_perms(request):
    data_str = request.data.decode('utf-8')
    try:
        data_json = json.loads(data_str)
        if "auth_key" in data_json.keys():
            key_manager.reload_keys()
            if not key_manager.key_revoked(data_json['auth_key']):
                return True
        return False
    except json.decoder.JSONDecodeError:
        return False

# ... more flask related code

@app.route("/", methods=["POST"])
def home():
    if not check_perms(request):
        # ... code for handle the failed auth verification
    # ... code for handle the real request after correct auth verification

# ... more flask related code
Package: fennel
FennelA task queue for Python 3.7+ based on Redis Streams with a Celery-like API.https://fennel.dev/Note: This is analpharelease. The project is under development, breaking changes are likely.FeaturesSupports both sync (e.g. Django, Flask) and async (e.g. Starlette, FastAPI) code.Sane defaults: at least once processing semantics, tasks acknowledged on completion.Automatic retries with exponential backoff for fire-and-forget jobs.Clear task statuses available (e.g. sent, executing, success).Automatic task discovery (defaults to using**/tasks.py).Exceptionally small and understandable codebase.InstallationpipinstallfennelBasic UsageRunRedisand then execute your code intasks.py:fromfennelimportAppapp=App(name='myapp',redis_url='redis://127.0.0.1')@app.taskdeffoo(n):returnn# Enqueue a task to be executed in the background by a fennel worker process.foo.delay(7)Meanwhile, run the worker:$fennelworker--apptasks:appAsynchronous APIFennel also supports an async API. If your code is running in an event loop
(e.g. viaStarletteorFastAPI), you will want to use the async
interface instead:fromfennelimportAppapp=App(name='myapp',redis_url='redis://127.0.0.1',interface='async')@app.taskasyncdefbar(x):returnxawaitbar.delay(5)See alsoIf you need to ensure that all tasks for a given key are processed in-order,
please see our sister projectRunnel.
Package: fennel-seed
FennelAuthors:Stephan Meighen-Berger, developed the Fennel CodeTable of contentsIntroductionCitationDocumentationInstallationBetaIntroductionWelcome to Fennel!A python package to simulate the light production of particles.
It calculates the light emissions from cascades and tracks.CitationThis packages includes/uses distributions developed inLeif Rädel, Christopher Wiebusch,Calculation of the Cherenkov light yield from low energetic secondary particles accompanying high-energy muons in ice and water with Geant4 simulations,Astroparticle Physics,
Volume 38,
2012,
Pages 53-67,
ISSN 0927-6505,https://doi.org/10.1016/j.astropartphys.2012.09.008.
(https://www.sciencedirect.com/science/article/pii/S0927650512001831)andhttps://www.institut3b.physik.rwth-aachen.de/global/show_document.asp?id=aaaaaaaaaapwhjzPlease cite thissoftwareusing@software{fennel2022@github,
  author = {Stephan Meighen-Berger},
  title = {{Fennel}: Light from tracks and cascades,
  url = {https://github.com/MeighenBergerS/fennel},
  version = {1.3.3},
  year = {2022},
}and their work when using this package.DocumentationThe package provides automatically generated documentation underhttps://meighenbergers.github.io/fennel/InstallationInstall using pip:pipinstallfennel_seedThe PyPi webpageOther installation methods:
To install please clone the (repository)[https://github.com/MeighenBergerS/fennel] or download the latest release. Then
follow the instructions given in INSTALL.txt.
Note this should install all necessary components.Or install using the setup.pyPlease note that JAX is not included in the basic installation.
To use this option, please also install JAX or install fennel using:pipinstallfennel_seed[jax]For the cpu version of jax use:pipinstallfennel_seed[cpu]To be able to run the example notebook use:pipinstallfennel_seed[interactive]BetaFennel offers a few subprojects which are currently still in beta. While these projects work, they have as of yet not been designed for usability. Currently available subprojects are available offer the GitHub repository (not pip!). Subprojects are:Jfennel: A Julia implementation of Fennel. This is its own branch in the repository and still requires further work and cross-checks.Seed: An interface to the Geant4 code used for the parametrization. The code itself offers a Python interface for ease of use. To use this code, a Geant4 installation is required. Currently this module has only been tested in a Linux environment. The code itself is contained in the seed folder and includes some examples in the notebooks folder on how to use it.