Saravanan666/pypi-org huggingface dataset:
Package: dumpenv
dumpenv: Dump values of the current Python environmenthttps://github.com/guettli/dumpenvWhy?Sometimes source code works in one environment,
but in a different environment it fails.Same source code, but different results …. Hmm, there must be a differenence in the environment …. but what?You can use this tool to dump a lot of values which influence the python interpreter.Then you can use any diff tool (I likemeld) to compare both environments.At the moment these text files get created:PATHPYTHONPATHlocaleosos_environpip_freezeplatformsitesyssys_pathI guess the above names do not need any explanation.Above files get created in a temporary directory which roughly looks like this:/tmp/dumpenv_{USER}@{HOST}--{VIRTUAL_ENV}_RANDOMTo make the diff easier to read $VIRTUAL_ENV and $HOME get replaced in the output.UsageUsage:dumpenv [-o OUTPUT_DIRECTORY | --output-directory=OUTPUT_DIRECTORY]
dumpenv (-h | --help)Options:-o --output-directory OUTPUT_DIRECTORY Create text file in this directory.
                                     Or use environment variable DUMPENV_OUTPUT_DIRECTORYExampleExample:user1@host1> dumpenv
Dumped environment to directory OUT1

user2@host2> dumpenv
Dumped environment to directory OUT2

