Saravanan666/pypi-org huggingface dataset:
Package: datacenter-datasdk
datacenter_datasdkINSTALLstep.1pip install datacenter-datasdkstep.2 add auth(token, password) (ask for admin) before query dataUSAGEfrom datacenter_datasdk import auth, get_price, get_trade_days, get_security_info
from datacenter_datasdk import CN_JQ_SUMMARY, query
from datacenter_datasdk import query_by_sql

auth(token, password)

data = get_price('600033.XSHG', 'cn', 'm1', start_date='2010-01-01', end_date='2021-01-01')

trade_days = get_trade_days('cn', start_date='2021-01-01', count=10)

info = get_security_info('cn', '600033.XSHG')

d = query(CN_JQ_SUMMARY).filter(
    CN_JQ_SUMMARY.code=='000001.XSHE').order_by(
    CN_JQ_SUMMARY.date.desc()).all() 

df = query_by_sql('cn_jq_summary', 
                  condition='code = \'000004.XSHE\' and date= \'2021-01-11\'', 
                  columns=['date', 'code', 'industry_name']
                 )APIget_price()get kline data, include daily, minute and tickparamscode(required): str or list, single code or multi code as listregion(required): str, 'cn' or 'us'frequency(required): str, represent frequency of kline, 'd1', 'm1', 'm5', 'm15', 'm30', 'm60' and 'tick'(only in cn), 'd1_post'(only in cn), 'd1_raw'(only in cn)start_date(optional), datetime.datetime or datetime.date or str, start time of data, default '2005-01-01'end_date(optional), datetime.datetime or datetime.date or str, end time of data, default 0 o'clock of todayreturndataframeget_trade_days()get trade daysparamsregion(required): str, 'cn' or 'us'start_date(optional), datetime.datetime or datetime.date or str, start time of data, default Noneend_date(optional), datetime.datetime or datetime.date or str, end time of data, default Nonecount(optional), int, default Nonereturnlist of dateget_security_info()get security infoparamsregion(required): str, 'cn' or 'us'types(optional): list, values in ('etf', 'stock', 'index'), default ['etf', 'stock', 'index']code(optional): str, default None (get all code info), default Nonedate(optional), datetime.datetime or datetime.date or str, not exit market until this date, default Nonereturndataframequery()is also query object in sqlalchemyparamstable(required): object, import from given list of table object, the given table list ask for adminreturnlist of table object or table objectquery_by_sql()get data by defining 'where' condition in sql, max rows of one return is 100wparamstable_name(required): str, table namecondition(optional): str, 'where' condition str in sql, to filter data, default Nonecolumns(optional): list, the return columns, default None and return all columnsreturndataframe
Package: datacenter-datasdk-bin
datacenter_datasdk_binINSTALLpip install datacenter-datasdk-binUSAGEfrom datacenter_datasdk_bin import get_price, auth

