Saravanan666/pypi-org huggingface dataset:
Package: cdbc
Common Database ConnectorCache / Redisfromcdbc.cacheimportRedisredis_host='redis'redis_port=16382redis_db=1c=Redis(redis_host=redis_host,redis_port=redis_port,redis_db=redis_db)c.create_redis_conn()c.kvs()c.set('a','b')c.get('a')kvs={'a1':1,'b1':2,'c1':3}c.set(batch=True,kvs=kvs)c.kvs()SQL / PostgreSQLimportrandomimportstringimporttimeimportjsonfromcdbc.postgresqlimportPGhost='freedbs'port=15432database='testdb02'user='postgresql-user'password='postgresql-Passw0rd'p=PG(host=host,port=port,database=database,user=user,password=password)p.create_pg_conn()p.select('select version();')p.select('select count(1) from table1;')# pool modep.create_pg_pool()p.select_from_pool('select version();')p.select_from_pool('select count(1) from table1;')### Selectp=PG(host=host,port=port,database=database,user=user,password=password)p.create_pg_conn()for_inrange(5):sql='select count(1) from table1'p.select(sql=sql)time.sleep(1)for_inrange(5):sql='select count(1) from table1'p.select_from_pool(sql=sql)time.sleep(1)### Insertp=PG(host=host,port=port,database=database,user=user,password=password)table='table1'columns='col1, col2, col3'p.create_pg_conn()for_inrange(10):value1=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(10)])value2=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(10)])k=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(5)])v=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(5)])values="'"+value1+"'"+', '\+"'"+value2+"'"+', '\+"'"+json.dumps({k:v})+"'"cvs=[columns,values]p.insert(table=table,cvs=cvs)# insert via pg poolp.create_pg_pool()for_inrange(10):value1=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(10)])value2=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(10)])k=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(5)])v=''.join([random.choice(string.ascii_lowercase+string.digits)for_ninrange(5)])values="'"+value1+"'"+', '\+"'"+value2+"'"+', '\+"'"+json.dumps({k:v})+"'"cvs=[columns,values]p.insert_with_pool(table=table,cvs=cvs)MessageQueue/RabbitMQConsumerfromcdbc.messageimportRabbitMQimportjsonhost='freedbs'port=15603user='rabbitmq-user'password='rabbitmq-user-Passw0rd'exchange='exchange-test'queue='queue-test'defcall_back(ch,method,properties,body):message=json.loads(body.decode())print(message)ch.basic_ack(delivery_tag=method.delivery_tag)print("%r"%body)# if __name__ == '__main__':q=RabbitMQ(user=user,password=password,enable_ssl=False,host=host,port=port,v_host='/',exchange=exchange,queue=queue,)q.create_channel()q.create_queue()q.connect_exchange()q.run_consumer(call_back)Producerfromcdbc.messageimportRabbitMQimportjsonhost='freedbs'port=15603user='rabbitmq-user'password='rabbitmq-user-Passw0rd'exchange='exchange-test'queue='queue-test'q=RabbitMQ(user=user,password=password,enable_ssl=False,host=host,port=port,v_host='/',exchange=exchange,queue=queue,)q.create_channel()q.send_msg("""{"abc":"123"}""")
Package: cdblib
Overview========Cdblib contains classes to read and write cdb ("constant database") files.Cdb files map string keys to string values with very fast record lookups.Cdblib also allows for in-memory indexes to enable even faster lookups.See http://cr.yp.to/cdb.html on D. J. Bernstein's site for the originalspecification.Installation============Cdblib requires Python 2.5.The cdblib package contains a C extension module for speedups, but its useis not required and makes no difference to the interfaces exposed (except ofcourse for speed).To install with the C extension module for speed, run::# python setup.py installAlternatively, you can simply copy the file cdblib.py to somewhere in yourPYTHONPATH (but this will not include the speedups from the C extension).Example Usage=============Create a new CDB (or update an existing one):>>> from cdblib import CDB, CDBWriter>>> wcdb = CDBWriter("presidents.cdb") # Create a new CDB file.>>> wcdb["Reagan"] = "1981 - 1988">>> wcdb["Bush"] = "1989 - 1992">>> wcdb["Clinton"] = "1993 - 2000">>> wcdb["Bush"] = "2001 - 2008" # Creates a second record with the key "Bush".>>> wcdb["Bush"] # Return the first record with key "Bush".'1989 - 1992'>>> wcdb.getall("Bush") # Return all records with the key "Bush".['1989 - 1992', '2001 - 2008']>>> wcdb["Clinton"]'1993 - 2000'>>> wcdb.getall("Clinton")['1993 - 2000']>>> wcdb["Gore"] # Oops, the CDB doesn't contain the key "Gore".Traceback (most recent call last):File "<stdin>", line 1, in <module>File "cdblib.py", line 135, in __getitem__raise KeyError(key)KeyError: 'Gore'>>> wcdb.get("Gore", "Bush") # Return "Bush" if the key "Gore" doesn't exist.'Bush'>>> wcdb.close() # Close the CDB file and prevent any more writes.Open an existing CDB read-only:>>> rcdb = CDB("presidents.cdb") # Re-open the saved CDB file read-only.>>> rcdb["Clinton"]'1993 - 2000'>>> rcdb.close()>>> rcdb = CDB("presidents.cdb", load_index=True) # Load the CDB index into memory for faster lookups.
Package: cdbw
CDbwCompute the S_Dbw validity indexS_Dbw validity index is defined by equation:CDbw = compactness*cohesion*separationHighest value -> better clustering.Installation:pipinstall--upgradecdbwUsage:fromcdbwimportCDbwscore=CDbw(X,labels,metric="euclidean",alg_noise='comb',intra_dens_inf=False,s=3,multipliers=False)Parameters:X : array-like, shape (n_samples, n_features)
    List of n_features-dimensional data points. Each row corresponds
    to a single data point.
