Saravanan666/pypi-org huggingface dataset:
Package: pydax
PyDAX is a Python API that enables data consumers and distributors to easily use and share datasets, and establishes a
standard for exchanging data assets. It enables:a data scientist to have a simpler and more unified way to begin working with a wide range of datasets, anda data distributor to have a consistent, safe, and open source way to share datasets with interested communities.Quick Example>>>importpydax>>>pydax.list_all_datasets(){'claim_sentences_search':('1.0.2',),...,'wikitext103':('1.0.1',)}>>>pydax.load_dataset('wikitext103'){...}# Content of the datasetInstall the Package & its DependenciesTo install the latest version of PyDAX, run$pipinstallpydaxAlternatively, if you have downloaded the source, switch to the source directory (same directory as this README file,cd/path/to/pydax-source) and run$pipinstall-U.Quick StartImport the package and load a dataset. PyDAX will downloadWikiText-103dataset (version1.0.1) if it’s not already
downloaded, and then load it.importpydaxwikitext103_data=pydax.load_dataset('wikitext103')View available PyDAX datasets and their versions.>>>pydax.list_all_datasets(){'claim_sentences_search':('1.0.2',),...,'wikitext103':('1.0.1',)}To view your globally set configs for PyDAX, such as your default data directory, usepydax.get_config.>>>pydax.get_config()Config(DATADIR=PosixPath('dir/to/download/load/from'),...,DATASET_SCHEMA_FILE_URL='file/to/load/datasets/from')By default,pydax.load_datasetdownloads to and loads from~/.pydax/data/<dataset-name>/<dataset-version>/. To change the default data directory, usepydax.init.pydax.init(DATADIR='new/dir/to/download/load/from')Load a previously downloaded dataset usingpydax.load_dataset. With the new default data dir set, PyDAX now
searches for theGroningen Meaning Bankdataset (version1.0.2) innew/dir/to/download/load/from/gmb/1.0.2/.gmb_data=load_dataset('gmb',version='1.0.2',download=False)# assuming GMB dataset was already downloadedTo learn more about PyDAX, check outthe documentationand thetutorial.
Package: pyday
PyDayPython 工具一條龍v0.0.33宗旨PyDay 的宗旨，是提供統一接口和功能集，使代碼更簡潔和易於維護。Pyday 提供了一些有用的功能，例如䌓簡英轉換、解壓縮（想當年泰迪杯...）等。簡介框架由以下基本模組構成：DataReader (開發中)DataVis (未開發)Data2PDF 用於生成PDF (開發中)ToolChageLang 用於翻譯 (完工)dirTree 生成文件樹 (完工)unzip 解壓縮 (開發中)優勢有時庫可能會不支持顯示中文字體，需要自已再設定字體。而本項目使用了google開源字體 Noto Sans，全面支持中文字體。項目結構*
├── LICENSE 開源證明
├── requirements.txt
├── test 
├── script 有用腳本
├── README.md
├── setup.py 打包庫
├── .gitignore
├── .gitattributes
├── doc 
├── setup.cfg
└── src
    └── pyday使用方法安裝pipinstallpyday測試importpydayprint(pyday.__version__)線上資源查看pypi/pyday主頁查看pyday線上文檔查閱更多查看Change Log(更新日志)
