Saravanan666/pypi-org huggingface dataset:
Package: jd-assistant
JD-Assistant主要功能登陆京东商城（www.jd.com）手机扫码登录保存/加载登录cookies (可验证cookies是否过期)商品查询操作提供完整的地址⇔ID对应关系根据商品ID和地址ID查询库存根据商品ID查询价格购物车操作清空/添加购物车 (无货商品也可以加入购物车，预约商品无法加入)获取购物车商品详情订单操作获取订单结算页面信息 (商品详情, 应付总额, 收货地址, 收货人等)提交订单（使用默认地址）直接提交有货提交定时提交查询订单 (可选择只显示未付款订单)其他商品预约用户信息查询运行环境Python 3第三方库RequestsBeautiful SoupPyCryptodome安装：pip install jd-assistant或者pip install -r requirements.txt初始化from jd_assistant import Assistant
if __name__ == '__main__':
asst = Assistant()  # 初始化
asst.login_by_QRcode()  # 扫码登陆
asst.get_order_vercode()    #获取本地服务订单验证码及状态直接提交订单示例from jd_assistant import Assistant

if __name__ == '__main__':
    asst = Assistant()      # 初始化
    asst.login_by_QRcode()  # 扫码登陆
    asst.clear_cart()       # 清空购物车（可选）
    asst.add_item_to_cart(sku_ids='100001324422')  # 根据商品id添加购物车（可选）
    asst.submit_order()     # 直接提交订单定时提交订单示例（常用）from jd_assistant import Assistant

if __name__ == '__main__':
    asst = Assistant()      # 初始化
    asst.login_by_QRcode()  # 扫码登陆
    asst.clear_cart()       # 清空购物车（可选）
    asst.add_item_to_cart(sku_ids='100001324422')  # 根据商品id添加购物车（可选）
    asst.submit_order_by_time(buy_time='2020-02-16 01:17:59.500', retry=4, interval=5)  # 定时提交订单有货提交订单示例from jd_assistant import Assistant

if __name__ == '__main__':
    sku_ids = '100001324422:1'  # 商品id
    area = '1_72_4211'          # 区域id
    asst = Assistant()          # 初始化
    asst.login_by_QRcode()      # 扫码登陆
    asst.buy_item_in_stock(sku_ids=sku_ids, area=area, wait_all=False, stock_interval=5)
	asst.buy_item_in_stock() 方法执行执行流程：程序主入口在main.py👉使用教程请参看Wiki
