Saravanan666/pypi-org huggingface dataset:
Package: dblink
dblinkAimed for easily using query, insert, update and delete with an exist table, the filter query syntax likes Django's. You can find out the simple usage in the code below.IntroductionSuppose you have two tables:usersandaddressescreated by:CREATETABLEusers(idINTEGERNOTNULL,nameVARCHAR(50),fullnameVARCHAR(50),passwordVARCHAR(12),PRIMARYKEY(id));CREATETABLEaddresses(idINTEGERNOTNULL,email_addressVARCHARNOTNULL,user_idINTEGER,PRIMARYKEY(id),FOREIGNKEY(user_id)REFERENCESusers(id));You can link to exist table in database usingDatabase Urls.fromdblinkimportDatabase,Tabledb=Database(url='sqlite:///:memory:')user_table=Table('users',db)# ...db.close()withDatabase(url='postgresql://scott:tiger@localhost/mydatabase')asdb:address_table=Table('addresses',db)# ...Here is a simple example."""Suppose you have two table: users and addresses."""fromdblinkimportDatabase,TablewithDatabase('sqlite:///:memory:')asdb:table_user=Table('users',db)table_address=Table('addresses',db)# show descriptionprint(table_user.description)print(table_address.description)# chain query, you can call delete on the single table resulttable_user.query.filter(id=1).one_or_none()table_user.query.filter(id__gte=2)\.order_by('name')\.values_list('id','name')table_user.query.filter(id__in=[1,2,3])\.filter(name__startswith='Yu').all()table_user.query.order_by('-name')\.values_list('fullname',flat=True,distinct=True)table_user.query.distinct('name').values_list('name',flat=True)table_user.query.filter(id__in=[1,2,3]).delete()# join querytable_user.join(table_address)\.filter(id__lt=10000)\.filter(email_address__contains='gmail')\.filter(**{'addresses.id__gte':100})\.values_list('user_id','name','email_address',table_address.id,'users.fullname')# get or insertinstance,create=table_user.get_or_insert(id=1,name='jone')# single record operation.table_user.insert({'id':1,'name':'YuJun','password':'psw'})table_user.update({'id':1,'name':'skyduy','password':'psw'},unique_fields=['id'],update_fields=['name','password'])table_user.insert_or_update({'id':1,'name':'skyduy','password':'psw'},unique_fields=['id'],update_fields=['name','password'])table_user.delete({'id':1,'name':"I don't matter"},unique_fields=['id'])# bulk operationitems=[{'id':1,'name':'yujun','password':'haha'},{'id':2,'name':'skyduy','password':'aha'},]unique_fields=['id']update_fields=['name']table_user.bulk_insert(items)table_user.bulk_delete(items,unique_fields)table_user.bulk_update(items,unique_fields,update_fields)table_user.bulk_insert_or_update(items,unique_fields,update_fields)HistoryV0.3.0 (2019/09/08)Update requirements for security.Fix the installation bugs on windows.V0.2.1 (2018/05/09)Add encoding option.Improve package dependence.V0.2.0 (2018/03/24)Bug fix.Error closing cursor when operation on local sqlite db.Bugs in bulk_insert_or_update.Improve Error tips.V0.1.2 (2018/02/05)Initial release.
Package: dblmapi-py
DBLMAPIA python module for modding the game Dragon Ball Legends with its filesHow to Find your DB Legends filesthis requires android or a jailbroken iphone
so you will need to installZarchiverafter you do that you will follow this path:
/Android/data/com.bandainamcoen.dblegends_ww/files/
then you will want to find this file:
89bb4eb5637df3cd96c463a795005065after that you will put it in the folder you are using this module in and use one of the commands (see the help command by using: python dblmapi_cli.py -h)installnationpip install dblmapi-pyLatest UpdateV1.0.8Minor bug fixing
Package: db-load-generator
db-load-generatordb-load-generatoris a Python framework and toolbox for generating artificial database loads with as little code as necessary.
It uses Java and JDBC drivers to connect to the databases.Getting StartedNew todb-load-generator? Checkout our officialGetting Startedguide.RequirementsPython 3.9 or above.Java 8 or above.JDBC driver for your database.FeaturesTest connection to the database usingdbload testExecute a query usingdbload executeConfigure db-load-generator viacommand line argumentsenvironment variablesdefault config filedbload.jsoncustom path config filePrint current parsed configuration usingdbload show settingsUse decorators fromdbloadlibrary to create scenarios and queriesWrite annotated SQL queries in the.sqlfile and feed them usingdbload --sql myfile.sqlShow current parsed queries usingdbload show queriesRun any defined query usingdbload queryWrite full-fledged complex simulation scenarios usingdbloadlibraryShow current parsed scenarios usingdbload show scenariosRun any defined scenarios usingdbload scenarioUse predefined simulations for popular databases usingdbload --predefined <db-name> ACTIONRun db-load-generator as a background worker usingdramatiqensure there is a RabbitMQ running as a message brokerruns scenarios as service workersdbload workerenqueue executions into broker usingdbload send <scenario name or actor name>start beats/scheduler process usingdbload schedulerDevelopment & ContributionsContributions are welcome!
If you are interested in contributing to the project please read ourCode of Conduct.LicenseApache Version 2.0
Package: dblogger
dblogger========Provides two capabilities:1) a subclass of python logging.Handler that stores logs using kvlayer2) command line tools for searching through logs stored in kvlayerFormat======Logs are stored in kvlayer using the following format::key: UUID generated from the created field of the LogRecord class.:value: JSON object with the LogRecord attributes except args and msg.For more information have a look at Python LogRecord documentation.http://docs.python.org/2/library/logging.html#logrecord-attributesUsage=====Python------This is a small app in Python, an example of how to use dblogger.import yamlimport loggingimport kvlayerfrom dblogger import DatabaseLogHandler, DBLoggerQueryconfig = yaml.load(open("/myapp/config.yaml"))client = kvlayer.client(config)namespace = "myapp"logger = logging.getLogger('mymodule')logger.setLevel(logging.DEBUG)dbhandler = DatabaseLogHandler(client, namespace)logger.addHandler(dbhandler)logger.warn("this is a demo msg")Command Line------------After installing the python package, this command line entry pointwill be available:dblogger -c myconfig.yaml appname namespace loglevel filter:filter: could be a regex to be applied to the log message or a field=regex pair,specifying the log record field and the regex to be applied to that field.Testing=======make testBuilding========To build the module:makeTo create an egg package:make build_eggTo create RPM packages:make build_rpmIf you want to publish the package:make registerand to clean everything:make cleanTODO====- test rpm packge in a RPM platform.- search from command line.- 'tail -f' behavior for the log search interface.
Package: db-logger
DB Logger is a simple Django app to save logs to database.Quick startAdd “db_logger” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'db_logger',
]Runpython manage.py migrateto create the polls models.Add handler and logger to LOGGING setting like this:LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'verbose': {
            'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
            'datefmt': "%d/%b/%Y %H:%M:%S"
        },
        'standard': {
            'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
        },
        'simple': {
            'format': '%(levelname)s %(message)s'
        },
    },
    'handlers': {
        'db_log': {
            'level': 'DEBUG',
            'class': 'db_logger.handlers.DbLogHandler'
        },
    },
    'loggers': {
        '': {
            'handlers': ['db_log'],
            'level': 'DEBUG',
        }
    }
}Visit /admin/db_logger/dblogentry/ to check the logs.
Package: dblp
# dblp-pubA scraper that downloads search results from DBLP. You can search for any list of keywords.Scraping dblp is allowed by them and they even offer an API for it. The API, however, is restricted to the search for authors.This is why I wrote this scraper, which allows you to also search for publications.## InstallationJust type "pip install dblp-pub" in your terminal and it will get installed. You can also clone this repository and type "python setup.py install" after switching to the downloaded folder.## How to use it?After importing it, you can use the search()-function to search in dblp for any array of key words. The result will be a pandas DataFrame.## ExampleImagine you are interested research in Collaborative Writing and want to evaluate which conferences people who write about it publish to.With this library you get a table for every search request, so you can easily compare results. Below is an example for one of these tablesand the lookup for the search phrase "Collaborative Writing".```pythonimport dblp-pub as dblpresults = dblp.search(["Collaborative Writing"])results.head()```The Code above yields the following results:|Authors                 | Link                 | Title                            |Type         | Where    |Year ||------------------------|:--------------------:|:--------------------------------:|:-----------:|:--------:|----:|| [Lekha Limbu, Lina M...| http://dx.doi.org/...|How do learners experience join...|article      |Compute...|2015 || [Sebastian Gehrmann,...| http://dx.acm.org/...|Deploying AI Methods to Support...|inproceedings|CHI Ext...|2015 || [Dakuo Wang, Judith ...| http://dx.acm.org/...|DocuViz: Visualizing Collaborat...|inproceedings|CHI       |2015 || [Oluwabunmi Adewoyin...| http://dx.doi.org/...|Exploiting the Use of Wikis to ...|inproceedings|CRIWG     |2015 || [Menghui Li, Young M...| http://dx.doi.org/...|An Exploration of Mobile Collab...|inproceedings|HCI (24...|2015 |Now imagine, you want to look for the papers with "AI" in the title. You can easily do that using pandas:```pythonresults[results['Title'].str.contains("AI")]```Given the search query above, this yield one paper with the following link: http://doi.acm.org/10.1145/2702613.2732705## LicenceThis code is published under the MIT licence. Feel free to improve and redistribute my code. I hope I made your life a little bit easier.
Package: dblpct
dblpctThe % in the string given as the first argument is doubled and output to stdout.It's my hobby CLI tool.install# pip install dblpcthow to useex1)# dblpct http://example.com/%E3%83%86%E3%82%B9%E3%83%88URL
http://example.com/%%E3%%83%%86%%E3%%82%%B9%%E3%%83%%88URLex2)# dblpct -r http://example.com/%%E3%%83%%86%%E3%%82%%B9%%E3%%83%%88URL
http://example.com/%E3%83%86%E3%82%B9%E3%83%88URL-rmeansReverse operationof this tool.ex3)# dblpct -r $(dblpct %%)
%%

 # dblpct $(dblpct -r %%)