Package: pyday-night
Pyday NightWhen's a better time to party than on Pyday Night?Project GoalPyday Night aims to provide methods for working with solar altitude angles, in particular for use in determining the location of the day-night terminator.
This module provides similar functionality to the pysolar.solar.get_altitude function, but in a much simpler package.AcknowledgementsThe code in this module is heavily based upon MATLAB code provided by Dr. Morris Cohen of Georgia Institute of Technology.
Package: pydb3
database操作(支持 mysql sqlite)使用教程下载pipinstallpydb3创建连接'''默认为sqlite'''db=Db()'''连接Sqlite'''db=Db(file_path='D:\\db\\test.sqlite')'''连接Mysql'''db=Db('mysql',host='localhost',port='3306',user='root',database='db',password='123456')创建表frompydb3.dbimportDbfrompydb3.modelimportInteger,VarChar,Model,Image,Date,DateTime'''定义模型'''classStudent(Model):name=VarChar(length=12,null=False,primary=False,comment="姓名")age=Integer(length=2,null=False,default=18,comment="年龄")score=Integer(length=11,null=False,default=10,comment="分数")mark=Integer(length=12,default=0,auto=True,null=False,primary=True,comment="标签")date=Date(length=12,default=0,null=False,auto=True,primary=False,comment='日期')image=Image(comment='图片')create_time=DateTime(default=None,null=False,auto=True,comment="时间")def__init__(self,name='test',age=None,mark=None,date=None,create_time=None,image=None):self.name=nameself.age=ageself.mark=markself.date=dateself.create_time=create_timeself.image=imageif__name__=='__main__':# 设置数据源db=Db()Student.set_db(db)s=Student()# 创建表s.create_table()# 获得所有学生students=Student.find()# 获得年龄为18岁的学生students=Student.find(age=18)# 保存到excelStudent.export_excel('test.xlsx',students)# 从网页下载图片s.image='url=图片链接'# 从数据库中下载图片到本地s.image='path=保持路径'# 将对象相应属性保持对数据库s.save()新增数据db=Db()datas=[None,'小明',12]'''相当于 insert into table values(NULL,'小明',12)'''db.insert('table',datas).execute()查询db=Db()'''相当于 select * from table where name=1 and age=1 limit 0,100'''db.select("table").where(name=1).and_(age=1)[0:100].execute()'''相当于 select * from table where name=1 and address like '%北京%'''db.select("table").where(name=1,age=12).like(address='北京').execute()'''相当于 select Count(*) from table'''db.select('table').count().execute()'''相当于 select name from table group by name having name='test' '''db.select('table','name').group_by('name').having(name='test').execute()'''相当于 select * from student join class on student.id=class.stu_id'''db.select('student').join('class',id='stu_id').execute()更新db=Db()'''相当于 update table  set name='李白' where name=1 and age=1 limit 0,100'''db.update("table",name='李白').where(name=1).and_(age=1)[0:100].execute()删除db=Db()'''相当于 delete from table where a=1'''db.delete('table').where(a=1).execute()
Package: pydba
A handy Python library for common database admin operations.RequirementsFeaturesBasic imports and class constructor usage.>>> from pydba import PostgresDB
>>> db = PostgresDB()
>>> db.available()
True
>>> db.names()
['postgres']Database creation and deletion.>>> db.create('foo')
>>> db.names()
['postgres', 'foo']
>>> db.rename('foo', 'bar')
>>> db.names()
['postgres', 'bar']Database backup and restore.>>> db.dump('bar', 'bar.backup')
>>> db.drop('bar')
>>> db.names()
['postgres']
>>> db.restore('bar', 'bar.backup')
>>> db.names()
['postgres', 'bar']Querying and shutting down database connections.>>> db.connections('postgres')
[Connection(datname='postgres', pid=13832, state='idle', query='', usename='drkjam', ...)]
>>> db.kill_connections('postgres')
>>> db.connections('postgres')
[]
Package: pydbbackups
PyDBBackupsA backup handlerInstallationpipinstallpydbbackupsCLI exampledbbackupsdump\--namebackup-example\--database-typepostgres\--hostlocalhost\--databasetest\--usernamepostgres\--port5432# 0__backup-example.sql Created !Code examplefrompydbbackupsimportPostgrescls=Postgres(database="test",host="localhost",port=5432,username="postgres",password="postgres")# In some cases dump method, return Noneoutput=cls.dump()# Return BytesIOprint(output.read().decode('utf-8'))@jbuendia1y <jbuendia1y@gmail.com>
Package: pydBeacon
PydBeaconPydBeacon is an open-source project that aims to provide Python decode/encode capabilities for Disney's dBeacon technology found in Disney parks. This library was originally written for developing technologies for communicating with the Starwars droid that can be purchased from Starwars Galaxy's Edge.InstallationPydBeacon can be installed usingpip, or by downloading the source code and running thesetup.pyscript.Installing with pipTo install PydBeacon usingpip, simply run:pip install pydbeaconInstalling from sourceTo install PydBeacon from source, follow these steps:Download the source code from theGitHub repository.Extract the contents of the archive to a directory of your choice.Navigate to the directory containing thesetup.pyscript.Run the following command:python setup.py installExamplesPydBeacon comes with a few examples to help users get started. These examples can be found under theexamplesdirectory in the repository root.LicensePydBeacon is released under the MIT license. See the LICENSE file for more details.
Package: pydbeamer
A Simple Python Toolbox for Generating Latex from Markdown txtInstallation:pipinstallpydbeamer-ihttps://www.pypi.org/simple/There are three ways to generating latex fileswrite the like-markdown file for generating a document, which is simplerwrite the objects for building a document, which is more flexiblecombine the obove two methodsV0.3.91. write the like-markdown file for generating a document, which is simpler结果示例http://python2022.cloud:8501参考md文件# 标题1, 副标题1# 标题2, 副标题2## Section1---当前Section第一页幻灯片```tealtitle:这是颜色为teal的一个Box1.# title为可选项, 一个井号表示最大号字体2.##b 注意开始和结束的标识, 两个井号表示次大号字体, b表示蓝色, 有b, r, k, p四种颜色可选--- 当前Section第二页幻灯片title: 这是一段代码
```python
def sum(a, b):
    return a + b## Section2
--- 第一页幻灯片
||
lratio: 0.48
```teal
title: 这是一个分栏显示
para: 表示一个段落, 与其他的区分
- 表示列表项1
- 表示接下来的列表项|title:这是右边栏-列表项1-列表项2||```python
filename = "demo.md" # 上面的markdown语句对应的文件
f = open(filename)
txt = f.read()
LatexFile(txt)2. write the objects for building a document, which is more flexiblefrompydbeamer.pydbeamerimport*title0=TitlePage("标题1","副标题1")title1=TitlePage("标题2","副标题2")#一般可以在各个字符串里输入需要的latex语句doc=Beamer(title0,title1)#可以有一个标题页或多个标题页s=Section("Section1",parent=doc)f=Frame("当前Section第一页幻灯片",parent=s)b=tealBox('这是颜色为teal的一个Box',parent=f)l1="第一行示例"l2="第二行示例"nl=NumList(*l(2),parent=b)f=Frame("当前Section第二页幻灯片",parent=s)b=bgreenBox('这是一段代码',parent=f)code='''def sum(a, b):return a + b'''pb=PythonBlock(code,"demo",head=False,parent=b)#####################################################s=Section("Section2",parent=doc)f=Frame("第一页幻灯片",parent=s)cols=Columns(parent=f,no=2)b=tealBox('这是一个分栏显示',parent=cols.left)Para("表示一个段落, 与其他的区分",parent=b)l1='表示列表项1'l2='表示接下来的列表项'nl=ItemList(*l(2),parent=b)b=tealBox('这是右边栏',parent=cols.right)i1="列表项1"i2="列表项2"il=ItemList(*i(2),parent=b)doc.build()#生成文档查看详细的函数和类的说明importpydbeamer.pydbeamerasPhelp(P)
Package: pydbg
pydbg 🐛pydbgis an implementation of the Rust2018 builtin debugging macrodbg.The purpose of this package is to provide a better and more effective workflow for
people who are "print debuggers".pip install pydbgfrom pydbg import dbgThe old way:a=2b=3print(f"a + b after instatiated ={a+b}")defsquare(x:int)->int:returnx*xprint(f"a squared with my function ={square(a)}")outputs:a + b after instatiated = 5
a squared with my function = 4Thenew(and better) waya=2b=3dbg(a+b)defsquare(x:int)->int:returnx*xdbg(square(a))outputs:[testfile.py:4] a+b = 5
[testfile.py:9] square(a) = 4This project is a work in progress and all feedback is appreciated.The next features that are planned are:Fancy Mode (display information about the whole callstack)Performance OptimizationsTyping informationCONTRIBUTORS:Thanks to everyone who has submitted an issue or thoughts on this project.
Special thanks to those who have submitted a PR to make this project better for everyone:besfahbodtqhesilva
Package: pydbhub
pydbhubA Python library for accessing and using SQLite databases onDBHub.io.This is an early stage work in progressWhat works nowRun read-only queries (eg SELECT statements) on databases, returning the results as JSONUpload and download your databasesList the databases in your accountList the tables, views, and indexes present in a databaseList the columns in a table, view or index, along with their detailsList the branches, releases, tags, and commits for a databaseGenerate diffs between two databases, or database revisionsDownload the database metadata (size, branches, commit list, etc.)Retrieve the web page URL of a databaseStill to doAnything else people suggest and seems like a good idea.
Please try it out, submits PRs to extend or fix things, and report any weirdness or bugs you encounter. :smile:Pre-requisitesPythonversion 3.7Older Python releases should NOT be OK. Newer Python releases should be OK, but only Python 3.7 has been tested (so far).A DBHub.io API keyThese can be generated in yourSettingspage, when logged in.InstallationpipinstallpydbhubFurther examplesSQL Query- Run a SQL query, return the results as JSONList databases- List the databases present in your accountList tables- List the tables present in a databaseList views- List the views present in a databaseList indexes- List the indexes present in a databaseRetrieve column details- Retrieve the details of columns in a tableList branches- List all branches of a databaseList releases- Display the releases for a databaseList tags- Display the tags for a databaseList commits- Display the commits for a databaseGenerate diff between two revisions- Figure out the differences between two databases or two versions of one databaseUpload database- Upload a new database fileDownload database- Download the complete database fileDelete database- Delete a databaseRetrieve metadata- Download the database metadata (size, branches, commit list, etc)Web page- Get the URL of the database file in the webUI.  eg. for web browsers
Package: pydbhub-bjh
pydbhubA Python library for accessing and using SQLite databases onDBHub.io.This is an early stage work in progressWhat works nowRun read-only queries (eg SELECT statements) on databases, returning the results as JSONUpload and download your databasesList the databases in your accountList the tables, views, and indexes present in a databaseList the columns in a table, view or index, along with their detailsList the branches, releases, tags, and commits for a databaseGenerate diffs between two databases, or database revisionsDownload the database metadata (size, branches, commit list, etc.)Retrieve the web page URL of a databaseStill to doAnything else people suggest and seems like a good idea.
Please try it out, submits PRs to extend or fix things, and report any weirdness or bugs you encounter. :smile:Pre-requisitesPythonversion 3.7Older Python releases should NOT be OK. Newer Python releases should be OK, but only Python 3.7 has been tested (so far).A DBHub.io API keyThese can be generated in yourSettingspage, when logged in.InstallationpipinstallpydbhubFurther examplesSQL Query- Run a SQL query, return the results as JSONList databases- List the databases present in your accountList tables- List the tables present in a databaseList views- List the views present in a databaseList indexes- List the indexes present in a databaseRetrieve column details- Retrieve the details of columns in a tableList branches- List all branches of a databaseList releases- Display the releases for a databaseList tags- Display the tags for a databaseList commits- Display the commits for a databaseGenerate diff between two revisions- Figure out the differences between two databases or two versions of one databaseUpload database- Upload a new database fileDownload database- Download the complete database fileDelete database- Delete a databaseRetrieve metadata- Download the database metadata (size, branches, commit list, etc)Web page- Get the URL of the database file in the webUI.  eg. for web browsers
Package: pydbisam
PyDBISAMPyDBISAM is a pure Python module to read and export data from DBISAM tables (from their.datfiles). The scope of PyDBISAM isnotto provide a full database framework but merely to provide the ability to read the table structure and the raw table data.DBISAM is an on-disk database with one file per table. The file format is proprietary. The basic structure isdocumented here.CLI UsagePyDBISAM includes a simple CLI that can be used to dump the table structure or export the data to various formats (e.g.: CSV).# pydbisam --dump-structure path/to/file.dat# pydbisam --dump-csv path/to/file.datCode UsageThe PyDBISAM class can be used for read-only access to the tables.frompydbisamimportPyDBISAMwithPyDBISAM("path/to/file.dat")asdb:print(", ".join(db.fields()))forrowindb.rows():print(", ".join(map(str,row)))Similar ProjectsDBISAM-to-JSONPython 2/3 script to convert DBISAM to JSON (limited support for various column types).
Package: pydbjson
PyDbJsonpydbjsonis a simple Python library for managing JSON-based databases.Table of ContentsInstallationDescriptionUsageInstallationYou can installpydbjsonusing pip:pipinstallpydbjsonDescriptionpydbjsonprovides a convenient way to interact with JSON-based databases in Python. It allows you to load data from a JSON file, insert, retrieve, delete, and find documents, and save the data back to the file.UsageImporting the libraryfrompydbjson.pydbjsonimportpydbjsonCreating an instance of pydbjsondb=pydbjson("database.json")Create an instance of thepydbjsonclass by providing the filename or path of the JSON database file.Inserting a documentdocument={"name":"John","age":30}key=db.insert_one(document)Insert a document into the database. Theinsert_onemethod returns the key of the inserted document.Find a documentdocument={"name":"John"}found_document=db.find_one(document)Find a document from the database based on the provided data.Deleting a documentdb.delete_one(found_document)Delete a document from the database based on the data.
Package: pydbk
Pydbk: A Python tool to extract .dbk archivesPydbk consists of a python modulepydbk.pyand a command line toolpydbk_cli.py.InstallationUsageWhat is a .dbk file?InstallationInstall using pip:pipinstallpydbkUsageExtract a .dbk archive:pydbkpath/to/file.dbkdestination/dirIf no destination is specified, pydbk will create a directory./extracted:pydbkpath/to/file.dbkGet help:pydbk--helpusage:pydbk_cli.py[-h][-v][-c][-d]source[destination]Pydbk:APythontooltoextract.dbkarchives.

positionalarguments:sourcesourcefiletoextractfilesfrom(.dbk)destinationdestinationdirectorytoextractfilesto

options:-h,--helpshowthishelpmessageandexit-v,--verboseverbosemode(printdetailedoutput)-c,--checkcheckif.dbkarchiveiscomplete-d,--dry-runrunprogramwithoutwritingfilestothedestinationWhat is a .dbk file?A DBK file is a mobile phone backup file created by Sony Ericsson PC Suite, a program used to manage Sony Ericsson mobile phones. It contains multiple Zip-compression files that store various phone information such as the names and phone numbers of contacts. DBK files are used to back up phone information in the event that the phone is lost or broken. (fileinfo.com)
Package: py-db-migrate
py-db-migrateCLI migration tool for python.Usage:$py-db-migrate[OPTIONS]COMMAND[ARGS]...Options:--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.Commands:create: Create a new sql file.down: Delete the latest migration file by using...init: Create an initial configuration file.start: Create an initial configuration file.up: Run the new migration files.py-db-migrate createCreate a new sql file.Usage:$py-db-migratecreate[OPTIONS]NAMEArguments:NAME: [required]Options:--help: Show this message and exit.py-db-migrate downDelete the latest migration file by using down file.Usage:$py-db-migratedown[OPTIONS]Options:--help: Show this message and exit.py-db-migrate initCreate an initial configuration file.You need to update this configuration file.Usage:$py-db-migrateinit[OPTIONS]Options:--help: Show this message and exit.py-db-migrate startCreate an initial configuration file.You need to update this configuration file.Usage:$py-db-migratestart[OPTIONS]Options:--help: Show this message and exit.py-db-migrate upRun the new migration files.Usage:$py-db-migrateup[OPTIONS]Options:--help: Show this message and exit.
Package: pydbml
DBML parser for PythonCompliant with DBMLv2.5.3syntaxPyDBML is a Python parser and builder forDBMLsyntax.The project was rewritten in May 2022, the new version 1.0.0 is not compatible with versions 0.x.x. See details inUpgrading to PyDBML 1.0.0.Docs:Class ReferenceCreating DBML schemaUpgrading to PyDBML 1.0.0PyDBML requires Python v3.8 or higherInstallationYou can install PyDBML using pip:pip3installpydbmlQuick startTo parse a DBML file, import thePyDBMLclass and initialize it with Path object>>>frompydbmlimportPyDBML>>>frompathlibimportPath>>>parsed=PyDBML(Path('test_schema.dbml'))or with file stream>>>withopen('test_schema.dbml')asf:...parsed=PyDBML(f)or with entire source string>>>withopen('test_schema.dbml')asf:...source=f.read()>>>parsed=PyDBML(source)>>>parsed<Database>The parser returns a Database object that is a container for the parsed DBML entities.You can access tables inside thetablesattribute:>>>fortableinparsed.tables:...print(table.name)...ordersorder_itemsproductsusersmerchantscountriesOr just by getting items by index or full table name:>>>parsed[1]<Table'public''order_items'>>>>parsed['public.countries']<Table'public''countries'>Other attributes are:refs— list of all references,enums— list of all enums,table_groups— list of all table groups,project— the Project object, if was defined.Generate SQL for your DBML Database by accessing thesqlproperty:>>>print(parsed.sql)# doctest:+ELLIPSISCREATETYPE"orders_status"ASENUM('created','running','done','failure',);<BLANKLINE>CREATETYPE"product status"ASENUM('Out of Stock','In Stock',);<BLANKLINE>CREATETABLE"orders"("id"intPRIMARYKEYAUTOINCREMENT,"user_id"intUNIQUENOTNULL,"status""orders_status","created_at"varchar);...Generate DBML for your Database by accessing thedbmlproperty:>>>parsed.project.items['author']='John Doe'>>>print(parsed.dbml)# doctest:+ELLIPSISProject"test_schema"{author:'John Doe'Note{'This schema is used for PyDBML doctest'}}<BLANKLINE>Enum"orders_status"{"created""running""done""failure"}<BLANKLINE>Enum"product status"{"Out of Stock""In Stock"}<BLANKLINE>Table"orders"{"id"int[pk,increment]"user_id"int[unique,notnull]"status""orders_status""created_at"varchar}<BLANKLINE>Table"order_items"{"order_id"int"product_id"int"quantity"int[default:1]}...
Package: pydbmodels
PYDBModels v0.0.11Database Models GeneratorGenerates Class models from database introspectionUsageimportpydbmodelsdefmain():pydbmodels.generate("postgres","postgresql://postgres:postgres1@localhost:9876/postgres")if__name__=="__main__":main()It Will create a_modelsfolder with all the sub-folders representing different schema. In each schema folder, there will be a file representing a table, and in each table-file, three models, thedatabase modelthemodel initializerand themodel updaterUser defined Enums are supported and they will be placed inuser_definedmodule as a string representation of the Postgres enum valuesGeneratorGenerated models arePydanticclasses, but eventually other generators that implementIGeneratorinterface can be added.LimitationsA lot. All supported types are the one that I actually need. I don't have a fully supported Database.
This project also depends fromdbmetafor database introspection that has its own limitations.