Package: jdatetime
jdatetime isJalaliimplementation of Python’s datetime moduleStatusInstallpip install jdatetimeDocumentsThis module exactly follows Python Standard datetime module’s methodshttp://docs.python.org/release/3.7.1/library/datetime.htmlAlso these methods are added to jdatetime.date and jdatetime.datetime :fromgregorian(**kw)Convertgregoriantojalaliandreturnjdatetime.datejdatetime.date.fromgregorian(day=X,month=X,year=X)jdatetime.date.fromgregorian(date=datetime.date)jdatetime.datetime.fromgregorian(datetime=datetime.datetime)togregorian(self)Convertcurrentjalalidatetogregorianandreturndatetime.dateisleap(self)checkifyearisleapyearalgortimisbasedonhttp://en.wikipedia.org/wiki/Leap_yearExample>>>importjdatetime>>>jdatetime.datetime.now()jdatetime.datetime(1394,12,4,8,37,31,855729)>>>jdatetime.date.today()jdatetime.date(1394,12,4)LocaleIn order to get the date string in farsi you need to set the locale to fa_IR. The locale
could be specified explicitly upon instantiation ofdate/datetimeinstances, or by
setting a default locale.Instance locales isnamed argument only:importjdatetimefa_date=jdatetime.date(1397,4,23,locale='fa_IR')fa_datetime=jdatetime.datetime(1397,4,23,11,40,30,locale='fa_IR')dateanddatetimeinstances provide the methodaslocale()to return a clone of the instance
with the same timestamp, in a different locale.Default LocaleIt’s possible to set the default locale, so all new instances created afterwards would use
the desired locale, unless explicitly specified otherwise.>>>importlocale>>>importjdatetime>>jdatetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S")u'Wed, 08 Ord 1395 20:47:32'>>>locale.setlocale(locale.LC_ALL,"fa_IR")'fa_IR'>>>jdatetime.datetime.now().strftime("%a, %d %b %Y %H:%M:%S")u'\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647, 08 \u0627\u0631\u062f\u06cc\u0628\u0647\u0634\u062a 1395 20:47:56'If your requirements demand to support different locales withing the same process,
you could set the default locale per thread. Newdateanddatetimeinstances
created in each thread, will use the specified locale by default.
This supports both Python threads, and greenlets.importjdatetimejdatetime.set_locale('fa_IR')jdatetime.datetime.now().strftime('%A %B')# u'\u062f\u0648\u0634\u0646\u0628\u0647 \u062e\u0631\u062f\u0627\u062f'DevelopmentYou can contribute to this project forking it from GitHub and sending pull requests.Firstforktherepositoryand then clone it:$gitclonegit@github.com:<you>/python-jalali.gitBefore committing, you can run all the above tests against all supported Python versions with tox.
You need to install tox first:$pipinstalltoxAnd then you can run all tests:$toxIf you wish to limit the testing to specific Python version, you can parametrize the tox run:$tox-epy39Release StepsBump the version insetup.pyandjdatetime/__init__.py. We are using Semantic Versioning.Add release notes in CHANGELOG.mdCommit and push the changes. Create a PRAfter the PR is merged, create a release with a tag name likev<version>Github Action creates the package and deploys it to pypi.
Package: jdb2
介绍jsonDB2是一个基于内存的键值对数据库(非关系型数据库)安装$pipinstalljdb2或者$gitclonehttps://github.com/spdir/jsonDB2.git
$cdjsonDB2
$pythonsetup.pyinstall使用初始化实例importjdb2#初始化一个空的DBn=jdb2.NoSql()#将原来的数据导入到数据库,并配置自动持久化n=jdb2.NoSql(dump=True,nosqlFile='filePath',dumpTime=10)# dump: 启动持久化,并导入已有数据, 默认: False# nosqlFile: 持久化文件路径# dumpTime: 持久化时间间隔(单位: 秒), 默认: 30#创建一个数据库, 如果数据库存在此库，则返回存在库的对象d1=n.createDB('d1')操作使用>>>importjdb2>>>n=jdb2.NoSql()#初始化实例对象>>>d1=n.createDB('d1')#创建一个DB>>>t1=d1.createTable('t1')#创建一张表>>>d1.setValue('a','b')#db设置一个参数>>>d1.getValue('a')#db获取一个参数'b'>>>t1.setValue(1,2)#tb设置一个参数>>>t1.getValue(1)#tb获取一个参数2>>>d1.getValues()#获取所有的value[{1:2},'b']>>>d1.getKeys()#获取所有的key['t1','a']>>>d1.getItems()#获取所有的键值对, 返回list[('t1',{1:2}),('a','b')]>>>d1.dropKey('a')#删除一个键或者一张表>>>d1.setValue('c','d')>>>d1.clearKey('c')#清除一个key的内容>>>d1.getItems()[('t1',{1:2}),('c',None)]>>>d1.clearKey('t1')#清除一张表的内容>>>d1.getItems()[('t1',{}),('c',None)]>>>t1.lenTable()#获取数据库或表长度1>>>d1.allData()#获取所有的表或库的所有键值对，返回dict{'t1':{},'c':None}
Package: jdbcer
使用教程快速开始importjdbcerdb=jdbcer.SQLite("test.db")create_table_sql="""CREATE TABLE IF NOT EXISTS t_test (data_key varchar(255) PRIMARY KEY,data_value text,data_int integer);"""# 创建数据表db.execute(create_table_sql)# 插入数据db.replace("replace into t_test values (?,?,?)","test_key","test_data",1)# 查询数据print(db.select("select * from t_test where data_key = ?","test_key"))print(db.selectOne("select * from t_test where data_key = ?","test_key"))print(db.selectTable("t_test",data_key="test_key"))# 查询字段print(db.getColumnIntValue("select data_int from t_test where data_key = ?","test_key"))print(db.getColumnFloatValue("select data_int from t_test where data_key = ?","test_key"))print(db.getColumnBoolValue("select data_value,data_int from t_test where data_key = ?","test_key",column="data_int"))# 批量插入数据rows=[]foriinrange(0,100):row=(f"k{i}",f"v{i}",i)rows.append(row)db.replaceBatch("replace into t_test values (?,?,?)",rows)print(db.count("t_test"))print(db.count("t_test",where="data_int > 90"))# 更新数据db.update("update t_test set data_int=? where data_key = ?",100,'test_key')# 删除数据db.delete("delete from t_test")# 清空表db.clear("t_test")# 删除表db.drop("t_test")# 关闭db.close()
Package: jdbm
Journaling dbmAllowed backends‘memory’ (mostly for tests)‘tc’ (tokyo cabinet)Usage>>> from jdbm import jdbm
>>> db = jdbm('tc', filename='var/readme-test.tc',
...     journal_filename='var/readme-test.journal.tc')Standard operations:>>> db.put('a', 'foo')
>>> db.put('b', 'bar')
>>> db.get('a')
'foo'
>>> set(k for k in db)
set(['a', 'b'])
>>> db.exists('a')
True
>>> db.delete('a')
>>> db.length()
1Restore db from journal:>>> db.clear(journaling=False)
>>> db.length()
0
>>> db.restore_from_journal()
>>> db.length()
1
Package: jdbs
ThejdbsPython package provides a versatile and user-friendly solution for managing data with JSON files, offering a lightweight yet powerful alternative to traditional relational database management systems. Designed with simplicity and flexibility in mind,jdbsenables developers to handle various database operations seamlessly within their Python applications, catering to a wide range of use cases across different industries and project scopes.At the core ofjdbsis its ability to facilitate the creation, manipulation, and querying of data stored in JSON format, offering an intuitive API that abstracts away the complexities of interacting with raw JSON structures. Developers can effortlessly define tables, insert and retrieve data, and perform updates or deletions, all while leveraging the familiar syntax and semantics of Python.One of the standout features ofjdbsis its support for encryption, providing an additional layer of security for sensitive data stored within the database. By integrating encryption capabilities,jdbsempowers users to safeguard their information against unauthorized access, ensuring compliance with data protection regulations and enhancing overall data privacy.Withjdbs, developers can streamline their database workflows and accelerate application development, thanks to its lightweight nature and minimal dependencies. Whether building prototypes, developing small to medium-sized projects, or managing data-intensive applications,jdbsoffers a robust foundation for efficiently storing and accessing data, all while maintaining the flexibility and scalability required to adapt to evolving project requirements.In summary,jdbsrepresents a versatile and accessible solution for database management in Python, combining the simplicity of JSON with the power of a full-featured database system. With its rich set of features, intuitive interface, and focus on security and usability,jdbsempowers developers to unleash the full potential of their applications while ensuring the integrity and confidentiality of their data.For more information and to contribute, visit the [GitHub repository](https://github.com/rakibmia7254/jdbs).
Package: jdcal
This module contains functions for converting between Julian dates and
calendar dates.A function for converting Gregorian calendar dates to Julian dates, and
another function for converting Julian calendar dates to Julian dates
are defined. Two functions for the reverse calculations are also
defined.Different regions of the world switched to Gregorian calendar from
Julian calendar on different dates. Having separate functions for Julian
and Gregorian calendars allow maximum flexibility in choosing the
relevant calendar.Julian dates are stored in two floating point numbers (double).  Julian
dates, and Modified Julian dates, are large numbers. If only one number
is used, then the precision of the time stored is limited. Using two
numbers, time can be split in a manner that will allow maximum
precision. For example, the first number could be the Julian date for
the beginning of a day and the second number could be the fractional
day. Calculations that need the latter part can now work with maximum
precision.All the above functions are “proleptic”. This means that they work for
dates on which the concerned calendar is not valid. For example,
Gregorian calendar was not used prior to around October 1582.A function to test if a given Gregorian calendar year is a leap year is
also defined.Zero point of Modified Julian Date (MJD) and the MJD of 2000/1/1
12:00:00 are also given as module level constants.ExamplesSome examples are given below. For more information seehttps://oneau.wordpress.com/2011/08/30/jdcal/.Gregorian calendar:>>>fromjdcalimportgcal2jd,jd2gcal>>>gcal2jd(2000,1,1)(2400000.5,51544.0)>>>2400000.5+51544.0+0.52451545.0>>>gcal2jd(2000,2,30)(2400000.5,51604.0)>>>gcal2jd(2000,3,1)(2400000.5,51604.0)>>>gcal2jd(2001,2,30)(2400000.5,51970.0)>>>gcal2jd(2001,3,2)(2400000.5,51970.0)>>>jd2gcal(*gcal2jd(2000,1,1))(2000,1,1,0.0)>>>jd2gcal(*gcal2jd(1950,1,1))(1950,1,1,0.0)>>>gcal2jd(2000,1,1)(2400000.5,51544.0)>>>jd2gcal(2400000.5,51544.0)(2000,1,1,0.0)>>>jd2gcal(2400000.5,51544.5)(2000,1,1,0.5)>>>jd2gcal(2400000.5,51544.245)(2000,1,1,0.24500000000261934)>>>jd2gcal(2400000.5,51544.1)(2000,1,1,0.099999999998544808)>>>jd2gcal(2400000.5,51544.75)(2000,1,1,0.75)Julian calendar:>>>jd2jcal(*jcal2jd(2000,1,1))(2000,1,1,0.0)>>>jd2jcal(*jcal2jd(-4000,10,11))(-4000,10,11,0.0)Gregorian leap year:>>>fromjdcalimportis_leap>>>is_leap(2000)True>>>is_leap(2100)FalseJD for zero point of MJD, and MJD for JD2000.0:>>>fromjdcalimportMJD_0,MJD_JD2000>>>printMJD_02400000.5>>>printMJD_JD200051544.5InstallationThe module can be installed usingpiporeasy_install:$ pip install jdcalor,$ easy_install jdcalTests are intest_jdcal.py.CreditsA good amount of the code is based on the excellentTPMC library
byJeffrey W. Percival.The inspiration to split Julian dates into two numbers came from theIAU SOFAC library. No code or algorithm from the SOFA library is
used injdcal.LicenseReleased under BSD; see LICENSE.txt.For comments and suggestions, email to userprasanthhnin thegmail.comdomain.
Package: jdcpy
# JDC_SDK使用说明## 登录login(‘用户名’, ‘密码’)用户名或密码错误,会抛出异常.`python import jdcsdk jsdk = jdcsdk.jdcsdk()jsdk.login('用户名','密码')`## 返回ID映射表### read_idread_id(sourceName, idlist)第一个参数为一个字符串,数据源,可为”blp”, “ft”, “wind”.第二个参数为一个元组,由各ID组成,None表示所有ID.返回值类型是DataFrame.例:jsdk.read_id(“tw”, (“TEMAMAI LX Equity”, “270042.OF”))## 读数据### readread(sourceName, assetType, dataType, columnSet, idSet, startDate=None, endDate=None)第一个参数为一个字符串,数据源,可为”blp”, “ft”, “wind”.第二个参数为一个字符串,资产类型,可为”fund”, “index”, “economic”.第三个参数为一个字符串,数据类型,可为”nav”, “info”, “performance”.第四个参数为一个无组,由列名组成,不可省略.如果有ID,应放在第一个,如果有date,应放在第二个.第五个参数为一个元组,由各ID组成,None表示所有ID.六七个参数是datetime格式,是开始和结束时间.可为None,表示不限时间.返回值类型是DataFrame.jsdk.read_nav(“blp”, “fund”, ‘nav’, (“TEMAMAI LX Equity”, “270042.OF”), (‘bloomberg_ticker’,’nav_date’,’av’, ‘div’, ‘split’, ‘split_factor’, ‘av_p’, ‘div_p’, ‘nav_cal’), start_date, end_date)## 更新数据### updateupdate(sourceName, assetType, dataType, data)第一个参数为一个字符串,数据源,可为”blp”, “ft”, “wind”.第二个参数为一个字符串,资产类型,可为”fund”, “index”, “economic”.第三个参数为一个字符串,数据类型,可为”nav”, “info”, “performance”.第四个参数为一个DataFrame,要上传的数据表.返回值为一个字符串,表示taskId.jsdk.update(‘blp’, ‘fund’, ‘nav’, data)## 回滚### rollbackrollback(taskId)第一个参数为一个字符串,要回滚的taskId.此函数待完善.
Package: jddf
jddf-pythonDocumentation on readthedocs.io:https://jddf.readthedocs.ioThis package is a Python implementation ofJSON Data Definition Format,
a schema language for JSON.InstallationInstall this package using:pip3installjddfUsageBriefly, here's how you would use this package:importSchema,Validatorfromjddfimportjson# jddf.Schema represents a JDDF Schema.## You can parse a jddf.Schema from JSON using Schema.from_json in combination# with the standard library's json module.schema=Schema.from_json(json.loads("""{"properties": {"name": { "type": "string" },"age": { "type": "uint32" },"phones": {"elements": { "type": "string" }}}}"""))# jddf.Validator validates inputted data against schemas, and returns a list of# validation errors.## The exact data in validation errors is part of the JDDF specification, so# every implementation of JDDF, across all languages, return the same sort of# validation errors.validator=Validator()# This input is ok -- it passes all of the rules of the schema. So no validation# errors are returned.errors_ok=validator.validate(schema,json.loads("""{"name": "John Doe","age": 43,"phones": ["+44 1234567", "+44 2345678"]}"""))print(errors_ok)# []# This input has three problems, so three validation errors are returned.errors_bad=validator.validate(schema,json.loads("""{"age": "43","phones": ["+44 1234567", 442345678]}"""))print(len(errors_bad))# 3# "name" is required## [{'instance_path': [], 'schema_path': ['properties', 'name']}]print(errors_bad[0])# "age" has wrong type## [{'instance_path': ['age'], 'schema_path': ['properties', 'age', 'type']}]print(errors_bad[1])# "phones[1]" has wrong type## [{'instance_path': ['phones', '1'], 'schema_path': ['properties', 'phones', 'elements', 'type']}]print(errors_bad[2])
Package: jdDiff
jdDiffA graphical cross platform diff viewerjdDiff shows the difference between two Files or two DirectoriesInstallFlatpakYou can get jdDiff fromFlathubAURArch Users can get jdDiff from theAURpipYou can install jdDiff fromPyPIusingpip:pipinstalljdDiffUsing this Method, it will not include a Desktop Entry or any other Data file, so you need to run jdDiff from the Command Line.
Use this only, when nothing else works.From sourceThis is only for experienced Users and someone, who wants to package jdDiff for a Distro.
jdDiffshould be installed as a Python package.
You can usepipor any other tool that can handle Python packages.
YOu need to havelreleaseinstalled to build the Package.
After that, you should runinstall-unix-datafiles.pywhich wil install things like the Desktop Entry or the Icon in the correct place.
It defaults to/usr, but you can change it with the--prefixargument.
It also applies the translation to this files.
You need gettext installed to runinstall-unix-datafiles.py.Here's a example of installing jdDiff into/usr/local:sudopipinstall--prefix/usr/local.
sudo./install-unix-datafiles.py--prefix/usr/localTranslateYou can help translating jdDiff onCodeberg TranslateDevelopjdDiffis written in Python and uses PyQt6 as GUI toolkit. You should have some experience in both.
You can runjdDiff.pyto start jdDiff from source and test your local changes.
It ships with a few scripts in the tools directory that you need to develop.CompileUI.pyThis is the most important script. It will take all.uifiles injdDiff/uiand compiles it to a Python class
and stores it injdDiff/ui_compiled. Without running this script first, you can't start jdDiff.
You need to rerun it every time you changed or added a.uifile.BuildTranslations.pyThis script takes all.tsfiles and compiles it to.qmfiles.
The.tsfiles are containing the translation source and are being used during the translation process.
The.qmcontains the compiled translation and are being used by the Program.
You need to compile a.tsfile to a.qmfile to see the translations in the Program.UpdateTranslations.pyThis regenerates the.tsfiles. You need to run it, when you changed something in the source code.
The.tsfiles are contains the line in the source, where the string to translate appears,
so make sure you run it even when you don't changed a translatable string, so the location is correct.UpdateUnixDataTranslations.pyThis regenerates the translation files indeploy/translations. these files contains the translations for the Desktop Entry and the AppStream File.
It uses gettext, as it is hard to translate this using Qt.
These files just exists to integrate the translation with Weblate, because Weblate can't translate the Desktop Entry and the AppStream file.
Make sure you run this when you edited one of these files.
You need to have gettext installed to use it.
Package: jdEolConverter
jdEolConverterConverts End of Line of all files in a directoryjdEolConverter is a simple tool that converts the End of Line of all files in a direcory into the given format. Nothing more and nothing less. This is useful when you e.g. have edited files under Windows and forgot to change the End of Line Option.InstallFlatpakYou can get jdEolConverter fromFlathubAURArch Users can get jdEolConverter from theAURpipYou can install jdEolConverter fromPyPIusingpip:pipinstalljdEolConverterUsing this Method, it will not include a Desktop Entry or any other Data file, so you need to run jdEolConverter from the Command Line.
Use this only, when nothing else works.From sourceThis is only for experienced Users and someone, who wants to package jdEolConverter for a Distro.
jdEolConverter should be installed as a Python package.
You can usepipor any other tool that can handle Python packages.
You need to havelreleaseinstalled to build the Package.
After that, you should runinstall-unix-datafiles.pywhich wil install things like the Desktop Entry or the Icon in the correct place.
It defaults to/usr, but you can change it with the--prefixargument.
It also applies the translation to this files.
You need gettext installed to runinstall-unix-datafiles.py.Here's a example of installing jdEolConverter into/usr/local:sudopipinstall--prefix/usr/local.
sudo./install-unix-datafiles.py--prefix/usr/localTranslateYou can help translating jdEolConverter onCodeberg TranslateDevelopjdEolConverter is written in Python and uses PyQt6 as GUI toolkit. You should have some experience in both.
You can runjdEolConverter.pyto start jdEolConverter from source and test your local changes.
It ships with a few scripts in the tools directory that you need to develop.BuildTranslations.pyThis script takes all.tsfiles and compiles it to.qmfiles.
The.tsfiles are containing the translation source and are being used during the translation process.
The.qmcontains the compiled translation and are being used by the Program.
You need to compile a.tsfile to a.qmfile to see the translations in the Program.UpdateTranslations.pyThis regenerates the.tsfiles. You need to run it, when you changed something in the source code.
The.tsfiles are contains the line in the source, where the string to translate appears,
so make sure you run it even when you don't changed a translatable string, so the location is correct.UpdateUnixDataTranslations.pyThis regenerates the translation files indeploy/translations. these files contains the translations for the Desktop Entry and the AppStream File.
It uses gettext, as it is hard to translate this using Qt.
These files just exists to integrate the translation with Weblate, because Weblate can't translate the Desktop Entry and the AppStream file.
Make sure you run this when you edited one of these files.
You need to have gettext installed to use it.
Package: jderobot-kurt
# kurtKurt is a Python library for working with Scratch project files.It supports both Scratch 1.4 and Scratch 2.0 with a single Pythonic interface, and it's extensible to support new file formats for Scratch mods (such as [Snap!](http://snap.berkeley.edu/)).It also includes a parser for converting plain text into Scratch blocks.Example uses:* converting Scratch 2.0 projects back to 1.4* importing thousands of images into Scratch* importing midi files as play note blocks* importing font files as costumes* parsing text to Scratch blocks* analysing projects*[Scratch](http://scratch.mit.edu/) is created by the Lifelong Kindergarten Group at the MIT Media Lab.*## InstallationWith a proper python environment (one which has [pip](http://www.pip-installer.org/en/latest/installing.html) available), simply run:pip install kurtOr using `easy_install`:easy_install kurtOr download the compressed archive [from PyPI](http://pypi.python.org/pypi/kurt), extract it, and inside it run:python setup.py install## RequirementsRequires **Python 2.7**. Doesn't support Python 3.The installation methods above will automatically install kurt and its dependencies. To do a manual install instead, you need:* **[Construct](http://github.com/construct/construct/tree/2.06)**, version 2.0.6license* **[Pillow](http://python-imaging.github.io/)**## DocumentationKurt's documentation is hosted [on Read the Docs](http://kurt.readthedocs.org/).## LicenseKurt is released under the [LGPL](http://www.gnu.org/licenses/lgpl) Version 3.