auth('xxx', 0, 'xxx','xxx')
data = get_price('600033.XSHG', 'cn', 'm1', start_date='2010-01-01', end_date='2021-01-01')APIget_price()get kline data, include daily, minute and tickparamscode: str or list, single code or multi code as listregion: str, 'cn' or 'us'frequency: str, represent frequency of kline, 'd1', 'm1', 'm5', 'm15', 'm30', 'm60', 'tick'(only in cn), 'd1_post'(only in cn), 'd1_raw'(only in cn)start_date: datetime.datetime or datetime.date or str, start time of data, default '2005-01-01'end_date: datetime.datetime or datetime.date or str, end time of data, default 0 o'clock of todaycolumns: list, set the data columns of return, default Nonelimit: int, set the rows of return from start_date, default Noneconnect: taos connect object, default the connect object after 'auth()'returndataframeauth()authorization of api, and get the taos connect objectparamshost: strport: intuser: strpassword: strreturntaos connect object
Package: datacenter-du
Datacenter Downloader & UploaderDatacenter Downloader & UploaderFeatures数据下载数据上传Usage下载一种形式:from datacenter_du import Downloader,SimpleDownloader
Downloader().run()
SimpleDownloader().run()另外一种形式:from datacenter_du import download,simple_download
download()
simple_download()上传由于由于multi-part-upload需要和server配合Content-Range分块上传不适合S3,暂时放弃目前SimpleUploader,simple_upload可以正常工作，但S3Uploader需要服务端配合History0.1.0 (2020-12-22)First release on PyPI.0.1.1 (2020-12-23)下载器由于multi-part-upload需要和server配合，暂时只提供simple-uploadContent-Range分块上传不适合S3,暂时放弃0.1.2 (2020-12-23)补充README0.1.3 (2020-12-23)修改说明0.1.4 (2020-12-23)添加S3Uploader（multi-part）,暂时不可用，需要服务端配合
Package: data-chan
Data-Chan-python allows you to use thedata-chancomunication
library with Python andJupyter.ReleasingTo release, just bump the version and push to master. Wercker-CI will
take care of the build and deploy process.pipinstallbump# Bump patch/major/minorbumpsetup.py-bbumpsetup.py-mbumpsetup.py-M# Create .tar.gz archivepythonsetup.pysdist# Upload to PyPi the latest filetwineuploaddist/$(ls-tpdist|grep-v/$|head-1)
Package: datachart
Data visualization package, simple to use, highly customizableDocumentation:https://eriknovak.github.io/datachartSource code:https://github.com/eriknovak/datachartThe datachart package is a python package for creating data visualizations. It is designed to be simple to use and highly customizable, i.e. it is easy to change the look and feel of the charts.✅ RequirementsBefore starting the project make sure these requirements are available:python. The python programming language (v3.9 or higher).InstallpipinstalldatachartExampleTODO
Package: datachat
DataChat, talk with your data! 🚀️Simple to use ❤️pipinstalldatachatVersion 0.0.3 ✨️Under constructionMade with A.I. contribution 🤖Documentation🚀References🤘Wise Up Data - GithubFree tier VM cluster---Maintainer 🤗 👨‍💻Sivio Liborio💬silllvio@hotmail.com📧silvio.liborio@wiseupdata.com🌍https://www.linkedin.com/in/silvio-de-melo-liborio/
Package: data-checker1453
data_checker1453 is a package used to preview details of the dataframes in the first steps of data exploration.It has more specific functionality for displaying texts side by side as well as dataframes.Usage:Mehods and functions :show_preview() : A method to check basic details about the dataframe in question. To use this method instantiate the Check() class with your dataframe as an argument, then call show_preview()display_side_by_side : A function to display 2 dataframes side by side (make sure you limit the column numbers so it would fit the screen)print_side_by_side :  A function to print 2 or 4 strings side by side (make sure you don't exceed the charachter size & for 4 strings pass b = 2)
Package: data-chunker
= data-chunkerPython library that chunks code into a Python list consisting of Python dictionaries. This list of dictionaries can then be used for vector-store creation, which can provide granular context for OpenAI queries.Current list of languages that can be chunked:* Java (packages, methods, and variables)== Modules=== parser.py* Contains functions to read code lines from given files and file paths* get_file_list(code_path, file_extension) - returns a list of files from the path passed in* get_code_lines(file) - returns the code from the file name passed in=== java_code.py* Contains functions to split java files into smaller chunks== ContributingThe GitHub repository for this package is https://github.com/break-free/data-chunker.The `main` branch is protected therefore any contributions require a branch to be created. Branch names should be preprended with either `feat/` or `fix/` to indicate whether new functionality or a refactor/fix is being made (e.g, `fix/update-readme`). Once the branch is complete, it can be merged back into `main`.The repository includes additional directories, such as `setup`, `info`, and `training`, and files such as `main.py`, that includes additional resources for development and usage examples.== PackagingThis Python package was produced using https://hatch.pypa.io/latest/config/build/[hatchling]. Refer to the `pyproject.toml` for specifics.Recommend reading the following sites to get familiar with Python packages and uploading to https://pypi.org.* https://packaging.python.org/en/latest/tutorials/packaging-projects/[Packaging Python Projects].* https://hatch.pypa.io/latest/config/build/[Hatchling - Build Configuration].* https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#uploading-your-project-to-pypi[Uploading your Project to PyPI].* https://pypi.org/project/keyring/[keyring] (useful for keeping PyPI login safe).== NotesThis code has been battle-tested with *one* application. If you encounter any issues then please https://github.com/break-free/java-code-chunker/issues[submit an issue ticket here on GitHub].
Package: datachunkpy
DataChunk is an useful library for proessing messages in a stream where messages are sent in
a stream as shown below:
<msg-size><msg-bytes><msg-size><msg-bytes><msg-size>….
msg-size is a 4 byte integer (little-endian)
whenever a complete message is read, DataChunk calls the handle_msg method of the handler.A message may come in fragments. Sometimes many messages may come in a single data packet.
All we need to do is to call process_chunk method of DataChunk and DataChunk object will take care
of re-assembling the messages as and when needed.Basic examplefrom__future__importprint_functionfromstructimportpackimportrandomfromdatachunkpy.datachunkimportDataChunk,MessageHandler# A message handler classclassMyMsgHandler(MessageHandler):def__init__(self):self.msg_processed=0self.bytes_processed=0defhandle_msg(self,data):print('I am handling',data)self.msg_processed+=1self.bytes_processed+=len(data)datach=DataChunk(MyMsgHandler())i=0random.seed()mydata=b''total_bytes=0whilei<10000:i+=1j=random.randint(1,50)mydata+=pack('i',j)mydata+=b'a'*jtotal_bytes+=jdatach.process_chunk(mydata)
Package: data-cipher
data_cipherThe project is being finalized, plans include adding more algorithmsDeveloped by Nikita Derevyankin (Dronikon) (c) 2022Installation$pipinstalldata-cipherExamples of How To UseAdvanced Encryption Standardfromdata_cipherimportEncoderencoder=Encoder()message="test"key="12345"en=encoder.aes_encrypt(message,key)de=encoder.aes_decrypt(en,key)print("Encrypted data: ",en)print("Decrypted data: ",de)Blowfishfromdata_cipherimportEncoderencoder=Encoder()message="test"key="12345"en=encoder.blowfish_encrypt(message,key)de=encoder.blowfish_encrypt(en,key)print("Encrypted data: ",en)print("Decrypted data: ",de)https://pypi.org/project/data_cipher/https://github.com/dronikosha/data_cipher
Package: datacite
AboutPython API wrapper for the DataCite Metadata Store API and DataCite XML
generation.InstallationThe datacite package is on PyPI so all you need is:pip install dataciteDocumentationDocumentation is readable athttp://datacite.readthedocs.io/or can be
built using Sphinx:pip install datacite[docs]
python setup.py build_sphinxTestingRunning the test suite is as simple as:pip install -e .[all]
./run-tests.shIf you’re using zsh, use this pip command instead:pip install -e .’[all]’Some tests require a DataCite Test Account.
Set the following environment variables
$DATACITE_USER, $DATACITE_PW, $DATACITE_PREFIX
with your account information for doi.test.datacite.org and
run:./run-tests-pw.shChangesVersion v1.1.3 (released 2023-03-20):Updates dependency versions and adds python 3.9 supportChanges internal definition name for affiliation in 4.3 schemaVersion v1.1.2 (released 2021-06-22):Standardizes function names in DataCiteRESTClient. Old functions will be
depreciated in a future releaseVersion v1.1.1 (released 2021-04-20):Fixes DataCiteRESTClient attributes’ type. Prefix, username and password
are always cast to string.Version v1.1.0 (released 2021-04-15):Adds full support for DataCite Metadata Schema v4.2 and v4.3 XML generation.Uses Official DataCite JSON Schema, which has the following notable changes
from the previous schema:Uses “identifiers” which is a combination of the XML “identifier” and
“alternativeIdentifiers” elements“creatorName” is now “name”“contributorName” is now “name”“affiliations” is now “affiliation” (is still an array)“affilition” is now “name”There is no longer a funder identifier object (the identifier and type are just
elements)Removes Python 2 supportRemoves the old way of testing with DataCite: test mode for the MDS APIs and
the test DOI 10.5072Version v1.0.1 (released 2018-03-08):Fixes schema location url for DataCite v4.1Version v1.0.0 (released 2018-02-28):Adds full support for DataCite Metadata Schema v4.1 XML generation.Version v0.3.0 (released 2016-11-18):Adds full support for DataCite Metadata Schema v4.0 XML generation.Adds the message from the server in the error exceptions.Version v0.2.2 (released 2016-09-23):Fixes issue with generated order of nameIdentifier and affiliation tags.Version v0.2.1 (released 2016-03-29):Fixes issue with JSON schemas not being included when installing from PyPI.Version v0.2.0 (released 2016-03-21):Adds DataCite XML generation support.Version 0.1 (released 2015-02-25):Initial public release.
Package: dataclas
dataclass: likedataclasses.dataclass, except:Adds three new instance methods to each dataclassasdict(),astuple(),replace()…and one new class method,fields()frozen=Trueis now the default!xmod-ed for less cruftdataclass.field: Likedataclasses.field, except:default_factoryis now a positional parameterperfectly backward compatibleUsage examplesimportdataclassfromtypingimportDict@dataclassclassOne:one:str='one'two:int=2three:Dict=dataclass.field(dict)# Simplified `field`## Three new instance methods#o=One()asserto.asdict()=={'one':'one','two':2,'three':{}}asserto.astuple()==('one',2,{})o2=o.replace(one='seven',three={'nine':9})asserto2==One('seven',2,{'nine':9})## A new class method#assert[f.nameforfinOne.fields()]==['one','two','three']## Immutable by default#try:o.one='three'exceptAttributeError:passelse:raiseAttributeError('Was mutable!')@dataclass(frozen=False)classOneMutable:one:str='one'two:int=2three:Dict=dataclass.field(dict)om=OneMutable()om.one='three'assertstr(om)=="OneMutable(one='three', two=2, three={})"## These four new methods won't break your old dataclasses:#@dataclassclassOverloads:one:str='one'asdict:int=1astuple:int=1fields:int=1replace:int=1o=Overloads()assertov.one=='one'assertov.asdict==1assertov.astuple==1assertov.fields==1assertov.replace==1# In this case, you can access them functions on dataclass:assert(dataclass.asdict(ov)=={'asdict':1,'astuple':1,'fields':1,'one':'one','replace':1})assertdataclass.astuple(ov)==('one',1,1,1,1)
Package: dataclass-abc
Dataclass ABCLibrary that lets you define abstract properties for dataclasses.Installationpip install dataclass-abcUsageThedataclassabcclass decorator resolves the abstract properties
overwritten by a field.fromabcimportABC,abstractmethodfromdataclassabcimportdataclassabcclassA(ABC):@property@abstractmethoddefname(self)->str:...@dataclassabc(frozen=True)classB(A):name:str# overwrites the abstract property 'name' in 'A'Define mutable variablesDefine a mutable variablenamein the abstract classAby using thename.setterdecorator.fromabcimportABC,abstractmethodfromdataclassabcimportdataclassabcclassA(ABC):@property@abstractmethoddefname(self)->str:...@name.setter@abstractmethoddefname(self,val:str):...defset_name(self,val:str):self.name=val@dataclassabcclassB(A):name:strb=B(name='A')b.set_name('B')ExampleTheexampleimplements the code snippets taken fromRealPythonwith abstract properties.Design patternThis library suggests the following design pattern:mixins- amixinis an abstract class that implements data as abstract
properties and methods based on the abstract properties.classes- an abstract class inherits from one or more mixins
(seeCityorCapitalCityin the example). This class is used for pattern matching,
e.g. usingisinstancemethod.impl- animplementation classimplements the abstract properties.
(seeCityImplorCapitalCityImplin the example). This class is decorated withdataclassabcandresolve_abc_propand should always be called through aninitialize function.init- aninitialize function(orconstructor function) initializes animplementation class.
Package: dataclass-applicative
dataclass-applicative--- treating dataclasses like containersThis package provides functions for manipulating dataclasses as containers.DocumentationThe documentation is hosted onReadTheDocs, and the source code
for that documentation is availablehere.Quick startGiven a dataclass,>>> from dataclasses import dataclass
>>> from dataclass_applicative import amap, fmap, gather, pure, names, values
>>> @dataclass
... class F:
...     x: object
...     y: object
...     z: objectwe can list its fields;>>> list(names(F))
['x', 'y', 'z']list its values;>>> list(values(F(1, 2, 3)))
[1, 2, 3]default-construct new instances;>>> pure(F, 1)
F(x=1, y=1, z=1)apply a function to those values;>>> fmap(str, F(1, 2, 3))
F(x='1', y='2', z='3')or apply functions stored in one object to values stored in another;>>> amap(F(str, lambda _: 999, lambda z: z + 1), F(1, 2, 3))
F(x='1', y=999, z=4)and gather all attributes from many instances into tuples in a new
object:>>> gather(F(1, 2, 3), F(10, 11, 12), F(3, 2, 1), F(0, 0, 0))
F(x=(1, 10, 3, 0), y=(2, 11, 2, 0), z=(3, 12, 1, 0))
Package: dataclass-argparse
dataclass-argparseDefine command line arguments as type annotated namespace dataclasses.Advantages:fast, straight forward definition of command line argumentsuse inheritance to combine argument groupsuse inheritance to define sub-parserskeep your parsed args in one joined (or several separate) namespace dataclass instancesExample 1: group arguments with inheritance; parse jointlyfromdataclassesimportdataclass,fieldfromtypingimportTuplefromdataclass_argparseimportNonEmptyList,TypedNamespace@dataclassclassArgsA(TypedNamespace):a1:int=1a2:NonEmptyList[int]=field(default_factory=lambda:[1],metadata={"help":"help for a2."})@dataclassclassArgsB(TypedNamespace):b1:str=field(metadata={"metavar":"REQ_B1"})b2:bool=Falseb3:Tuple[int,int]=field(default=(1,2),metadata=dict(help="help for b3."))@dataclassclassArgs(ArgsA,ArgsB):passdeffunc_a(args:ArgsA):print("func a",args.a1,args.a2)deffunc_b(args:ArgsB):print("func b",args.b1,args.b2,args.b3)deffunc_c(args:Args):print("func a",args.a1,args.a2)print("func b",args.b1,args.b2,args.b3)parser=Args.get_parser_grouped_by_parents()if__name__=="__main__":parsed_args=parser.parse_args()parser.print_help()func_a(parsed_args)func_b(parsed_args)func_c(parsed_args)Example 2: group arguments with argparse; parse groups separatelyimportargparsefromdataclassesimportdataclass,fieldfromtypingimportClassVarfromdataclass_argparseimportNonEmptyList,TypedNamespace@dataclassclassArgsA(TypedNamespace):a1:ClassVar[int]=1a2:NonEmptyList[int]=field(default_factory=lambda:[1],metadata={"help":"help for a2."})parser_a=ArgsA.get_parser("group A")deffunc_a(args:ArgsA):print("func a",args.a1,args.a2)@dataclassclassArgsB(TypedNamespace):b1:str=field(metadata={"metavar":"REQ_B1"})b2:bool=Falseparser_b=ArgsB.get_parser("group B")deffunc_b(args:ArgsB):print("func b",args.b1,args.b2)# join created parsers with argparsejoint_parser=argparse.ArgumentParser(parents=[parser_a,parser_b],add_help=False)# arguments used directly (not part of a typed namespace groups)general_args=joint_parser.add_argument_group("General")general_args.add_argument("-h","--help",action="help",help="show this help message and exit")if__name__=="__main__":joint_parser.parse_args()# show help/complain about missing/unknown args, but ignore parse args# parse argsargs_a,unused_args=parser_a.parse_known_args()args_b,unused_args=parser_b.parse_known_args(unused_args)joint_parser.print_help()func_a(args_a)func_b(args_b)
Package: dataclass-bakery
Dataclass Bakery offers you a smart way to create objects based on dataclasses for testing in Python.
Inspired in model bakery module for Django.Installpip install dataclass_bakeryUsage and InfoBasic usagefrom dataclasses import dataclass

from dataclass_bakery import baker


@dataclass
class Customer:
    id: int
    name: str
    spent_money: float


baker.make(Customer)
baker.make(Customer, _quantity=3)

"""
Customer(id=25, name='vzWoIfgoZM', spent_money=16.36)

[Customer(id=27, name='OYvyWakmUX', spent_money=84.98), Customer(id=41, name='AiancdsmLg', spent_money=57.57), Customer(id=92, name='feTxLyuSus', spent_money=26.06)]
"""For more information:https://dataclass-bakery.readthedocs.io/Types available:intstrfloatboolcomplexdatedatetimerangelisttupledictsetList (from typing import List)Tuple (from typing import Tuple)Dict (from typing import Dict)Union (from typing import Union)Optional (from typing import Optional)Path (from pathlib import Path)Decimal (from decimal import Decimal)UUID (from uuid import UUID)
Package: dataclass-bakery-patched
Dataclass BakeryDataclass Bakery offers you a smart way to create objects based on dataclasses for testing in Python.
Inspired in model bakery module for Django.Installpip install dataclass_bakeryUsage and InfoBasic usagefrom dataclasses import dataclass

from dataclass_bakery import baker


@dataclass
class Customer:
    id: int
    name: str
    spent_money: float
    
    
baker.make(Customer)
baker.make(Customer, _quantity=3)

"""
Customer(id=25, name='vzWoIfgoZM', spent_money=16.36)

[Customer(id=27, name='OYvyWakmUX', spent_money=84.98), Customer(id=41, name='AiancdsmLg', spent_money=57.57), Customer(id=92, name='feTxLyuSus', spent_money=26.06)]
"""For more information:https://dataclass-bakery.readthedocs.io/Types available:intstrfloatboolcomplexrangelisttupledictsetList (from typing import List)Tuple (from typing import Tuple)Dict (from typing import Dict)Union (from typing import Union)Optional (from typing import Optional)Path (from pathlib import Path)Decimal (from decimal import Decimal)UUID (from uuid import UUID)
Package: dataclass-cli
dataclidatacliis a library for building simple command line interfaces from
dataclasses. It is built onargparseand has no dependencies.UsageApicturecode snippet speaks a thousand words:# person.pyfromdataclassesimportdataclass,fieldfromdatacliimportdatacli@dataclassclassPerson:name:strage:int=30args=datacli(Person)print(args)$pythonperson.py--name"Jeremy"Person(name="Jeremy",age=30)$pythonperson.py--name"Jeremy"--age20Person(name="Jeremy",age=20)$pythonperson.py--help
usage:test.py[-h]--nameNAME[--ageAGE]optionalarguments:-h,--helpshowthishelpmessageandexit--nameNAME--ageAGEField namesShort and long field names (-aor--foo-bar) can be modified through thedata-class field metadata, for example,# person.pyfromdataclassesimportdataclass,fieldfromdatacliimportdatacli@dataclassclassPerson:name:str=field(metadata={"short_name":"-n"})age:int=field(metadata={"short_name":"-a","long_name":"--years"})args=datacli(Person)print(args)$pythonperson.py-n"Jeremy"-a20Person(name="Jeremy",age=20)$pythonperson.py--name"Jeremy"--years30Person(name="Jeremy",age=30)$pythonperson.py--help
usage:test.py[-h]--nameNAME--ageAGE

optionalarguments:-h,--helpshowthishelpmessageandexit-n,--nameNAME-a,--ageYEARSIf you want to use defaults with field names, you should use thedefaultordefault_factoryarguments tofield(), for example,age:int=field(default=20,metadata={"short_name":"-a"})