labels : array-like, shape (n_samples,)
    Predicted labels for each sample.  (-1 - for noise)
metric : str,
    The distance metric, can be ‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘cityblock’, ‘correlation’,
    ‘cosine’, ‘dice’, ‘euclidean’, ‘hamming’, ‘jaccard’, ‘kulsinski’, ‘mahalanobis’, ‘matching’, ‘minkowski’,
    ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’, ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘wminkowski’,
    ‘yule’.
alg_noise : str,
    Algorithm for recording noise points.
    'comb' - combining all noise points into one cluster (default)
    'sep' - definition of each noise point as a separate cluster
    'bind' -  binding of each noise point to the cluster nearest from it
    'filter' - filtering noise points
intra_dens_inf : bool,
    If False (default) CDbw index = 0 for cohesion or compactness - inf or nan.
s : int,
    Number of art representative points. (>2)
multipliers : bool,
    Format of output. False (default) - only CDbw index, True - tuple (compactness, cohesion, separation, CDbw)Returns:cdbw : float,
    The resulting CDbw validity index.References:M. Halkidi and M. Vazirgiannis, “A density-based cluster validity approach using multi-representatives”
Pattern Recognition Letters 29 (2008) 773–786.
Package: cdbx
CDBx isCDBreimplementation for Python.Supported python versions are Python 2.7 and Python 3.6+.Development StatusBeta.Copyright and LicenseCopyright 2016 - 2023
André Malo or his licensors, as applicable.The whole package is distributed under the Apache License Version 2.0.
You’ll find a copy in the root directory of the distribution or online
at: <http://www.apache.org/licenses/LICENSE-2.0>.BugsNo bugs, of course. ;-)
But if you’ve found one or have an idea how to improve cdbx, feel
free to send a pull request ongithubor send a mail to
<cdbx-bugs@perlig.de>.Author InformationAndré “nd” Malo <nd perlig.de>
GPG: 0x029C942244325167If God intended people to be naked, they would be born that way.
– Oscar Wilde
Package: cdcclimate
Python library to retrieve climate statistics from DWD CDC.Date provided by Climate Data Center (CDC) of Deutscher WetterDienst (DWD)
are retrieved from opendata.dwd.de and simple statistics on
hourly, daily and monthly basis are calulated.Statistics are returned matching a provided list of dates.The statistics are cached in the user home directory for subsequent calls.
The DWD server is regularly checked for updates and statistics are updated,
if necessary. Updates can be triggerd manually, too.
Package: cdcdeaths
cdcdeathscdcdeaths is a PyPI package for displaying the number of deaths in the US due to COVID-19 by age groups.
cdcdeaths can scrape the latest data from cdc.
result.png file will be generated.how to install cdcdeathsOn WSL on Windows, MacOS, and Linux operating systems, run the following command to install it:$ pip install cdcdeathsOn Windows 11 or 10,$ pip install cdcdeaths --force-reinstall --no-cache-dir --no-binary :all:how to run cdcdeaths$ cdcdeaths
Package: cd-construct1
test pip package wolfganginstall required toolspip install setuptools
pip install wheel
pip install twinepyexample
â”œâ”€â”€ LICENSE
â”œâ”€â”€ pyexample
â”‚   â”œâ”€â”€init.py
â”‚   â”œâ”€â”€ module_mpi4py_1.py
â”‚   â”œâ”€â”€ module_numpy_1.py
â”‚   â””â”€â”€ module_numpy_2.py
â”œâ”€â”€ README.rst
â””â”€â”€ setup.pysee alsohttps://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-packaging/https://packaging.python.org/https://dzone.com/articles/executable-package-pip-install
Package: cdcs
# Python CDCS REST API clientThis is a base Python package for accessing instances of the NIST Configurable Data Curation System (CDCS) databases, versions 2.X.X and 3.X.X.  It defines a Python CDCS class that streamlines REST calls to a database byTaking access settings once (username, password, etc) and saving them for subsequent REST calls.Defining methods that wrap around REST calls to interact with the database in a more Pythonic way.Automatically converting any accessed information to pandas Series and DataFrame objects to allow for the information to be easily manipulated.## InstallationThe package can be installed using pip:pip install cdcsor conda:conda install -c conda-forge cdcsAlternatively, the source code can be downloaded from github atStable releases: [https://github.com/usnistgov/pycdcs](https://github.com/usnistgov/pycdcs)In development: [https://github.com/lmhale99/pycdcs](https://github.com/lmhale99/pycdcs)## DocumentationDocumentation for the package is given as Jupyter Notebooks that can be found on the github site.  Each Notebook is focused on providing details and examples related to different use cases for the package.CDCS Public Data Explorationoutlines the basic functions allowing an anonymous user (i.e. not logged in) to explore the available public data on a curator.CDCS Data Managementoutlines the basic pre-defined functions allowing a logged-in user to manage their own templates, data records and blobs.CDCS Rest Builderprovides a simple explanation of how users can easily build their own functions and make their own REST API calls should they wish to interact with the database in ways outside the pre-defined functions.
Package: cdcstream
Cite this work as (BibTex):@techreport{TratBenderOvtcharova2023_1000155196,
    author       = {Trat, Martin and Bender, Janek and Ovtcharova, Jivka},
    year         = {2023},
    title        = {Sensitivity-Based Optimization of Unsupervised Drift Detection for Categorical Data Streams},
    doi          = {10.5445/IR/1000155196},
    institution  = {{Karlsruher Institut für Technologie (KIT)}},
    issn         = {2194-1629},
    series       = {KIT Scientific Working Papers},
    keywords     = {unsupervised conceptdriftdetection, data streammining, productiveartificialintelligence, categorical data processing},
    pagetotal    = {10},
    language     = {english},
    volume       = {208}
}Implementation of an augmented version of Dino Ienco's algorithmCDCStream(Change Detection in Categorical Evolving Data Streams) (https://doi.org/10.1145/2554850.2554864).RequirementsPlease note that several requirements need to be fulfilled in order to run the software.
See repository readme for details.AcknowledgementsThis software was developed at the FZI Research Center for Information Technology.
The associated research was funded by the German Federal Ministry of Education and Research (grant number: 02K18D033) within the context of the project SEAMLESS.
Package: cdc-upscaler
CDC Image UpscalerWrapped tools based
onxiezw5/Component-Divide-and-Conquer-for-Real-World-Image-Super-Resolution.First you need to install this withpip:pipinstallcdc_upscalerHere is a simple example:importloggingimportosfromPILimportImagefromcdc_upscalerimportimage_upscaleif__name__=='__main__':logging.basicConfig(level=logging.INFO)original_image=Image.open('images/your input image.png')# any scale is supported, such as 1.5, 2, even 6 (which may take some more time)upscaled_image=image_upscale(original_image,scale=4)os.makedirs('output',exist_ok=True)upscaled_image.save('output/result.png')#original4x12This pretrained model is hosted on7eu7d7/CDC_anime, which is provided
by7eu7d7. The onnx model used is hosted
onnarugo/CDC_anime_onnx.
Package: cdcwonderpy
cdcwonderpy: Use Python3 and Selenium to automatically complete the CDC WONDER Online FormDisclaimerThis project is a work-in-progress. It works in some cases but may not work in many others (and may not be flexible enough for some users), and some extra code exists for functions that are not yet operational. This program has only been tested in Windows 10.DescriptionThe CDC's WONDER API does not allow users to collect subnational data -- users have to use theonline form. This package automates that form. Note that this is still a work in progress.This package is intended to be used with the R package"wondeR".InstallationTo use this package, you'll need to have Selenium set up for Chrome. This means you need to have Chrome, Chromedriver, and Selenium.$ pip install cdcwonderpyUsagefromcdcwonderpy.pulldataimportwonderwonder(## wonderpy argumentsRUN_NAME="opioids",# Name of the rundownload_dir="/path/to/downloads/folder",# Where to download the dataexisting_file=False,# True if the data file already exists on your local computer## You want deaths matching the following ICD CodesMCD_CAUSE_CODE_1=["A10","A20"],# Deaths that include ANY of these ICD CodesMCD_CAUSE_CODE_2=["A12","A22"],# ...and ANY of these ICD Codes## Group the deaths by these variablesby_variables=["sex","age"],# Any of the following: "sex", "age", "race", "hispanic", "state", "year", "month"## Only collect data of the following (None if all)AGEG=None,# age groupGENDERG=None,# genderRACEG=None,# raceHISPANICG=None,# hispanic status## Otherjust_go=False# For use with more further and undeveloped cases. Keep as False.)
Package: cd-directory-manager
CD_Directory_Manager: Directory Manager PackageCD is for Code Docta.TheCD_Directory_Managerproject houses theDirectory Managerpackage, a comprehensive set of utilities designed for efficient file and directory management, ZIP operations, and more.InstallationTo install theDirectory Managerpackage, you can use pip:pipinstallcd-directory-managerUpdatepip install --upgrade cd-directory-managerFeaturesTheDirectory Managerpackage contains the following classes, each in its separate file:1. Directory ManagerFile:directory_manager.pyDescription: Manages directory-related operations like creating, deleting, listing files, and more.2. File ManagerFile:file_manager.pyDescription: Handles various file operations like reading, writing, and managing different file formats such as JSON, CSV, HTML, and Pickle.3. Path ManagerFile:path_manager.pyDescription: Provides utilities for handling and manipulating file paths in a cross-platform manner.4. FileDialogsFile:tk_file_dialog.pyDescription: Facilitates file dialog operations for TKinter.File:ps_file_dialog.pyDescription: Facilitates file dialog operations for PySide6.File:pqt_file_dialog.pyDescription: Facilitates file dialog operations for PyQt6.5. Zip ManagerFile:zipper.pyDescription: Manages ZIP-related operations, including zipping and unzipping files and directories.UsageEach class provides static methods that can be used directly without instantiating the class. For detailed usage, refer to the docstrings within each class file.Example:fromCD_DM.Directory_Manager.file_managerimportFileManagerasfmdata=fm.read_json("path_to_json_file.json")ContributingContributions are welcome! Please open an issue or submit a pull request on GitHub.LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.More documentation at:Code DoctaTo Dounitest
Package: cddns
CDDNS支持Dnspod, 自动更新IP开始使用安装pip install cddns或者clone https://github.com/chr233/pyddns修改配置文件,填写域名和dnspod API token[dnspod]token=''[[domains]]domain='chrxw.com'sub='test'完整配置参考example.config.toml运行python3 ddns.py或者自己调用cddns.ddns:fromcddnsimportddnsddns('config.toml','ip.txt')# 自行修改配置文件路径建议使用corntab来定时运行例如每30分钟运行一次:*/30 * * * * python3 /root/ddns/ddns.py > /dev/null 2>&1 &更新脚本方法:pip3 install cddns --upgrade
Package: cd-drive
cd_drivecd Drive is a wrapper of google-api-python-client that make it easier to manipulate files on Google Drive.InstallationYou can install cd_drive usingpip:pip install cd_driveUsageFirstenable Google Drive API on your google accountand download thecredentials.jsonfile. With the credentials file you can start using cd_drive:fromcd_driveimportDrive# Perform oAuth flow to authorize applicationdrive=Drive('path/to/credentials.json')# Select current dirdrive.cd('Images/')# Read file from Google Drive at the current dirimg=drive.read('photo.png')# Write file on Google Drive at the current dirdrive.write('new-photo.png')
Package: cdds-demo-may
cdds_demo_mayQuick demo packageFree software: GNU General Public License v3Documentation:https://cdds-demo-may.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-05-13)First release on PyPI.
Package: cddst
[toc]项目背景目前每次我们存数据库的时候都会有这样的问题，所有的数据在同步。或者说在入库时我们需要写入库的相关代码【day by day】，本着：DRY - Don't Repeat Yourself(不要重复你自己)原则于是我想到了我们可以异步及批量数据操作器。项目构想一个API用于数据的连接数据调度分发器，用于数据的传输调度，异步每个数据的操作分为单条及批量数据的支持类型：Kafka->ES，Mongo，SqlServer项目相关技术栈MysqlCeleryRabitMQKafKa,MongoSqlServer文件说明DBOP(Database Operation)数据库操作相关代码until文件夹日常用到的工具类cd_kafka.py文件用来存储处理kafka数据的管道cd_mongo.py文件用来存储处理Mongo数据的管道cd_sqlserver.py文件用来存储处理cd_sqlserver数据的管道Kafka将Kafka进行了封装,对平时我们爬虫的一些常规数据存储做操作，利用单例模式开发支持多线程操作【加锁】为什么叫cd_Kescd_Kes:[ColourData Kafka-Es]彩数数据流通过kafka到Es的日常存储程序使用方法fromDBOP.cd_kafkaimportcd_Kesitems={'Author':'新华社新闻','AuthorID':'','Channel':'News','ClientID':'C102006','CreateTime':'2021-07-07 21:15:00','ForumName':None,'Likenumber':'0','NumberofCoins':'0','NumberofCollection':None,'NumberofPlay':'0','NumberofRead':'0','NumberofReplys':'0','Retweetnumber':'0','SearchBrand':'+(医防大咖流感系列访谈) +(流感 新冠)','SearchTime':'2021-07-07 21:15:00','ThreadId':'5e81f7274f6a8f96e35388720f7c681c','URL':'https://post.mp.qq.com/kan/article/3021573833-1522668101.html?sig=57f4d8ee405b9ed8610d5d273eb21db7&article_id=1522668101&time=1618533785&rowkey=8926078dc9658152','articleTitle':'专家呼吁医务人员重视流感病毒 提升老年群体疫苗接种率','hot':None,'label':None,'pid':'5e81f7274f6a8f96e35388720f7c681c','realChannel':'腾讯看点','replyDate':'2021-04-16 00:00:00','reply':"""流感和肺炎是导致老年人相关疾病发生和死亡的重要原因，但我国大部分地区流感疫苗接种率较低，给疾病在老年群体内传播带来了“可乘之机”。近日，中华预防医学会常务副会长兼秘书长梁晓峰教授、北京大学第三医院呼吸与危重症医学科主任孙永昌教授做客新华会客厅，就新冠肺炎和流感疫苗相关话题解答公众疑问。中华预防医学会常务副会长兼秘书长梁晓峰教授据权威专业机构估计，每年流感相关的呼吸和循环系统疾病的超额死亡率达到12.4/10万人，其中86%发生于65岁以上老年人。但各个地区老年人流感疫苗接种率普遍不高，谈及原因，梁晓峰表示，老年人疫苗接种率不高原因之一是大家对流感的重视程度不够，容易把流感和普通感冒混淆；第二是目前社会上对于流感的防控策略较少，意识较淡，下一步应该加强对流感的控制力度。“另外还有费用、流感疫苗是否纳入医保、接种不方便等一系列问题，综合导致目前老年人流感疫苗的接种率不高。”孙永昌建议，针对老年人疫苗接种率不高这一现象，未来应在政策、便利性、费用等多方面综合考量，减少民众接种压力，提升老年群体接种积极性。此外，医务人员也是流感的高危人群，感染风险高于普通人群。对于医务人员接种流感疫苗，应该注意哪些事项？对此梁晓峰表示，首先广大医务工作者要信任疫苗、了解疫苗，对疫苗的宣传要重新定位；其次，医务人员是流感的易感群体，所以也是流感疫苗接种的优先人群，应该从政策上给予支持，例如每年在秋冬季流行季之前免费对医务人员进行接种。“呼吁广大医务工作者像重视新冠肺炎一样重视流感，正确认识疫苗接种的重要性，积极接种流感疫苗，预防急性呼吸道传染病的传播。”孙永昌说。""",'thread':0,'uFans':'0'}cd_Kes.save_to_kafka(items)SqlServer将SqlServer进行了封装，会自动智能的去创建一些表和字段相关的东西，会省爬虫开发者一些时间TODO-LIST支持数据库的连接参数重写操作self.host=SQLSERVER_HOSTself.username=SQLSERVER_USERNAMEself.password=SQLSERVER_PASSWORDself.db=SQLSERVER_DB智能创建表和字段操作数据同一个表字段不同时，会到表中智能增加字段批量数据插入操作支持单例多线程加锁操作创建表时会自动报警钉钉通知消息根据数据库连接状态进行异步操作或考虑异步模块封装成我们的业务apiQ&AQ:解决触发器的问题注：相同数据库中不能有相同的触发器，虽然作用于这个表，但是他的范围是相对于数据库，相当于函数名Q:解决字段名大小写不同判断有误的问题使用字段做对比时全进行转换成小写后再对比Q:
Package: cd-dynamic-versioning
Template for Statnett Python packages on GitHubThis is a template for Python packages made with Poetry at Statnett.
The CI pipelines (workflows) are defined in.github/workflows, and there are currently two of them:deploy.ymlRuns for tags matching the pattern"*.*.*"Runs tests and linting checks and if they succeed, the package is pushed to Test-PyPI and PyPItests.ymlRuns for all pushes and all PRsRuns tests and linting checksWe hope to create a workflow for hosting documentation with Sphinx also.
Package: cde
Conditional Density Estimation (CDE)DescriptionImplementations of various methods for conditional density estimationParametric neural network based methodsMixture Density Network (MDN)Kernel Mixture Network (KMN)Normalizing Flows (NF)Nonparametric methodsConditional Kernel Density Estimation (CKDE)Neighborhood Kernel Density Estimation (NKDE)Semiparametric methodsLeast Squares Conditional Density Estimation (LSKDE)Beyond estimating conditional probability densities, the package features extensive functionality for computing:Centered moments:mean, covariance, skewness and kurtosisStatistical divergences:KL-divergence, JS-divergence, Hellinger distancePercentiles and expected shortfallInstallationTo use the library, you can directly use the python package index:pipinstallcdeor clone the GitHub repository and runpipinstall.Note that the package only supports tensorflow versions between 1.4 and 1.7.Documentation and paperSee the documentationhere. A paper on best practices and benchmarks on conditional density estimation with neural networks that makes extensive use of this library can be foundhere.UsageThe following code snipped holds an easy example that demonstrates how to use the cde package.fromcde.density_simulationimportSkewNormalfromcde.density_estimatorimportKernelMixtureNetworkimportnumpyasnp""" simulate some data """density_simulator=SkewNormal(random_seed=22)X,Y=density_simulator.simulate(n_samples=3000)""" fit density model """model=KernelMixtureNetwork("KDE_demo",ndim_x=1,ndim_y=1,n_centers=50,x_noise_std=0.2,y_noise_std=0.1,random_seed=22)model.fit(X,Y)""" query the conditional pdf and cdf """x_cond=np.zeros((1,1))y_query=np.ones((1,1))*0.1prob=model.pdf(x_cond,y_query)cum_prob=model.cdf(x_cond,y_query)""" compute conditional moments & VaR  """mean=model.mean_(x_cond)[0][0]std=model.std_(x_cond)[0][0]skewness=model.skewness(x_cond)[0]CitingIf you use CDE in your research, you can cite it as follows:@article{rothfuss2019conditional,
  title={Conditional Density Estimation with Neural Networks: Best Practices and Benchmarks},
  author={Rothfuss, Jonas and Ferreira, Fabio and Walther, Simon and Ulrich, Maxim},
  journal={arXiv:1903.00954},
  year={2019}
}Todocreating a branch just for our conditional estimators + python package
Package: cdecimal
Please note: cdecimal has been integrated into CPython 3.3, where it
supersedes the pure Python version:import decimalwill automatically
import the C version. Performance has been improved further, so the
cdecimal version shipped with CPython 3.3 is significantly faster for
numerical workload than cdecimal-2.3. If you need maximum decimal
computing performance, you should solely use that Python version.cdecimal is a fast drop-in replacement for the decimal module in Python’s
standard library for Python versions 2.5 up to 3.2. It provides a complete implementation of Mike Cowlishaw/IBM’s General Decimal Arithmetic Specification.Since cdecimal is compatible with decimal, the official documentation is
valid:http://docs.python.org/library/decimal.htmlFor the few remaining differences, see:http://www.bytereef.org/mpdecimal/doc/cdecimal/index.htmlNOTE: The safest way to get cdecimal is to use the download URL
and verify the sha256sum:d737cbe43ed1f6ad9874fb86c3db1e9bbe20c0c750868fde5be3f379ade83d8b  cdecimal-2.3.tar.gzDo not necessarily trust the above checksum. Use a search engine to ensure
that it is identical to the one in the release announcement of cdecimal-2.3.