me@pc> scp -r user1@host1:/tmp/OUT1/ tmp/
me@pc> scp -r user2@host2:/tmp/OUT2/ tmp/
me@pc> meld tmp/OUT1 tmp/OUT2… Ah! Now you see the difference :-)APICall it from Python like this:out_dir = dumpenv.create_data_and_dump_it()InstallInstall frompypi:pip install dumpenvUse CasesUse case 1: Your script works, but it does not, if called via unix cron. Rundumpenvvia shell
and via cron and compare the result.Use case 2: Your code works via web (wsgi, django, …) but it fails if you call it on the shell.Use case 3: Your code works in the development environment, but not on the production server.DreamIn my case Python scripts run in different environments:called from PyCharmcalled from Shellcalled from Croncalled from webservercalled from subprocesscalled from configuration management (for example Ansible)called from systemd…My dream is that the environment from all above calls is equal.I think this dream will never come true. I think it is better to reduce the above list.AdvertismentCreated roughly according my ownprogramming guidelinesUsessubxinstead of subprocessUses mygithub commit, travis CI, bumpversion, Upload to pypirecipeFeedbackFeedback is very welcome, please create an issue at github or write me an email.
Package: dump-env
A utility tool to create.envfilesdump-envtakes an.env.templatefile and some optional environmental variables to create a new.envfile from these two sources. No external dependencies are used.Why?Why do we need such a tool? Well, this tool is very helpful when your CI is buildingdocker(or other) images.Previouslywe had some complex logic of encrypting and decrypting files, importing secret keys and so on.
Now we can just create secret variables for our CI, add some prefix to it, and usedump-envto make our life easier.Installation$pipinstalldump-envQuickstartThis quick demo will demonstrate the main and the only purpose ofdump-env:$dump-env--template=.env.template--prefix='SECRET_ENV_'>.envThis command will:take.env.templateparse its keys and valuesread all the variables from the environment starting withSECRET_ENV_remove this prefixmix it all together, environment vars may override ones from the templatesort keys in alphabetic orderdump all the keys and values into the.envfileAdvanced UsageMultiple prefixes$dump-env-t.env.template-p'SECRET_ENV_'-p'ANOTHER_SECRET_ENV_'>.envThis command will do pretty much the same thing as with one prefix. But, it will replace multiple prefixes.
Further prefixes always replace previous ones if they are the same.
For example:$exportSECRET_TOKEN='very secret string'$exportSECRET_ANSWER='13'$exportANOTHER_SECRET_ENV_ANSWER='42'$exportANOTHER_SECRET_ENV_VALUE='0'$dump-env-pSECRET_-pANOTHER_SECRET_ENV_ANSWER=42TOKEN=verysecretstringVALUE=0Strict env variablesIn case you want to be sure thatYOUR_VARexists
in your environment when dumping, you can use--strictflag:$dump-env--strictYOUR_VAR-pYOUR_
Missingenvvars:YOUR_VAROups! We forgot to create it! Now this will work:$exportYOUR_VAR='abc'$dump-env--strictYOUR_VAR-pYOUR_VAR=abcAny number of--strictflags can be provided.
No more forgotten template overrides or missing env vars!Source templatesYou can use an env template as a source template by using the-sor--sourceargument. This will restrict any non-prefixed variables found in the environment to only those already defined in your template.$cattemplate.envANSWER=13TOKEN=verysecretstringVALUE=0$exportANSWER='42'$dump-env--source=template.envANSWER=42TOKEN=verysecretstringVALUE=0You can still also use prefixes to add extra variables from the environment$exportEXTRA_VAR='foo'$dump-env-stemplate.env-pEXTRA_ANSWER=13TOKEN=verysecretstringVALUE=0VAR=fooStrict SourceUsing the--strict-sourceflag has the same effect as defining a--strictflag for every variable defined in the source template.$exportANSWER='42'$dump-env-stemplate.env--strict-source
Missingenvvars:TOKEN,VALUECreating secret variables in some CIstravis docsgitlab-ci docsgithub actionsReal-world usagesProjects that use this tool in production:wemake-django-templatewemake-vue-templateRelatedYou might also be interested in:https://github.com/wemake-services/dotenv-linterLicenseMIT
Package: dumpit
dumpitList all python object attributes with descriptionsInstallationpip install dumpitUsagefromdumpitimportpdumpit,fdumpitmy_object=...# Print object to standard outputpdumpit(my_object)#Print object to standard output in vertical viewpdumpit(my_object,view_='vertical')# vertical | table# Export object to string as textmy_var=fdumpit(my_object)# Disable colors in terminal outputpdumpit(my_object,colors=False)# False | terminal# Enable colors in string outputmy_var=fdumpit(my_object,colors='terminal')# Show dunder methods (magic methods)pdumpit(my_object,all_=True)Changelog0.6.0Fixed in 0.6.0all_ parameter default value is now Falsecode formatting0.5.0Fixed in 0.5.0Python 3 compatibility0.4.2Fixed in 0.4.2Dependency version changed: Click 6.7 -> Click 7.00.4.1Fixed in 0.4.1Dunder methods description formatting and new lines.0.4.0Added in 0.4.0Descriptions for every objects attribute.Separate dunders from other attributes.0.3.0Added in 0.3.0Analyse is now view.Table view support: Print object contents in table view in terminal.Warnings: Prints warnings in terminal if unknown coloring or view is used.0.2.0Added 0.2.0Coloring support: Terminal colors for object attributes.
Package: dump-it
# dump_itSimple tool for easy database dumping(only postgresql is supported yet).## How to?Clone this repositorygit clone https://github.com/DevAlone/dump_itGo todump_itdircd dump_itCreate configscp default.conf.py.example default.conf.pycp test.conf.py.example test.conf.pyDefault config is config with global settings, each of which can be overridden in config for database. Example of config for database is test.conf.py.example. You can create as many configs as many databases you haveCreate cron rulesudo crontab -e` * * * * * PATH_TO_REPOSITORY/dump.py-cPATH_TO_REPOSITORY > /var/log/dump_it.stdout.log 2> /var/log/dump_it.stderr.log `And don’t forget to change PATH_TO_REPOSITORY to actual path of where you cloned it. So program will be running every minute, getting configs from repository dir and writing logs to /var/log/dump_it.stdout.log and /var/log/dump_it.stderr.logHappy dumping!
Package: dumpling
#+TITLE: dumpling[[https://travis-ci.org/RNAer/dumpling][https://travis-ci.org/RNAer/dumpling.svg?branch=master]]
[[https://coveralls.io/github/RNAer/dumpling?branch=master][https://coveralls.io/repos/github/RNAer/dumpling/badge.svg?branch=master]][[http://rnaer.github.io/dumpling/][Documentation]]
Package: dump_xml
A simple dictionary to XML converter that “Just Works”.Usage$python>>>fromdump_xmlimportdump_xml>>>dump_xml({1:2},name="root")<Element'root'at0x0000000003B104A8>Installation$pipinstalldump_xmlCompatibilityTests run on Python 2.7, 3.4 and 3.5. Compatibility is aimed primarily at
ensuring 3.x as a first-class experience, with 2.x as a “nice-to-have”.LicenceMITAuthorsdump_xmlwas written byJames Cheese.
Package: dumpy
DumpyDumpy is a binary parser with a declarative syntax. All you need to
do is telling the framework what your data look like, and let Dumpy
do the rest.Dumpy supports python versions >= 3.0.InstallingJust use pip or tools alike:pipinstalldumpyUsageTo parse a pre-defined binary structure, you need to define a class
for that structure. For example, a class forpascal strings:importdumpy.typesasdtclassPString(dict,metaclass=dt.DumpyMeta):__field_specs__=(dt.field('len',dt.UInt8,default=dt.count_of('data')),dt.field('data',dt.UInt8,count=dt.counted_by('len')),)s=PString()s['data']=b'\x01\x02\x03\x04'# The length field is calculated automatically.asserts['len']==4asserts.pack()==b'\x04\x01\x02\x03\x04's2=s.unpack(s.pack())asserts2['len']==4assertbytes(s2['data'])==b'\x01\x02\x03\x04'Seedemo/png_packer.pyfor a real-world format parser.Known IssuesThe type checking and conversion code in Dumpy is kind of naive,
It does not check element types in a sequence.Dumpy isvery slowat current stage. You may not want to use
it to parse network messages or huge data structures.
Package: dumpyara
dumpyaraRequires Python 3.8 or greaterInstallationpip3installdumpyaraInstructionspython3-mdumpyara<pathtoOTAfile>Supported formatsStep 1 - ArchivesAll the ones supported by shutil's extract_archiveStep 2 - What's inside the archiveA-only OTAs (Brotli and/or sdat compressed)A/B OTAsDynamic partitions (super.img)payload.binRaw images (e.g. Xiaomi fastboot packages)Sparse imagesStep 3 - Partition imagesAndroid boot images7z supported archives/imagesEROFS images using erofs-utilsCreditsAIK: osm0sisextract_android_ota_payload: cyxx and erfanoabdisdat2img: xpirtLicense#
# Copyright (C) 2022 Dumpyara Project
#
# SPDX-License-Identifier: GPL-3.0
#
Package: dumpyme
Command line package to get dumps of databasesInstallpip install dumpymeUsage1 - Create dumpyfiledumpy init
Creating dumpyfile...
dumpyfile in your home directory as ~/.dumpyfile.iniInitial dumpyfile:initdumpyfilehelp:inithelp2 - Add some project in dumpyfiledumpy add
Project name: my_project
Host of project: 187.111.44.100
User of host: root
Name of database: my_project_db
Database Type (e.g: mongodb, postgresql...): mongodb

Adding in dumpyfile:
        Project: my_project
        Host: 187.111.44.100
        Database: my_project_db
        Database Type: mongodbhelp:addhelp3 - List projects in dumpyfiledumpy projects
Projects:
========================================
-------> my_project
                host: 187.111.44.100
                db_name: my_project_db
                db mongodb
                user: root
-------> my_project2
                host: 192.191.190.89
                db_name: my_project2_db
                db: mongodb
                user: my_root
-------> project2
                host: 182.182.82.82
                db_name: project2_production
                db: mongodb
                user: riit
========================================or list name of projects:dumpy projects --name
Projects:
========================================
        my_project
        my_project2
        project2
========================================help:listhelp4 - Get dump of projectdumpy me my_projecthelp:dumpymehelp5 - Delete projects in dumpyfiledumpy delete my_project
Project removed sucessfullydeleteprojectDatabases supportedMongoDB
Package: dunderdecorators
By Andy StokelyPython decorator library that adds customizeable dunder methods to
decorated classes. This both decreases the amount of code that is
normally required to implement dunder methods, and also helps
reduce repitition when coding classes that use custom dunder
methods with the same or similar code. Right now, the following
dunder methods have corresponding dunder decorators:__iter__ (dunder_iter)
__setitem__ (dunder_setitem)
__getitem__ (dunder_getitem)
__missing__ (dunder_missing)
__repr__ (dunder_repr)If a dunder decorator is used without any parameters,
it defines the special method with respect to the class
object’s dictionary. However, the user is able to have the
special method defined with repsect to one of the class
object’s attributes by setting the attr parameter equal
to the name of the attribute. Dunder decorators can also
be used with classes that use __slots__, rather then a
dictionary to store object attributes, by setting the
slots parameter to True. For specific examples,
see the examples in the dunder_decorator.py doc-strings.
Package: dunderlab-timescaledbapp
TimeScaleDB AppTimeScaleDB App is a Django-based web application that provides an API for managing and querying time-series data. This application utilizes RealTimeDB, a time-series database built atop PostgreSQL, for efficient storage and analysis of time-series data. With custom pagination classes and viewsets, the TimeScaleDB App delivers a powerful and flexible way to interact with Source, Measure, Channel, and TimeSerie models.FeaturesAPI endpoints for managing and querying time-series dataCustom pagination classes for more efficient data retrievalCustom viewset mixin enabling creation of multiple objectsGrouping and aggregation of TimeSerie objects by channelComputation of various statistics for aggregated time-series dataGetting StartedInstallationClone the repository:gitclonehttps://github.com/dunderlab/python-django-timescaledbapp.gitcdpython-django-timescaledbappInstall the required dependencies:pipinstall-rrequirements.txtConfigurationConfigure your database settings in thesettings.pyfile:DATABASES={'default':{'ENGINE':'django.db.backends.postgresql','NAME':'your_database_name','USER':'your_database_user','PASSWORD':'your_database_password','HOST':'your_database_host','PORT':'your_database_port',}}Add the required apps toINSTALLED_APPSin thesettings.pyfile:INSTALLED_APPS=['django_extensions','rest_framework','dunderlab.django.timescaledbapp.apps.TimeScaleDBConfig',]Include the TimeScaleDB App URLs in your project'surls.pyfile:urlpatterns=[path("timescaledbapp/",include('dunderlab.django.timescaledbapp.urls')),]ExecutionApply the migrations:pythonmanage.pymigrateStart the development server:pythonmanage.pyrunserverYou can now access the TimeScaleDB App API athttp://localhost:8000/.API Endpoints/sources/: View or edit sources/measures/: View or edit measures/channels/: View or edit channels/timeseries/: View or edit time series with custom behavior for listing and paginating time series data/chunk/: Handle chunksContributingIf you'd like to contribute to TimeScaleDB App, please follow these steps:Fork the repositoryCreate a new branch for your feature or bugfixCommit your changes to your branchPush your branch to your forkSubmit a pull request with a detailed description of your changesWe appreciate your contributions and will review them as soon as possible.LicenseTimeScaleDB App is released under theMIT License.
Package: dunder-mifflin
'dunder'.__mifflin__This packages add__mifflin__to all python objects.import dunder_mifflin
'dunder'.__mifflin__()LicenseApache 2.0 - Seethe LICENSEfor more information.DependenciesThis package has the following dependenciesasciimatics, which handles reprinting over existing text on the screen (Apache)forbiddenfruit, which handles patching the built in types of Python (GPLv3)
Package: dune-alugrid
DUNE-ALUGridDUNE-ALUGridis aDistributed and Unified Numerics Environmentmodule which implements the DUNE grid interface
providing unstructured simplicial and cube grids.A detailed description of all the new features and some more
details concerning the inner workings of DUNE-ALUGrid can be found
in the paperAlkämper, Dedner, Klöfkorn, Nolte. The DUNE-ALUGrid Module, Archive of Numerical Software 4(1), 2016(bibtex).This is the paper we would ask everyone to cite when using DUNE-ALUGrid.Download via git:
git clonehttps://gitlab.dune-project.org/extensions/dune-alugrid.gitNew features and improvements includeConforming refinement for the 3D simplex gridAll grids are now parallel (i.e. 2D and 3D)Internal load balancing based on space filling curves
making DUNE-ALUGrid self contained also in parallelBindings for fully parallel partitioners usingZoltanComplete user control of the load balancingImproved memory footprintThe old ALUGrid version is deprecated and not supported anymore.
We have removed the special grid types e.g. ALUConformGrid, ALUSimplexGrid, and ALUCubeGrid.
Instead the type of the grid is always of the form
Dune::ALUGrid< dimgrid, dimworld, eltype, refinetype, communicator > (where communicator has a default value). The values for eltype are cube,simplex and for refinetype the values are conforming, nonconforming defined in the DUNE namespace.
The GRIDTYPE defines can still be used as before.The define HAVE_ALUGRID will not work correctly anymore. Since DUNE-ALUGrid is now
a dune module the correct name for the define is HAVE_DUNE_ALUGRID.LicenseThe DUNE-ALUGrid library, headers and test programs are free open-source software,
licensed under version 2 or later of the GNU General Public License.See the fileCOPYINGfor full copying permissions.InstallationFor installation instructions please see theDUNE website.git-917b6d8e0ff62732fc720ce8832bec15829a13e1
Package: duneanalytics
Dune AnalyticsUnofficial Python Library forDune AnalyticsThe library can be used to fetch the table data frompythonbackend.Disclaimer: Use at your own risk!It may not work for some/all urls.This library doesn't run the query, rather it fetches the query result from the backend.Charts Plotted:Here are some examples of charts plotted in Googlesheet after fetching the data.@balancerlabs / Balancer New/Old Traders@k06a / 1inch New/Old Users Per Day@Bancor / Bancor Unique Protected Wallets Over TimeInstallation:use pip to install:pip install duneanalyticsAuthentication:You need to haveusername&passwordforDune AnalyticsExample usage:from duneanalytics import DuneAnalytics

# initialize client
dune = DuneAnalytics('username', 'password')

# try to login
dune.login()

# fetch token
dune.fetch_auth_token()

# fetch query result id using query id
# query id for any query can be found from the url of the query:
# for example: 
# https://dune.com/queries/4494/8769 => 4494
# https://dune.com/queries/3705/7192 => 3705
# https://dune.com/queries/3751/7276 => 3751

result_id = dune.query_result_id(query_id=5508)

# fetch query result
data = dune.query_result(result_id)

For some queries above might not work specially if using v3. Try to use below in that case:
# for example: 
# https://dune.com/queries/1105079

result_id = dune.query_result_id_v3(query_id=1105079)

# fetch execution result
data = dune.get_execution_result(result_id)
Package: dune-analytics
Dune AnalyticsThis is a client which leverages the GraphQL interface supplied by Dune Analytics to run queries and load their results
into memory. This can be used to, for instance, pull data from DA into a Pandas DataFrame, for more complex analysis.Disclaimer:This package is not in any respect developed or endorsed by Dune Analytics, nor is the maintainer
associated with Dune Analytics in any way.[![pyversion][pyversion-image]][pyversion-url]
[![pypi][pypi-image]][pypi-url]Installation$ pip install --pre dune_analyticsUsageBasic Usagefromdune_analyticsimportDunedune=Dune(dune_username,dune_password)results=dune.query('''SELECT*FROM tornado_cash."eth_call_withdraw"LIMIT 100''')LicenseMIT License
Package: dune-analytics-fix
Dune AnalyticsThis is a client which leverages the GraphQL interface supplied by Dune Analytics to run queries and load their results
into memory. This can be used to, for instance, pull data from DA into a Pandas DataFrame, for more complex analysis.Disclaimer:This package is not in any respect developed or endorsed by Dune Analytics, nor is the maintainer
associated with Dune Analytics in any way.[![pyversion][pyversion-image]][pyversion-url]
[![pypi][pypi-image]][pypi-url]Tip me at0xD660994dfD06A7d33C779E77bBd7D71b3C9C6AeAInstallation$ pip install --pre dune_analytics_fixUsageBasic Usagefromdune_analyticsimportDunedune=Dune(dune_username,dune_password)results=dune.query('''SELECT*FROM tornado_cash."eth_call_withdraw"LIMIT 100''')LicenseMIT License
Package: duneapi
Dune Analytics APIA simple framework for interacting with Dune Analytics' unsupported API. The primary
class (DuneAPI) of this repo is adapted fromhttps://github.com/itzmestar/duneanalyticsat commit
bdccd5ba543a8f3679e2c81e18cee846af47bc52Attention ⚠️This package violates Dune'sTerms of Serviceand will soon be archived/deprecated in favour ofDune's officially supported API. Please visithttps://github.com/cowprotocol/dune-clientfor an analogous API client with similar interface.Import as Project DependencypipinstallduneapiThen you should be able to write python scripts similar to the following:Example UsageFill out your Dune credentials in the.envfile. The Dune user and password are
straight-forward login credentials to Dune Analytics. TheDUNE_QUERY_IDis an integer
id found in the URL of a query when saved in the Dune interface. This should be created
beforehand, but the same query id can be used everywhere throughout the program (as long
as it is owned by the account corresponding to the user credentials provided).You do not have to provide the query id as an environment variable, but doing so, will
allow you to use the same id for all fetching needs. For dashboard management, you will
need to have a unique id for each query.Execute Query and Fetch Results from Dunefromduneapi.apiimportDuneAPIfromduneapi.typesimportNetwork,QueryParameter,DuneRecord,DuneQueryfromduneapi.utilimportopen_querydeffetch_records(dune:DuneAPI)->list[DuneRecord]:sample_query=DuneQuery.from_environment(raw_sql=open_query("PATH_TO_SOME_SQL_FILE"),name="Sample Query",network=Network.MAINNET,parameters=[QueryParameter.number_type("IntParam",10),QueryParameter.text_type("TextParam","aba"),],)returndune.fetch(sample_query)if__name__=="__main__":dune_connection=DuneAPI.new_from_environment()records=fetch_records(dune_connection)print("First result:",records[0])Dashboard ManagementIt will help to get aquainted with the Dashboard configuration file found in./example/dashboard/my_dashboard.json. This
essentially requires filepath and query id to existing dune queries. Generally it is
expected that you will use the family of queries contained in an existing dashboard, but
there is no actual validation. Technically one could put all queries here and refresh
them with this tool.fromduneapi.dashboardimportDuneDashboarddashboard=DuneDashboard("./example/dashboard/_config.json")dashboard.update()print("Updated",dashboard)To fetch some sample ethereum block data, run the sample script as:python-mexample.fetchThis will result in the following console logs:got 10 records from last query
First record Record(
    string='0x255309e019abaf74bf2d58d4020547c89f875842abae1c874fb0d5ae8eac9859', 
    integer=14362177, 
    decimal=0.14785533, 
    time='2022-03-10T23:50:16+00:00'
)To fetch your own data follow the code outline
infetch.pyContributing and Local DevelopmentClone this Repo and install as follows.python3-mvenvvenvsource./env/bin/activate
pipinstall-rrequirements.txt
cp.env.sample.env<-----CopyyourDunecredentialshere!DeploymentBump the version number insetup.pyBuild the duneapi packagepython -m buildUpload to pypitwine upload dist/*