Saravanan666/pypi-org huggingface dataset:
Package: dune-aws
dune-awsBasic AWS Components for syncing off-chain data with Dune Community SourcesInstallation & Usagepipinstalldune-awsUsage Option 1; Direct via AWSClientThis option provides the end user with many facets of functionality (delete, upload, download, view files).
One can mix and match the required components for their use case (utilizing alsoaws.last_sync_block).
For a very simple example utilizing this, see Option 2.importosfromdune_aws.awsimportAWSClientaws_client=AWSClient(internal_role=os.environ["AWS_INTERNAL_ROLE"],# Info below is provided by Dune team.external_role=os.environ["AWS_EXTERNAL_ROLE"],external_id=os.environ["AWS_EXTERNAL_ID"],bucket=os.environ["AWS_BUCKET"],)data_set=[{"x":1,"y":2},{"z":3}]aws_client.put_object(data_set,object_key="table_name/must_contain_dot_json_then_number.json",)Usage Option 2; Simpler via RecordHandlerfromdune_aws.record_handlerimportRecordHandlerhandler=RecordHandler(file="table_name/moo_123",data_set=[{"x":1,"y":2},{"z":3}]# should be list[dict[str, Any]],# If AWSClient is not supplied to the handler, it will be loaded from environment.)handler.upload_content(delete_first=True)Note that, one must first coordinate with Dune togain access to the AWS bucket (i.e. external credentials) anddefine the table schema of your dataset.
Package: dune-client
Dune ClientA python framework for interacting with Dune Analytics'officially supported API
service.InstallationImport as a project dependencypipinstalldune-clientExample UsageQuickstart: run_queryExport yourDUNE_API_KEY(or place it in a.envfile - as in
here.env.sampleandsource .env).fromdune_client.typesimportQueryParameterfromdune_client.clientimportDuneClientfromdune_client.queryimportQueryBasequery=QueryBase(name="Sample Query",query_id=1215383,params=[QueryParameter.text_type(name="TextField",value="Word"),QueryParameter.number_type(name="NumberField",value=3.1415926535),QueryParameter.date_type(name="DateField",value="2022-05-04 00:00:00"),QueryParameter.enum_type(name="EnumField",value="Option 1"),],)print("Results available at",query.url())dune=DuneClient.from_env()results=dune.run_query(query)# or as CSV# results_csv = dune.run_query_csv(query)# or as Pandas Dataframe# results_df = dune.run_query_dataframe(query)Further ExamplesGet Latest ResultsUseget_latest_resultsto get the most recent query results without using execution credits.
You can specify amax_age_hoursto re-run the query if the data is too outdated.fromdune_client.clientimportDuneClientdune=DuneClient.from_env()results=dune.get_latest_result(1215383,max_age_hours=8)Paid Subscription FeaturesCRUD OperationsIf you're writing scripts that rely on Dune query results and want to ensure that your local,
peer-reviewed, queries are being used at runtime, you can callupdate_querybeforerun_query!Here is a fictitious example making use of this functionality;fromdune_client.typesimportQueryParameterfromdune_client.clientimportDuneClientsql="""SELECT block_time, hash,FROM ethereum.transactionsORDER BY CAST(gas_used as uint256) * CAST(gas_price AS uint256) DESCLIMIT {{N}}"""dune=DuneClient.from_env()query=dune.create_query(name="Top{N}Most Expensive Transactions on Ethereum",query_sql=sql,# Optional fieldsparams=[QueryParameter.number_type(name="N",value=10)],is_private=False# default)query_id=query.base.query_idprint(f"Created query with id{query.base.query_id}")# Could retrieve using# dune.get_query(query_id)dune.update_query(query_id,# All parameters below are optionalname="Top{N}Most Expensive Transactions on{Blockchain}",query_sql=sql.replace("ethereum","{{Blockchain}}"),params=query.base.parameters()+[QueryParameter.text_type("Blockchain","ethereum")],description="Shows time and hash of the most expensive transactions",tags=["XP€N$IV $H1T"])dune.archive_query(query_id)dune.unarchive_query(query_id)dune.make_private(query_id)dune.make_public(query_id)Developer Usage & DeploymentMakefileThis project's makefile comes equipped with sufficient commands for local development.InstallationmakeinstallFormat, Lint & Typesmakecheckcan also be run individually withfmt,lintandtypesrespectively.Testingmaketest-unit# Unit testsmaketest-e2e# Requires valid `DUNE_API_KEY`can also run both withmake test-allDeploymentPublishing releases to PyPi is configured automatically via github actions
(cf../.github/workflows/py-publish.yaml).
Any time a branch is tagged for release this workflow is triggered and published with the same version name.
Package: dune-common
DUNE-libraryDUNE, the Distributed and Unified Numerics Environment is a modular toolbox
for solving partial differential equations with grid-based methods.The main intention is to create slim interfaces allowing an efficient use of
legacy and/or new libraries. Using C++ techniques DUNE allows one to use very
different implementation of the same concept (i.e. grid, solver, ...) under
a common interface with a very low overhead.DUNE was designed with flexibility in mind. It supports easy discretization
using methods, like Finite Elements, Finite Volume and also Finite
Differences. Through separation of data structures DUNE allows fast Linear
Algebra like provided in the ISTL module, or usage of external libraries
like blas.This package contains the basic DUNE common classes.Dependenciesdune-common depends on the following software packagespkg-configCompiler (C, C++): GNU >=7 or Clang >= 5Other compilers might work too, they need to support C++17 to the extend the
ones above do.The following software is recommended but optional:MPI (either OpenMPI, lam, or mpich suffice)For a full explanation of the DUNE installation process please read
theinstallation notes. The following introduction is meant for
the impatient.LicenseThe DUNE-library and headers are licensed under version 2 of the GNU
General Public License, with the so-called "runtime exception", as
follows:As a special exception, you may use the DUNE source files as part
of a software library or application without restriction.
Specifically, if other files instantiate templates or use macros or
inline functions from one or more of the DUNE source files, or you
compile one or more of the DUNE source files and link them with
other files to produce an executable, this does not by itself cause
Athe resulting executable to be covered by the GNU General Public
License.  This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License.This licence clones the one of the libstc++ library. For further
implications of this library please see theirlicence pageSee the file COPYING for full copying permissions.InstallationShort installation instructions can be found in file INSTALL. For the
full instructions please seehere.Linkshttps://www.dune-project.org/doc/installationhttps://dune-project.org/releases/https://dune-project.org/buildsystem/http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.licensegit-d5f5ceec68cc0dc542f175857c9bf14aa98f2c11
Package: dune-fem
DUNE-FEMDUNE-FEMis aDistributed and Unified Numerics Environmentmodule which defines interfaces for implementing discretization methods like Finite Element Methods (FEM)
and Finite Volume Methods (FV) and Discontinuous Galerkin Methods (DG).If you need help, please ask on ourmailinglist. Bugs can also be submitted
to the DUNE-FEMbugtrackerinstead.TutorialAtutorialfor the recently added Python bindings can be foundhere.InstallationUsing pipdune-fem can be installed using the Package Index of Python (pip).pip install dune-femSeehttps://dune-project.org/doc/installation-pip/for a more detailed
description.From sourceFor a full explanation of the DUNE installation process please read
theinstallation notes.When using the main branch observe thebuild statusto make sure you get a working version.DependenciesDUNE-FEM requires a recent C++ compiler (e.g. g++ or clang),
cmake, pkg-config (see DUNEinstallationfor details)
and depends on the following DUNE modules:dune-commondune-geometrydune-gridThe following DUNE modules are suggested:dune-istldune-localfunctionsdune-alugriddune-spgridThe following software is optional:EigenPAPIPETScSIONlibSuiteSparseLicenseThe DUNE-FEM library, headers and test programs are free open-source software,
licensed under version 2 or later of the GNU General Public License.See the fileLICENSEfor full copying permissions.ReferencesA detailed description of DUNE-FEM can be found inA. Dedner, R. Klöfkorn, M. Nolte, and M. Ohlberger. A Generic Interface for Parallel and Adaptive Scientific Computing:
Abstraction Principles and the DUNE-FEM Module.
Computing, 90(3-4):165--196, 2010.http://dx.doi.org/10.1007/s00607-010-0110-3A. Dedner, R. Klöfkorn, and M. Nolte. Python Bindings for the DUNE-FEM module.
Zenodoo, 2020http://dx.doi.org/10.5281/zenodo.3706994git-2fe2bc59cd8ea6da5f0368b35b7fc1e11dbf227f
Package: dune-fem-dg
DUNE-FEM-DGDUNE-FEM-DG is the implementation of Discontinuous Galerkin schemes
using the DUNE-FEM framework. Stabilized DG schemes for hyperbolic
as well as a wide range of different primal formulations
for elliptic/parabolic problems are implemented.
The operators can be used efficiently both in a
explicit/matrix free implementation or used to
setup a system matrix for use with the linear solvers available in DUNE-FEM.LicenseThe DUNE-FEM-DG module is available under
the GNU General Public License version 2, or (at your option),
any later version.ReferencesA detailed description of how to use the code can be found in the first paper,
the description of the schemes can be found
in the second and third papers and an overview on performance of
the code is given in the forth paper.A. Dedner, R. Klöfkorn.
Extendible and Efficient Python Framework for Solving Evolution Equations
with Stabilized Discontinuous Galerkin Method. Commun. Appl. Math. Comput., 2021.https://dx.doi.org/10.1007/s42967-021-00134-5.S. Brdar, A. Dedner, and R. Klöfkorn.
Compact and stable Discontinuous Galerkin methods for convection-diffusion problems.
SIAM J. Sci. Comput., 34(1):263-282, 2012.https://dx.doi.org/10.1137/100817528A. Dedner and R. Klöfkorn. A Generic Stabilization Approach for Higher Order Discontinuous Galerkin Methods for Convection Dominated Problems.
J. Sci. Comput., 47(3):365-388, 2011.https://dx.doi.org/10.1007/s10915-010-9448-0An overview on performance of the code is given inR. Klöfkorn. Efficient Matrix-Free Implementation of Discontinuous Galerkin Methods for Compressible Flow Problems.
Proceedings of the ALGORITMY 2012.http://www.iam.fmph.uniba.sk/algoritmy2012/zbornik/2Kloefkornf.pdfBy using the code you agree to cite one or both of the first two papers in any publication using this code.Eye-candyThe avatar of the project shows the solution of
the compressible Euler equations in 3D using
the parallel-adaptive DUNE-ALUGrid and the DG
discretization implemented in DUNE-FEM-DG.InstallationUsing pipdune-fem-dg can be installed using the Package Index of Python (pip).pip install dune-fem-dgSeehttps://dune-project.org/doc/installation-pip/for a more detailed
description.From sourcedune-fem-dg also provides ashell scriptto install the sources using a specific git branch.
Further detailed explanation on the DUNE installation process please read
the installation noteshttps://www.dune-project.org/doc/installation/.DocumentationA documentation of the Python bindings of DUNE-FEM-DG can be found inA. Dedner, R. Klöfkorn.
Extendible and Efficient Python Framework for Solving Evolution Equations
with Stabilized Discontinuous Galerkin Method. Commun. Appl. Math. Comput., 2021.https://dx.doi.org/10.1007/s42967-021-00134-5.A documentation for C++ code (and 2.4 release) can be found inA. Dedner, S. Girke, R. Klöfkorn, T. Malkmus. The DUNE-FEM-DG module.
Archive of Numerical Software 5(1): 21--61. 2017.https://dx.doi.org/10.11588/ans.2017.1.28602git-0c4799654bb865f1de44fdd7344c4ebf8bdaf6ff
Package: dune-fempy
Python Bindings for the DUNE-FEM moduleAuthors: Andreas Dedner, Martin Nolte, and Robert Klöfkorndune-fempy aims to provide Python bindings for thedune-femdiscretization
module. Here an example for solving Poisson's equation:importmathfromuflimport*importdune.uflimportdune.createascreategrid=create.grid("ALUConform",dune.grid.cartesianDomain([0,0],[1,1],[8,8]),dimgrid=2)# set up a diffusion reaction model using UFLuflSpace=dune.ufl.Space((grid.dimGrid,grid.dimWorld),1,field="double")u=TrialFunction(uflSpace)v=TestFunction(uflSpace)x=SpatialCoordinate(uflSpace.cell())a=(inner(grad(u),grad(v))+inner(u,v))*dx# provide an exact solution that will be used to add suitable forcing and dirichlet b.c.exact=as_vector([cos(2.*pi*x[0])*cos(2.*pi*x[1])])model=create.model("elliptic",grid,a==0,exact=exact,dirichlet={1:exact})# set up a space and a conforming finite element scheme and solve the PDEspace=dune.create.space("Lagrange",grid,dimrange=1,order=1)scheme=create.scheme("h1",space,model,"cg")uh,info=scheme.solve()# make 'exact' into a grid function for output and uh into an UFL coefficient for error computationexact_gf=create.function("ufl",grid,"exact",5,exact)uh_coeff=dune.ufl.GridCoefficient(uh)# now define a grid function representing the pointwise errorl2error_gf=create.function("ufl",grid,"error",5,as_vector([(exact[0]-uh_coeff[0])**2]))error=math.sqrt(l2error_gf.integrate())print("size:",grid.size(0),"L2-error:",error)grid.writeVTK("laplace",pointdata=[uh,l2error_gf,exact_gf])See the file COPYING for full copying permissions.If you find this tutorial helpful for getting your own projects up and
running please citeTitle: Python Bindings for the DUNE-FEM moduleAuthors: Andreas Dedner, Martin Nolte, and Robert KlöfkornPublisher: Zenodoo, 2020
DOI 10.5281/zenodo.3706994Dependenciesdune-fempy depends on the following DUNE modules:dune-common 2.8+dune-geometry 2.8+dune-grid 2.8+dune-python 2.8+dune-fem 2.8+In addition to the dependencies of these DUNE modules, the following software
packages are required:a C++17 compatible C++ compilerPython 2.7+ (although mostly tested with 3.4+)We strongly recommend installing the following Python packages to make full
use of dune-fem's Python bindings:numpympi4pyufl (2016.1.0+)git-2d404a0a28ab3122f8ae41ce03c19f1b9699eb79
Package: dune.gdt
# This file is part of the dune-xt project:
#   https://zivgitlab.uni-muenster.de/ag-ohlberger/dune-community/dune-xt
# Copyright 2009-2021 dune-xt developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
#      or  GPL-2.0+ (http://opensource.org/licenses/gpl-license)
#          with "runtime exception" (http://www.dune-project.org/license.html)
# Authors:
#   Felix Schindler (2017)
#   René Fritze     (2016, 2018 - 2019)
#   Tobias Leibner  (2020 - 2021)
Package: dune-geometry
DUNE-libraryDUNE, the Distributed and Unified Numerics Environment is a modular toolbox
for solving partial differential equations with grid-based methods.The main intention is to create slim interfaces allowing an efficient use of
legacy and/or new libraries. Using C++ techniques DUNE allows to use very
different implementation of the same concept (i.e. grid, solver, ...) under
a common interface with a very low overhead.DUNE was designed with flexibility in mind. It supports easy discretization
using methods, like Finite Elements, Finite Volume and also Finite
Differences. Through separation of data structures DUNE allows fast Linear
Algebra like provided in the ISTL module, or usage of external libraries
like blas.This package contains the basic DUNE geometry classes.More informationCheck dune-common for more details concerning dependencies, known bugs,
license and installation.git-2cec5b8c5b335df922a121c3e6577e89fc3f4d13
Package: dune-grid
DUNE-libraryDUNE, the Distributed and Unified Numerics Environment is a modular toolbox
for solving partial differential equations with grid-based methods.The main intention is to create slim interfaces allowing an efficient use of
legacy and/or new libraries. Using C++ techniques DUNE allows to use very
different implementation of the same concept (i.e. grid, solver, ...) under
a common interface with a very low overhead.DUNE was designed with flexibility in mind. It supports easy discretization
using methods, like Finite Elements, Finite Volume and also Finite
Differences. Through separation of data structures DUNE allows fast Linear
Algebra like provided in the ISTL module, or usage of external libraries
like blas.This package contains the basic DUNE grid classes.More informationCheck dune-common for more details concerning dependencies, known bugs,
license and installation.git-a1020a6cb33cda7ca531910e900d6b294ea3d1e4
Package: dune-grid-glue
Thedune-grid-gluemoduleThedune-grid-gluemodule provides infrastructure for the coupling of two unrelated Dune grids.
The coupling may be overlapping or nonoverlapping, conforming or nonconforming.
The two grids are not requested to be of the same type, and they may even be of different dimensions.Couplings are described as sets of remote intersections.
Conceptually, these remote intersections are very close to what the regular intersections in the Dune grid interface are, with the difference that the inside and outside entities are taken from different grids.Installationdune-grid-gluerequires the DUNE core modules, version 2.3 or later.Please see thegeneral instructions for building DUNE modulesfor detailed instructions on how to build the module.DevelopmentThedevelopment version ofdune-grid-gluecan be obtained from the DUNE project's Gitlab installation.
At the same place anissue trackercan be found.PublicationsP. Bastian, G. Buse, O. Sander: Infrastructure for the Coupling of Dune Grids, In 'Proceedings of ENUMATH 2009', Springer, 2010, pp. 107-114C. Engwer, S. Müthing: Concepts for flexible parallel multi-domain simulations, In 'Domain Decomposition Methods in Science and Engineering XXII', SpringerLicenseThedune-grid-gluemodule is licensed under the GNU Lesser General Public License, version 3 or later, or the GNU General Public License, version 2, with a special runtime exception.Please see the COPYING file for details.git-1369ae9329d0928480d6b18ed772fc77e1abf752
Package: dune-harmonizer
HarmonizerHarmonizer is a library for translating Dune queries from PostgreSQL and Spark SQL to DuneSQL.
It currently powers our in-app migration service.Harmonizer makes heavy use ofSQLGlot,
an excellent tool for working with SQL queries.
With it, we parse the query into an Abstract Syntax Tree (AST),
and can manipulate the AST, and  finally generate the SQL for that query, even in a different dialect.We add a DuneSQL dialect, and use SQLGlot to translate from Spark SQL/PostgreSQL to DuneSQL.
In the DuneSQL dialect, we translate string literals '0x...' to 0x..., since wesupport native hex literals.Harmonizer also does a mapping of known changes in table names from the legacy Postgres datasets to corresponding table names in DuneSQL.
We need help to make this mapping more complete!Getting startedInstall withpip install dune-harmonizerNow import thetranslate_functions in your code:fromdune.harmonizerimporttranslate_spark,translate_postgreswith function signaturesdeftranslate_spark(query:str)->str:...deftranslate_postgres(query:str,dataset:str)->str:...ContributingContributions are very welcome!Please open an issue or PR, and we will get back to you as soon as we can.If you've found a table that doesn't get mapped to one that exists on Dune SQL, then you can open an issue or just add the table mappingto this linehere in a PR.If there is a function that doesn't get mapped correctly, then you can open an issue or try andadd one here using sqlglotand open a PR.DevelopmentInstall withpoetry installIf the Ruff linter complains, running the following and committing the changes should sufficepoetry run ruff . --fix
poetry run black .Run tests withpoetry run pytestWe test on examples in thetest_casesdirectory.
To force an update of the expected outputs, run theupdate_expected_outputsscript like belowpoetry run python tests/update_expected_outputs.py
Package: dune-iga
dune-igaPreparing the SourcesAdditional to the software mentioned in README, you'll need the
following programs installed on your system:cmake >= 2.8.6or if you use the old autoconf build system:automake >= 1.9autoconf >= 2.62libtoolGetting startedIf these preliminaries are met, you should rundunecontrol allwhich will find all installed dune modules as well as all dune modules
(not installed) which sources reside in a subdirectory of the current
directory. Note that if dune is not installed properly you will either
have to add the directory where the dunecontrol script resides (probably
./dune-common/bin) to your path or specify the relative path of the script.On your project and all uninstalled DUNE source modules found the script
will then call the GNU autoconf/automake to create a ./configure-script
and the Makefiles. Afterwards that configure script will be called and the
modules will be build using make allMost probably you'll have to provide additional information to dunecontrol
(e. g. compilers, configure options) and/or make options.The most convenient way is to use options files in this case. The files
define four variables:CMAKE_FLAGS      flags passed to cmake
AUTOGEN_FLAGS    flags passed to autogen
CONFIGURE_FLAGS  flags passed to configure
MAKE_FLAGS       flags passed to makeAn example options file might look like this:#use this options to autogen, configure and make if no other options are given
CMAKE_FLAGS="-DCMAKE_CXX_COMPILER=g++-4.9-DCMAKE_CXX_FLAGS='-Wall -pedantic'-DCMAKE_INSTALL_PREFIX=/install/path" #Force g++-4.9 and set compiler flags
AUTOGEN_FLAGS="--ac=2.50 --am=1.8" #Forces autoconf 2.50 and automake 1.8
CONFIGURE_FLAGS="CXX=g++-4.9 --prefix=/install/path" #Force g++-4.9 as compiler
MAKE_FLAGS=install #Per default run make install instead of simply makeIf you save this information into example.opts you can pass the opts file to
dunecontrol via the --opts option, e. g.dunecontrol --opts=example.opts allTo get a full list of available configure flags just rundunecontrol configure --helpafter running at least
dunecontrol autogenMore infoSeedunecontrol --helpfor further options.The full build-system is described in the dune-common/doc/buildsystem (Git version) or under share/doc/dune-common/buildsystem if you installed DUNE!
Package: dune-istl
DUNE-libraryDUNE, the Distributed and Unified Numerics Environment is a modular toolbox
for solving partial differential equations with grid-based methods.The main intention is to create slim interfaces allowing an efficient use of
legacy and/or new libraries. Using C++ techniques DUNE allows to use very
different implementation of the same concept (i.e. grid, solver, ...) under
a common interface with a very low overhead.DUNE was designed with flexibility in mind. It supports easy discretization
using methods, like Finite Elements, Finite Volume and also Finite
Differences. Through separation of data structures DUNE allows fast Linear
Algebra like provided in the ISTL module, or usage of external libraries
like blas.This package contains the basic DUNE istl classes.More informationCheck dune-common for more details concerning dependencies, known bugs,
license and installation.git-44ee928e99a86f8a51d517dc9d68a4702f2c0e57
Package: dune-localfunctions
DUNE-libraryDUNE, the Distributed and Unified Numerics Environment is a modular toolbox
for solving partial differential equations with grid-based methods.The main intention is to create slim interfaces allowing an efficient use of
legacy and/or new libraries. Using C++ techniques DUNE allows to use very
different implementation of the same concept (i.e. grid, solver, ...) under
a common interface with a very low overhead.DUNE was designed with flexibility in mind. It supports easy discretization
using methods, like Finite Elements, Finite Volume and also Finite
Differences.Dune-localfunctionsThis module provides interfaces and implementations for local
finite element ansatz spaces, i.e., shape functions, associated
interpolation functionals, and relation to grid entities.More informationCheck dune-common for more details concerning dependencies, known bugs,
license and installation.git-3f2805875bbe5569190663c13bfcd1c49ccee7e9