Saravanan666/pypi-org huggingface dataset:
Package: dbnomics-fetcher-ops
DBnomics fetcher opsManage DBnomics fetchers: list, configure and run pipelines.Installpipinstalldbnomics-fetcher-ops[cli]UsageConfigure a fetcherThe configure command needs write privileges. Create a GitLabpersonal access tokenhaving theapiscope, and pass it using the--gitlab-private-tokenoption or theGITLAB_PRIVATE_TOKENenvironment variable in~/.config/dbnomics/dbnomics-fetchers.env.dbnomics-fetchers-vconfigurescsmich--dry-run# If everything seems OK, remove the --dry-run flag:dbnomics-fetchers-vconfigurescsmichList fetchersdbnomics-fetchers-vlistRun fetcher pipelines# Replace PROVIDER_SLUG by the real value:dbnomics-fetchers-vrun--provider-slugPROVIDER_SLUG# To run a pipeline for each fetcher:dbnomics-fetchers-vlist--slug|xargs-I{}dbnomics-fetchers-vrun--provider-slug{}DevelopmentInstallPoetry.# git clone repo or forkcddbnomics-fetcher-ops
poetryinstall
cp.env.example.envRun commands with:poetryshell
dbnomics-fetchersCOMMAND
Package: dbnomics-fetcher-toolbox
dbnomics-fetcher-toolboxToolbox of functions and data types helping writing DBnomics fetchers.InstallationIf you're using this package, you may be working on a DBnomics fetcher.
In that case, just add thedbnomics-fetcher-toolboxpackage to your requirements file.Example usingpip-toolsin a Pythonvirtual environment.# Create a Python virtual environmentpython-mvenvmy-fetcher# Activate the virtual environmentsourcemy-fetcher/bin/activate# Install dependencies management toolpipinstallpip-tools# Declare dependencyechodbnomics-fetcher-toolbox>>requirements.in# Freeze dependenciespip-compile# Synchronize the virtual environment with frozen dependenciespip-syncNote: this workflow is quite complex due to the Python ecosystem which does not define a standard way to manage dependencies.
You can use another packaging tool likepoetry.DocumentationSeehttps://dbnomics-fetcher-toolbox.readthedocs.io/ContributingDocumentationTo contribute to the documentation, install:pip install --editable .[doc]
pip install sphinx-autobuildThen launch:sphinx-autobuild --watch dbnomics_fetcher_toolbox doc doc/_build/html
Package: dbnomics-solr
DBnomics SolrIndex DBnomics data into Apache Solr for full-text and faceted search.Requirements:a running instance ofApache Solr; at the time this documentation is written, we use the version 7.3.Seedbnomics-dockerto run a local DBnomics instance with Docker that includes a service for Apache Solr.ConfigurationEnvironment variables:DEBUG_PYSOLR: display pysolr DEBUG logging messages (cfhttps://github.com/django-haystack/pysolr)Index a providerReplacewtoby the real provider slug in the following command:dbnomics-solrindex-provider/path/to/wto-json-dataFull mode vs incremental modeWhen data is stored in a regular directory, the script always indexes all datasets and series of a provider. This is calledfull mode.When data is stored in a Git repository, the script runs by default inincremental mode: it indexes only the datasets modified since the last indexation.It is possible to force thefull modewith the--fulloption.Bare repositoriesThe script has an option--bare-repo-fallbackwhich tries to add.gitat the end of the storage dir name, if not found.Remove all data from a providerTo remove all the documents related to a provider (type:provider,type:datasetandtype:series):dbnomics-solr--debugdelete-provider--code<provider_code>
dbnomics-solr--debugdelete-provider--slug<provider_slug># Examples:dbnomics-solr--debugdelete-provider--codeWTO
dbnomics-solr--debugdelete-provider--slugwto
Package: db-obcuscate-id
django-db-obfuscate-id============A reusable Django app that psuedo encrypts your id at database level.What is this------------This is a small app that helps help you change your Autofield ids of your models into a "psuedo-encrypted" id sequenceThe encryption is done on database layer so you won't have to worry about complicating your queries or sketching your model managersInstallation------------To get the latest stable release from PyPi.. code-block:: bashpip install db-obcuscate-idTo get the latest commit from GitHub.. code-block:: bashpip install -e git+git://github.com/thisiscam/django-db-obfuscate-id.git#egg=db_obfuscateAdd ``db_obfuscate`` to your ``INSTALLED_APPS``.. code-block:: pythonINSTALLED_APPS = (...,'db_obfuscate',)Add full paths to your models to your ``settings.py``.. code-block:: pythonENCRYPT_ID_FOR_MODELS = ('django.contrib.auth.models.User',...)Alternatively, you can set a class attribute flag as follow.. code-block:: pythonclass MyEncrypedIdModel(models.Model):pseudo_encrypt_id = TrueNote: Currently, the app only supports postgres, and takes advantage of psuedo-encrypt scripts given here https://wiki.postgresql.org/wiki/Pseudo_encryptMore support to be added in the future, and feel free to PR since I'm not using other databases other than postgres now, and will only be updating this repo on a per-use basisUsage-----After setting up, you can conveniently call the management command.. code-block:: bashpython manage.py db --encrypt-all #this will encrypt all your models specified in settings.py and those flagged true for pseudo_encrypt_idpython manage.py db --encrypt-model myapp.models.SomeModelA myapp.models.SomeModelB #this will encrypt all the models specified in this command, use this if you want a one time settingAfter one of the two commands, your according models will be using a encryped sequence instead of the normal increasing sequence, note that items in the database won't be migrated to the new sequence, so you do have risk that the newly generated ids will collide onto the old existing ids! I'm still thinking of a good solution to this but feel free to PR if you have one. For now, the seemingly safest way is to use an entirely new database with this app and maybe migrate your data to the new databaseContribute----------If you want to contribute to this project, please perform the following steps.. code-block:: bash# Fork this repository# Clone your forkmkvirtualenv -p python2.7 db-obcuscate-idmake developgit co -b feature_branch master# Implement your feature and testsgit add . && git commitgit push -u origin feature_branch# Send us a pull request for your feature branchIn order to run the tests, simply execute ``tox``. This will install two newenvironments (for Django 1.6 and Django 1.7) and run the tests against bothenvironments.
Package: dbobjectcreator
Database Object Creator (D.O.C.)This library provides a method of creating database connector objects for quick and easy access to multiple
databases (both types and servers).DOC SetupThis library can be installed via Pypi.org[https://pypi.org/project/DbObjectCreator/] or locally:Runpip install Cythonbefore proceeding with either install. This package is required prior to installing this library.
This library can now be installed by runningpip install DbObjectCreatorDOC UsageImport the library into your project usingfrom DbObjectCreator import DbObjectCreatorCreate a new DbObject usingnew_db = DbObjectCreator.DbObject()new_db can now be used to call multiple methods against the database.This library supports both Windows and OSX architecture. If installing on OSX you will need FreeTDS installed.
Package: dbop
Info====`dbop 2018-08-10``Author: Zhao Mingming <471106585@qq.com>``Copyright: This module has been placed in the public domain.``version:0.0.0.1``version:0.0.0.2`- `use zprint`: print log stderr and stdoutClasses:- `dbop`: oprate the mysql dbFunctions:- `test()`: test functionHow To Use This Module======================.. image:: funny.gif:height: 100px:width: 100px:alt: funny cat picture:align: center1. example code:.. code:: pythonfrom dbop import dbop as dbop#pool = PooledDB(MySQLdb,1,host='122.152.206.246',user='oco',passwd='MyNewPass4!',db='task_zmm',port=3306,charset='utf8')#dbb0=dbop("122.152.206.246","oco","MyNewPass4!")#db0l=dbb0.run("show databases;")#print(db0l)dbb=dbop("172.23.250.51","root","20180712")dbl=dbb.run("show databases;")#print dbb.run("use test0720")#print dbb.run("desc test0720xml")xml_num=0jpg_num=0for dbname in dbl:if "fourgesture_detection_train" not in  dbname[0]:continue#print dbnamesqlstr="use %s;"%(dbname[0])dbb.run(sqlstr)sqlstr="select count(*) from %sxml;"%(dbname[0])rr=dbb.run(sqlstr)xml_num+=dbb.getnum(rr)xml_numtmp=dbb.getnum(rr)sqlstr="select count(*) from %simg"%(dbname[0])rr=dbb.run(sqlstr)jpg_num+=dbb.getnum(rr)jpg_numtmp=dbb.getnum(rr)if xml_numtmp>0:print dbname[0]print "xmltmp:%d,jpgtmp:%s"%(xml_numtmp,jpg_numtmp)print "xml:%d,jpg:%s"%(xml_num,jpg_num)print dbb.help("sql")#print len(dbl)#print type(list(dbl))#for db in dbl:#    print list(db)Refresh========
Package: db-operations
READMEdb_operationsis a small tool to simplify the daily operation of the database.Currently, for MySQL, sqlserver and Oracle databases:-It can query the fields, data volume and other information of the table in the database.-Query the tables in the database.-Gets the record of the table in the database.-It simplifies  the execution of SQL statement query, update and other operations.For PostgreSQL database:-The records in the table can be obtained.-The data can be put into the database in batches.-It simplifies the execution of SQL statement query, update and other operations.Installationdb_operations  depends on:Python(>=3.6)pandaspymysqlpymssqlcx_Oraclepsycopg2io使用指南db_operations是一个简化日常操作数据库的小工具。目前针对MySQL，SqlServer及Oracle数据库：可查询数据库中表的字段、数据量等信息。查询数据库中表的条目。获取数据库中表的记录。简化了执行SQL语句查询、更新等操作。针对postgresql数据库：可获取表中记录。可将数据批量放入数据库。简化了执行SQL语句查询、更新等操作。安装db_operations依赖于：Python(>=3.6)pandaspymysqlpymssqlcx_Oraclepsycopg2io
Package: dbops
dbops=====[![PyPI version](https://badge.fury.io/py/dbops.svg)](https://badge.fury.io/py/dbops)  [![Build Status](https://travis-ci.org/birm/dbops.svg?branch=master)](https://travis-ci.org/birm/dbops)A collection of tools for managing database servers.(http://www.rbirm.us/dbops/)# Python Tools: ### WhereLives ##quickly determine which host a database is on,or which databases are on a host.Command line:''python -m dbops.WhereLives (search key) (hostlist file)(permissions file) (server type) (reverse mode)''## DiskCheck ##get a report on which hosts are low on disk spaceUse full mode to get more detailed information about errors and successes, including md raidCommand line:''python -m dbops.DiskCheck (warn threshold, gb) (hostlist file) (username) (full mode)''Bash Tools/Interfaces:## wl.sh ##an interface for WhereLives, simplified further.## daud.sh ##a wrapper for common audit procedures using pt-toolkit.More Tools coming.
Package: dbot-metrics
DBot-server metricsThe metrics client for dbot-server.It supports collecting and transporting metrics for each dbot-server.Currently we have some inner output-plugins, and more, you can define your own ouput-plugins.Output-plugins can work at the same time, but we recommand only one.Also the input metric-plugin can be defined by yourself.Only you need to do is implementing the Plugin-Interface and configuring the filecollector.conf.Installationpip install dbot_metricsIf you used default collector.conf file from system, you should copy it to /etcDependenciesInstall leveldb if you want to use the recommand output-plugin leveldb-clientpip install leveldbInstall influxdb-python first if you want to use the inner output-plugin influxdb-client.$ sudo apt-get install python-influxdbGet more information, seehttps://github.com/influxdata/influxdb-python.Install tinydb if you want to use the inner output-plugin tinydb-client.pip install tinydbInstall unqlite if you want to use output-plugin unqlite-clientpip install unqliteDocumentationSeehttps://github.com/ATNIO/AI_market_plan/wiki/metric-heartbeat.InterfaceMetrics support query interface, it receive a json-type request parameter like this:{ 'range': { 'from': 1532023625, 'to': 1532025313 },
  'targets': [{'table':'student', 'type':'all', 'sentence':''},
              {'table':'teacher', 'type':'sql', 'sentence': 'select * from teacher'},
              {'table':'others', 'type':'columns', 'sentence': 'age|name|no'}]}and the response format is like this:[ {
    'name': 'influxdb',
    'content':[ {
                  'time':1532023688,
                  'tags':{'name':'John', 'No':10023},
                  'fields': {'age': 23, 'gender': 'male'} 
                },
                {
                  'time':1532023798,
                  'tags':{'name':'Tom', 'No':10024},
                  'fields': {'age': 25, 'gender': 'male'}
                }
              ]
   }
]Examplesfrom dbot_metrics import DBotMetricsCollector
# DBotApiMetric is a special metric in dbot_service_metric defined by yourself
from dbot_service_metric import DBotApiMetric

DBotMetricsCollector().Start("./collector.conf")
m = DBotApiMetric()
DBotMetricsCollector().RegisterMetrics(m)
m.EnableDetailRecord(False)

apiinfo = m.CallBegin("/api/dbot_server/api_call_test", "user")
# ... ... processing
m.CallEnd(apiinfo, 0)

DBotMetricsCollector().Stop()
Package: dbots.py
dbotsuseful library fordbots.onlineAPI DOCSLink to api docs:API DOCSInstallationpip install dbotsexampleServer Count Post :fromdbotsimportdbotsfromdiscord.extimportcommandsclient=commands.Bot(command_prefix="!")dbl=dbots(client,"token of dbots")@client.eventasyncdefon_ready():x=awaitdbl.serverCountPost()print(x)client.run("token")Search bot:fromdbotsimportdbotsclient=commands.Bot(command_prefix="!")dbl=dbots(client,"token of dbots")id=botida=dbl.search(id)print(a)All functions in api:1: serverCountPost()
2: search()
3: hasVoted()JOIN OUR DISCORD SERVER FOR SUPPORTDISCORD LINK
Package: dbotu
dbotu3is a new implementation of Sarah Preheim’sdbOTUalgorithm.  The
scope is narrower, the numerical comparisons are faster, and the interface is
more user-friendly.Read thedocumentationfor:a guide to getting started,an explanation of the algorithm, andthe API reference.You can also read our newpaperfor more technical details about the
algorithm.  The Alm Labwebsitealso has a short page with information.Installationdbotu3 is also oncondaand can be installed as follows:conda install -c cduvallet -c conda-forge dbotuForQIIME 2users, dbotu3 is also available as aplugin.ThePyPipackage is no longer update.RequirementsNumpy, SciPy,BioPython,PandasLevenshteinVersion history1.1: Corrected error where sequence IDs that could be read as integers would not be found in the table1.2: Python 2 compatibility, tox test framework, warnings for improperly-formatted sequence count tables1.2.1: Added setup requirements1.3.0: Improved OTU file header. Split the log file into a debug and progress log.1.4.0: Made an improvement to the Levenshtein-based genetic dissimilarity metric.1.4.1: Account for pandas API change toMultiIndex1.5.0: Added the restart and rep seq scripts1.5.1: New function for Qiime2 compatibility1.5.2: Move files around to make this a Python package (rather than dbotu.py script)1.5.3: Point to conda, rather than PyPi, installationTo-doTesting for the restart scriptsBetter coverage for unit testsCitationIf you use dbOTU3 in a scientific paper, we ask that you cite the
original dbOTU publication (Preheimet al.) or the dbOTU3 publication:Preheimet al. Distribution-Based Clustering: Using Ecology To Refine the
Operational Taxonomic Unit.Appl Environ Microbiol(2013) doi:10.1128/AEM.00342-13.Olesen SW, Duvallet C, and Alm EJ. dbOTU3: A new implementation of
distribution-based OTU calling.PLoS ONE(2017) doi:10.1371/journal.pone.0176335.AuthorIf you find a bug or have a request for a new feature, open anissue.Scott Olesen /swo at alum.mit.edu
Package: dbp
Docker-buildpackageDocker-buildpackage is a tool for building OpenSwitch Debian packages.SummaryDocker-buildpackage has two parts: a cli app (dbp) and a Docker image (opxhub/gbp)dbpmanages the Docker image and container lifecycledbpresolves the local build dependency graphdbprunsGit-buildpackagewiththis configurationto build packagesGit-buildpackage runsDebuildwiththis configurationto build packagesInstallpip3installdbpDocsGet started with thedocumentation.SupportFor bug reports and feature requests, file an issue onGitHub. For other support, drop by thedbpsupport channeland we'll help you out.
Package: dbpipe
dbpipeA lightweight and easy way to manage data pipelines.Getting Startedpip install dbpipeCreating a PipefromdbpipeimportPipepipe=Pipe(name='DW',sources=["AdSpend","SocialStats"],destination="DW",processfile="Test.py")pipeSaving a Pipepipe.save()Creating a SchedulefromdbpipeimportScheduleschedule=Schedule(frequency="Daily",start_time="8:00AM")scheduleCreating a JobfromdbpipeimportJobjob=Job('My Job',schedule=schedule,jobs=[pipe])jobSaving a Jobjob.save()Reading a Pipefromdbpipeimportread_pipepipe=read_pipe('pipes/DW.json')pipeReading a Jobfromdbpipeimportread_jobjob=read_job('jobs/My Job.json')job
Package: dbpl
deadbeef-playlistThis is a Python library for reading and writing playlists in the "DBPL" binary
format, created by my absolute favorite desktop audio playerDeaDBeeF.I created it to be able to edit paths to audio files in the playlist, although
it's possible to change any tracks properties.ExampleLet's imagine you have a large.dbplplaylist with hundreds of items, and you want
to change tracks paths from/data/musicto/Volumes/music. Write a script
namedscript.py:fromdbplimportPlaylistfromargparseimportArgumentParserif__name__=='__main__':parser=ArgumentParser()parser.add_argument('--input',required=True,help='input file')parser.add_argument('--output',required=True,help='output file')args=parser.parse_args()playlist=Playlist(args.input)fortinplaylist.tracks:uri=t.get_uri()uri=uri.replace('/data/music','/Volumes/music')t.set_uri(uri)playlist.save(args.output)Then use it:python3 ./script.py --input old.dbpl --output new.dbplLicenseBSD-2c
Package: dbplot
dbplotdbplot allows you to make calculations for plots inside databases.dbplot is powered byibisso its possible to target multiple databases that include:
Postgres, MySQL, Apache Impala, Apache Kudu, BigQueryand more, also everything that ibis will support
in the future such as Apache Spark.Installpip install dbplotDevelopment version:pip install git+git://github.com/danielfrg/dbplot.gitUsageSeenotebooksfor examples.importosimportibisimportdbplot# Connect to DBhost=os.environ.get("DBPLOT_TEST_POSTGRES_HOST","localhost")user=os.environ.get("DBPLOT_TEST_POSTGRES_USER","postgres")password=os.environ.get("DBPLOT_TEST_POSTGRES_PASSWORD")database=os.environ.get("DBPLOT_TEST_POSTGRES_DATABASE","nycflights13")con=ibis.postgres.connect(host=host,database=database,user=user,password=password)# Get a tableflights=con.table("flights")# Plot stuffdbplot.hist(flights,flights.dep_time,nbins=20)RoadmapAutomated testsMore plots such as raster plots, line charts and more :)NotesBased ondbplot for R.
Package: db-plugins
Database Models for ALeRCEThis lib offers database initialization procedures for MongoDB and PostgreSQL, using the ALeRCE core models.Installingdb_pluginsFor local development:db_pluginsinstallation is recommended withpoetry. You can clone the repository and thencd libs/db-plugins
poetry installAlternatively, you can use pipcd libs/db-plugins
pip install -e .As a local dependency:cd some_package
poetry add ../libs/db-pluginsAs a remote dependency
.. code-block:: consolepoetry add “https://github.com/alercebroker/db-plugins.git#subdirectory=libs/db-plugins”Database1. Database InitializationDatabase plugins will read the configuration you define in asettings.pyfile. This file should have aDB_CONFIGdictionary with the database connection parameters.Here is and example on the params used with the SQL plugin:DB_CONFIG:{"SQL":{"SQLALCHEMY_DATABASE_URL":"sqlite:///:memory:"}}After definingDB_CONFIGyou can now initialize your database. To do so, run theinitdbcommand as followsdbp initdb2. Migrations (SQL only)When changes to models are made you would want to update the database without creating it all again, or maybe you want to undo some changes and return to a previous state.The solution is to create migrations. Migrations keep track of your database changes and let you detect differences between your database and models and update the database accordingly.Migrations will be created by runningdbp make_migrations. This command will read your database credentials fromDB_CONFIGinsidesettings.py.Then, to update your database to latest changes executedbp migrate.Database plugins1. SQLInitialize databaseBefore you connect to your database, make sure you initialize it first.
To do that execute the following command from your step root folderdbp initdbWhen you run this command with an empty database it will create the
following schema:MigrationsMigrations keep track of database changes. To fully initialize the database with your
step configuration rundbpmake_migrationsdbpmigrateThis will set the head state for tracking changes on the database and also execute any migrations that might be present.The first commanddbp make_migrationswill create migration files according to differences from dbp models and your database.The seccond commanddbp migratewill execute the migrations and update your database.What migrations can and can’t detectMigrations will detect:Table additions, removals.Column additions, removals.Change of nullable status on columns.Basic changes in indexesMigrations can’t detect:Changes of table name. These will come out as an add/drop of two different tables, and should be hand-edited into a name change instead.Changes of column name. Like table name changes, these are detected as a column add/drop pair, which is not at all the same as a name change.
Package: dbpyman
Discord Mysql Management FrameworkThis package is used to dynamicallyadd new datato your existing Mysql tables.You're also able todeleteorviewdata.It'll return you an embed & a view for you to send back.Built WithHow to get startedInstall the packagepipinstalldbpymanCreate a new command for your discord Bot and create adatabaseobject inside that.database=Database(host='db_host',user='db_user',password='db_password',port=3306,database_name='db_name',charset='utf8mb4')Callcreate_db_managementand pass thedatabaseobject as the parameter and return yourembed&viewdatabase=Database(host='db_host',user='db_user',password='db_password',port=3306,database_name='db_name',charset='utf8mb4')embed,view=dbpyman.create_db_management(database)Use the returned embed & view and attach them to your messagedatabase=Database(host='db_host',user='db_user',password='db_password',port=3306,database_name='db_name',charset='utf8mb4')embed,view=dbpyman.create_db_management(database)awaitinteraction.response.send_message(embed=embed,view=view)Advanced usageThe framework features various methodes to further customize the UI & behavior of your data management process.Hide certain tables from the embedIn general the framework will attach all tables as buttons to the view.You can prevent that by usingdatabase=Database(...)database.set_table_hidden('MyTableName')database.set_table_hidden('MySecondTableName')embed,view=dbpyman.create_db_management(database)Set a default value for a columnThis will set adefault valuefor that specific column. Whenadding datato a table, you'll see thedefault valueas the input preview.
This will also allow you toskipthe insertion of those specific column input fields and simply use the assigneddefault valuewhen that input field is empty ( even if the table is marked asNOT NULL).database=Database(...)database.set_column_default_value('MyTableName','MyColumnName',0)database.set_column_default_value('MySecondTableName','MySecondColumnName','Banana')embed,view=dbpyman.create_db_management(database)ContributeFeel free to contribute to the project, it's open source.It's probably possible tonot onlysupport MySQL and work with inheritance to allow other database types.