%%

 # dblpct $(dblpct %%)
%%%%%%%%CautionSpecial characters in bash, etc. are not escaped.They will be interpreted as a command line string when entered.ex1)# dblpct FJWRF%)faw
-bash: syntax error near unexpected token `)'If you want to enter special characters,enclose them in quotes or escape them appropriately.ex2)# dblpct 'fahj4(jfawe&%%fawle$kf'
fahj4(jfawe&%%%%fawle$kf
Package: dblp-sax-parser
DBLP SAX ParserDBLP SAX ParserWhat is it?Context and PurposeUsageDBLP MethodsLicenseReferencesWhat is it?A parsing package using theSimple API for XML (SAX).There are a total of 10 elements: "article", "inproceedings", "proceedings", "book", "incollection", "phdthesis", "mastersthesis", "www", "person", "data".Across the elements, these are the feature types available: "address", "author", "booktitle","cdrom", "chapter", "cite", "crossref", "editor", "ee", "isbn", "journal", "month", "note", "number", "pages", "publisher", "publnr", "school", "series", "title", "url", "volume", "year".Featuresdownload dblp files from the dblp website directlyparse throught the dblp xml file into a dataframe, exported with either csv or pickle format.Future features for considerationadd more methods to parse data from a specific attribute. E.g. only for years in 2016select which elements or features to be included/excludedContext and PurposeI created this package when working on a project as part of a course module. The aim of this package is to provide a quick way to parse DBLP elements directly, with the contents exported as a csv file for further preprocessing based on individual's use case.Installationpip install dblp-sax-parser

# import package
from dblp_parser import DBLP_Parser as dpUsageFirst step to using this parser is to instantiate the dblp_parser# Instantiate the dblp class 
dblp = dp()You can also DBLP_Parser to download the dblp data assets from the dblp website# download latest data sets from dblp website
dblp.download_latest_dump()Parsing the xml filefilename = 'dblp.xml'

# execute the parser from the dblp class
parser, handler = dblp.execute_parser(filename=<filename>)

# you can use the handler to convert the handler output to dataframe
handler.to_df()

# the dataframe can be persisted as a pickle file or exported as csv file
handler.to_csv() # export to csv
handler.save() # persist as pickleDBLP MethodsclassDBLP_ParserThis is the main class to be instantiated when before using the parserclassDBLP_Parser.download_latest_dumpBegins downloading the latest dblp files from thedblp website. If the url location where files are hosted is changed/incorrect, a separate url can be used instead.This downloads the dblp.dtdand.xml.gzfiles, and decompress the.gzfile into.xml.dtd_url[str]: url location of the.dtdfile to be downloaded from.xml_zip_url [str]: url of the.xml.tzfile to be downloaded from.xml_zip_filename [str]: specify filename of the downloaded.xml.gzfile.xml_filename [str]: specify filename of the.xmlfile that is decompressed.classDBLP_Parser.execute_parserThis executes the underlying SAX parser, calling the xml.sax.handler.ContentHandlerfilename [str]:  path and name of XML file to be parsed. If **download_latest_dump() was used, the file to be parsed will be"dblp.xml".LicenseThis code is published under the MIT licence.ReferencesThere are two main references that helped contributed to writing this package. Instantiating the outer dblp class to download dblp materials directly came from fromangelosalatino. Some component of the SAX parsing logic itself was borrowed fromhibernator11.
Package: dblpy
A simple API wrapper fortop.ggwritten in PythonInstallationInstall via pip (recommended)pipinstalldblpyInstall from sourcepipinstallgit+https://github.com/top-gg/DBL-Python-LibraryDocumentationDocumentation can be foundhereFeaturesPOST server countGET bot info, server count, upvote infoGET all botsGET user infoGET widgets (large and small) including custom ones. Seetop.gg/api/docsfor more info.GET weekend statusBuilt-in webhook to help you handle top.gg upvotesAutomated server count postingSearching for bots via the APIAdditional informationBefore using the webhook provided by this library, make sure that you have specified port open.webhook_portmust be between 1024 and 49151.Below examples are to be used as discord.py cogs. If you need help adding them to your bot, feel free to ask in the#developmentchannel in ourDiscord server.ExamplesPosting server count manually:fromdiscord.extimportcommands,tasksimportdblclassTopGG(commands.Cog):"""
    This example uses tasks provided by discord.ext to create a task that posts guild count to top.gg every 30 minutes.
    """def__init__(self,bot):self.bot=botself.token='dbl_token'# set this to your DBL tokenself.dblpy=dbl.DBLClient(self.bot,self.token)self.update_stats.start()defcog_unload(self):self.update_stats.cancel()@tasks.loop(minutes=30)asyncdefupdate_stats(self):"""This function runs every 30 minutes to automatically update your server count."""awaitself.bot.wait_until_ready()try:server_count=len(self.bot.guilds)awaitself.dblpy.post_guild_count(server_count)print('Posted server count ({})'.format(server_count))exceptExceptionase:print('Failed to post server count\n{}:{}'.format(type(e).__name__,e))defsetup(bot):bot.add_cog(TopGG(bot))Using webhook:fromdiscord.extimportcommandsimportdblclassTopGG(commands.Cog):"""
    This example uses dblpy's webhook system.
    In order to run the webhook, at least webhook_port must be specified (number between 1024 and 49151).
    """def__init__(self,bot):self.bot=botself.token='dbl_token'# set this to your DBL tokenself.dblpy=dbl.DBLClient(self.bot,self.token,webhook_path='/dblwebhook',webhook_auth='password',webhook_port=5000)@commands.Cog.listener()asyncdefon_dbl_vote(self,data):"""An event that is called whenever someone votes for the bot on top.gg."""print("Received an upvote:","\n",data,sep="")@commands.Cog.listener()asyncdefon_dbl_test(self,data):"""An event that is called whenever someone tests the webhook system for your bot on top.gg."""print("Received a test upvote:","\n",data,sep="")defsetup(bot):bot.add_cog(TopGG(bot))With autopost:fromdiscord.extimportcommandsimportdblclassTopGG(commands.Cog):"""
    This example uses dblpy's autopost feature to post guild count to top.gg every 30 minutes.
    """def__init__(self,bot):self.bot=botself.token='dbl_token'# set this to your DBL tokenself.dblpy=dbl.DBLClient(self.bot,self.token,autopost=True)# Autopost will post your guild count every 30 minutes@commands.Cog.listener()asyncdefon_guild_post(self):print("Server count posted successfully")defsetup(bot):bot.add_cog(TopGG(bot))
Package: dblpy-lib
dblpyDblpyis a simple wrapper library for the dblp.org search api.fromdblpyimportget_authors,get_venues,get_publicationsauthors=get_authors(q='Donald Knuth')forainauthors:print(a)fornina.notes:print(f'|{n}')publications=get_publications(q='gps trajectory',max_results=5)forpinpublications:print(p)venues=get_venues(q='Berlin')forvinvenues:print(v)Installing Dblpy$pip3 install dblpy-libUsing the LibraryThe library offers functions to query dblp.org for publications, authors, and venues. They return lists of the respective objects.For some publications, authors, or venues, not all possible attributes are available. In these cases, they are set to an empty string.You can limit the number of results with the argumentmax_results=X. This is set by default to 100.Authorsauthors=get_authors(q='Donald Knuth',max_results=10)author=authors[0]author.name# Name of Authorauthor.notes# List of affiliations and awards linked to authorauthor.notes[0].type# Type of affiliationauthor.notes[0].text# Name of affiliationauthor.aliases# List of other names of same authorauthor.url# Link to dblp page of authorPublicationspublications=get_publications(q='gps trajectory',max_results=5)publ=publications[0]publ.authors# List of author namespubl.title# Name of publicationpubl.venue# Venue of publicationpubl.volume# Volume in which publication was publishedpubl.number# Number of publication volumepubl.pages# Pages of publicationpubl.publisher# Publisher of publicationpubl.year# Year when publication was releasedpubl.type# Type of publicationpubl.access# Type of accesspubl.key# Key of publicationpubl.doi# Doi of publicationpubl.ee# Link to electronic edition of publicationpubl.url# Link to dblp page of publicationVenuesvenues=get_venues(q='Berlin',max_results=5)venue=venues[0]venue.name# Name of venuevenue.acronym# Acronym of venuevenue.type# Type of venuevenue.url# Link to dblp page of venue
Package: dblstats
An easy to use asyncdblstatistics.comAPI wrapper.README informationCommand executionWhen commands that need to be executed are shown in this documentation,
optional command will be surrounded by brackets.System specific command executionSince python has a different command call on Linus and Windows we
specify both in the documentation.documentation: (py -3 | python3) command
windows: py -3 command
linux: python3 commandInstallingTo install the library you can just run the following pip command.(py -3 -m | python3 -m) pip install dblstatsExecuting example scriptsRequirementsThe example scripts might be discord bots. If so execute the following
command to install the dependencies.(py -3 -m | python3 -m) pip install utilsxRunningTo execute the example scripts that are located inexamplesjust
execute the following command.(py -3 | python3) script_name.pyLinksDocumentationdblstatistics.com Discord Severdblstatistics.com
documentation
Package: dblue-mlwatch
Dblue MLWatchReal-time Machine Learning model monitoring with Dblue MLWatchFot getting started with MLWatch go tohttps://mlwatch.dblue.aiStepsDblue MLWatch AccountTo start monitoring your machine learning models with Dblue MLWatch you need a dblue.ai account.
If you don't already have one, pleasecontact supportInstallationpipinstalldblue-mlwatchInitializationfromdblue_mlwatchimportMLWatchwatcher=MLWatch(account='account id received from dblue',api_key='API Key received from dblue',model_id="Model id received from dblue",model_version="Model version specified on dblue")Known issues:Failed to install psutil on mac# Jump to the correct foldercd/Library/Developer/CommandLineTools/SDKs# Move the new SDK out of the waysudomvMacOSX10.15.sdkMacOSX10.15.sdk.1# Link the newer SDK to the old onesudoln-sMacOSX10.14.sdkMacOSX10.15.sdk# Install psutil or the package which depends on itpipinstall-Upsutil# Remove the temporary symlink we made in step 3sudormMacOSX10.15.sdk# Restore to the former statesudomvMacOSX10.15.sdk.1MacOSX10.15.sdk
Package: dbl-us-to
DiscordBotsList.pyAn API wrapper for discordbotslist.us.to written in PythonInstallationInstall via pippip install dbl-us-toFeaturesGET bot likes and check if user has likedGET bot commentsGET bot statsPOST your own bot statsMethodsIn the following I'll be explaining all methods this library offers.
Notice that you have to await these since they are async.DBLClient.get_likes(bot_id)ArgumentsParameterTypeDescriptionbot_idintThe bot id to get the likes of. Defaults to your own bot id.ReturnsList ofLikeobjects. These have the following attributes.AttributesTypeDescriptionbot_idintThe bot id the like is associated withauthordiscord.UserUser object if cached elseNone. Useauthor_idas fallback.author_idintThe id of the author who likeddatedatetime.datimeWhen the like was createdDBLClient.get_comments(bot_id)ArgumentsParameterTypeDescriptionbot_idintThe bot id to get the comments of. Defaults to your own bot id.ReturnsList ofCommentobjects. These have the following attributes.AttributesTypeDescriptionidstrUnique id of the commentbot_idintThe bot id the comment is associated withauthordiscord.UserUser object if cached elseNone. Useauthor_idas fallback.author_idintThe id of the author who likedcontentstrThe content of the commentdatedatetime.datimeWhen the comment was createdDBLClient.get_stats(bot_id)ArgumentsParameterTypeDescriptionbot_idintThe bot id to get the stats of. Defaults to your own bot id.ReturnsStatsobject. These have the following attributes.AttributesTypeDescriptionbot_idintThe bot id the stats are associated withguild_countintThe amount of guilds the bot is onchannel_countintThe amount of all guild channels the bot can seeuser_countintThe amount of all users the bot can seedatedatetime.datimeWhen the stats was last updatedDBLClient.post_stats()Updates your bots stats on DiscordBotsList.us.toExampleimportdiscordfromdbl_us_toimportDBLClientintents=discord.Intents.default()intents.members=Truebot=discord.Client(intents=intents)api_key="DiscordBotsList API Key"dbl=DBLClient(bot,api_key)@bot.eventasyncdefon_ready():likes=dbl.get_likes()forlikeinlikes:print(like.author)bot.run("bot token")
Package: dbman
dbman is a tool for generating data and managing relational databases.InstallingInstall and update usingpip:pipinstalldbmanA Simple Exampledbmanadmin--init-db--load-sample-datadbmanshowaccount-m11-2019--all-vLinksWebsite:https://pypi.org/project/dbman/Documentation:https://brianfarrell.gitlab.io/dbmanLicense:https://www.gnu.org/licenses/agpl.htmlReleases:https://pypi.org/project/dbman/Code:https://gitlab.com/brianfarrell/dbmanIssue tracker:Test status:Test coverage: