Saravanan666/pypi-org huggingface dataset:
Package: cmfd
Chinese Moral Foundation Dictionary 2.0Chinese Moral Foundation Dictionary 2.0 for Python.  This project was inspired byhttps://github.com/civictechlab/cmfdIntroductionThe Chinese Moral Foundation Dictionary 2.0 (C-MFD 2.0) is a dictionary to assist the automated moral intuition detection and analysis in the Chinese language context. Starting from the existing Chinese translation of the English MFD, two experts selected additional Chinese moral concepts and used word2vec to fetch related words from an extensive Chinese dictionary. Four experts went through four-rounds of coding, followed by the validation from 202 crowd coders. The CMFD identifies not only the classic five moral foundations but also several potentially novel moral foundation candidates.Team membersDevloped by Weiyu Zhang (National University of Singapore) and Yixiang Calvin Cheng (Oxford University), with assistance by Zhuo Chen (Shenzhen University), Yipeng Xi (Shanghai Jiaotong University), Haodong Liu (City University of Hong Kong) and Chuyao Wang (King's College London)Exampletext_test = """
她一见他就倾心， 但他却偏要为非作歹。 结果两人败俱伤， 她心碎， 他惨遭报应。
他本来是一个英勇战斗的将军， 但因为一纸空文， 被诬陷入狱。 再加上尔虞我诈的诡计， 他最终丧失了自己的荣誉和尊严。
他曾认为自己是无所不能， 却不知道一念之间， 一切都会化为乌有。 如果他当初没有欺骗她， 如果他当初没有撕毁那张契约， 也许他们现在还在幸福的生活中。
现在， 他身陷囹圄， 只能思念那些曾经的日子。 他懊悔不已， 只能悔恨自己的软弱和自私。 他希望能有机会改正错误， 重新取回自己的荣誉， 但现实却是那么残酷。"""importcmfdresult=cmfd.moral_quantity(text_test,duplicate=False,with_word=True)print(result){'altr': {'num': 0.0, 'word': ''},
'auth': {'num': 0.21428571428571427, 'word': '荣誉;将军;都会'},
'care': {'num': 0.2857142857142857, 'word': '为非作歹;心碎;残酷;惨遭'},
'dili': {'num': 0.0, 'word': ''},
'fair': {'num': 0.2857142857142857, 'word': '一纸空文;报应;尔虞我诈;欺骗'},
'general': {'num': 0.07142857142857142, 'word': '幸福'},
'libe': {'num': 0.0, 'word': ''},
'loya': {'num': 0.07142857142857142, 'word': '英勇战斗'},
'mode': {'num': 0.0, 'word': ''},
'resi': {'num': 0.0, 'word': ''},
'sanc': {'num': 0.07142857142857142, 'word': '尊严'},
'wast': {'num': 0.0, 'word': ''}}
Package: cmf.pt
OverviewThe cmf.pt package allows using the Chameleon template engine with the
Zope 2 CMF.UsageTo enable Chameleon, simply include the ZCML configuration:<include package="cmf.pt" />For general information about Chameleon, seehttp://chameleon.repoze.org/.Changelog1.0 - 2010-05-12Correct binding of templates. This fixes problems handling args when
renderingn templates. [malthe]0.6 - 2009-10-25Added az3c.autoinclude.pluginentry point to avoid the need for a ZCML
slug in Plone.
[hannosch]0.5 - 2009-07-24Extend the ignore_re list of CMFCore.DirectoryView to ignore our cache
files named.<original extension>.py. [hannosch]0.4 - 2009-05-18Avoid a deprecation warning for Globals.InitializeClass. [hannosch]0.3 - 2009-02-13Added_execmethod to the file-system based skin template class, largely
carried over fromProducts.PageTemplates. [malthe]0.2 - 2008-12-17Thefunc_codeattribute of file-system page templates should simulate a
function taking no arguments. [malthe]0.1 - 2008-11-29Initial release. [malthe]
Package: cmft
commit message from testcommit-message-from-test (cmft in short) is tiny filter program to extract possible commit messages from changed files based on test names.My motivation for writing it was to use withtcr. While coding, I don't like to be interrupted to enter some meaningful commit description, but at the same time I don't like completly useless "working". So I came out with something in the middle: commit descriptions based on test names.Example usage withtcrandfzf:$ tcr red `git diff HEAD | cmft | fzf --print-query | tail -n 1`
Package: cmgp
Bayesian Inference of Individualized Treatment Effects using Multi-task Gaussian ProcessesCode Author: Ahmed M. AlaaPaper: Ahmed M. Alaa, Mihaela van der Schaar, "Bayesian Inference of Individualized Treatment Effects using Multi-task Gaussian Processes", NIPS 2017.DescriptionPredicated on the increasing abundance of electronic health records, we investigate the problem of inferring individualized treatment effects using observational
data. Stemming from the potential outcomes model, we propose a novel multitask learning framework in which factual and counterfactual outcomes are modeled as the outputs of a function in a vector-valued reproducing kernel Hilbert space (vvRKHS). We develop a nonparametric Bayesian method for learning the treatment effects using a multi-task Gaussian process (GP) with a linear coregionalization kernel as a prior over the vvRKHS. The Bayesian approach allows us to compute individualized measures of confidence in our estimates via pointwise credible intervals, which are crucial for realizing the full potential of precision
medicine. The impact of selection bias is alleviated via a risk-based empirical Bayes method for adapting the multi-task GP prior, which jointly minimizes the
empirical error in factual outcomes and the uncertainty in (unobserved) counterfactual outcomes. We conduct experiments on observational datasets for an interventional social program applied to premature infants, and a left ventricular assist device applied to cardiac patients wait-listed for a heart transplant. In both experiments, we show that our method significantly outperforms the state-of-the-art.Installation$pipinstallcmgpExample UsagefromcmgpimportCMGPfromcmgp.datasetsimportloadfromcmgp.utils.metricsimportsqrt_PEHE_with_diffX_train,W_train,Y_train,Y_train_full,X_test,Y_test=load("twins")model=CMGP(X_train,W_train,Y_train,max_gp_iterations=100)pred=model.predict(X_test)pehe=sqrt_PEHE_with_diff(Y_test,pred)print(f"PEHE score for CMGP on{dataset}={pehe}")ReferencesBayesian Inference of Individualized Treatment Effects using Multi-task Gaussian ProcessesLimits of Estimating Heterogeneous Treatment Effects:Guidelines for Practical Algorithm DesignJ. L. Hill. Bayesian Nonparametric Modeling for Causal Inference. Journal of Computational and Graphical Statistics, 2012.
Package: cm-http-api
A Solution to get timetable automaticallyThis is designed at first to get excel timetable fromhttp://my.cqu.edu.cn/enroll/but failed at last because of js Ajax loading of specific page. I tried every method I can but gave up at last.So this solution maybe design for getting token for logging in process as we have known that all requests need this
token.UsageRefer tomainfunction ofmain.pyas a demo, and docstring ofcm_httpclass.To Listget tokenget json format timetableparsing timetable.json translate it toxlsxformat for exampleusing incqu_timetable_newAlthough I'd like to use these scripts on desktop, more people seem to get an automatically one.Another reason why I have to build this is that I hate the newwecquunder theStudent Union of CQU. I'd like to use
AGPL to force them ether opensource of their code or make another one without my function.LicenseAGPL 3.0
Package: cmif
Synopsiscmifis a Python package for creating and retrieving data inCMI format. It has been developed as part of theDikon project(2019–2020) at theInterdisciplinary Centre for European Enlightenment Studies.InstallationYou can install this package viaPyPI:pipinstallcmif… or by cloning the repository:gitclonehttps://github.com/herreio/cmif.git--recurse-submodulescdcmif# create and activate virutalenvutils/setupsourceenv/bin/activateDocumentationThe documentation can be found onRead the Docs.To build the documentation from the files found at docs:cddocsmakehtmlTestIn case you cloned the repository, you can run a unittest:python-munittesttest.creationSee AlsoThe Python command line interfacecsv2cmi, written byK. Rettinghaus, allows to create files in CMI format from CSV input.
Package: cmip
cmip一个高效的信息处理库。安装pipinstall-Ucmip用法1. 动态渲染异步爬虫example:fromcmip.webimportweb_scrapingimportasynciourls=["https://baidu.com","https://qq.com",# ...More URL]asyncio.run(web_scraping(urls,output_path="output",max_concurrent_tasks=10,save_image=True,min_img_size=200))参数含义：urls网页链接（包含协议头）output_path输出路径max_concurrent_tasks最大同时执行任务数，根据自身机器资源和网络情况调整save_image是否保存图片min_img_size当图片小于这个值时不爬取
Package: cmip6d
cmip6dThis python library downloads downscaled climate change scenarios from NASA NEX-GDDP-CMIP6 (https://ds.nccs.nasa.gov/thredds/catalog/AMES/NEX/GDDP-CMIP6/catalog.html).InstructionsTo use this library install the requirements:wgetcsvnumpypandasxarraybeautifulsoup4If you are using windows, wget needs to be downloaded and added to your paths
If you don't want to get the .csv summary you do not need xarray, but it is highly recommended for post-processing.Installpip install cmip6dExamplesTo import the library:fromcmip6dimportcmip6dDefine the main variables. Untilout_path='test'# Defines your output foldercoords=[-75,-69.5,-17.5,-14]# xmin,xmax,ymin,ymaxmodels=[]# If empty, downloads everything, if not, downloads specified packagesssp=['ssp245','ssp585']# DEFAULT VARIABLE. Target scenarios from the NASA servervariables=['pr','tasmax','tasmin']# DEFAULT VARIABLE. Target variables from the NASA serverTo create the main Python object:cc=cmip6d(out_path,coords,models,variables=variables,ssp=ssp)First, it creates the folder structure based on the MODELS, then it generates a "link.txt" file with the links to be downloaded. The "check_links" argument allows you to not re-create the "link.txt" file if it already exists.cc.get_links(out_path,check_links=True)To download the links you need to specify a number of workers "nworker", which speeds up the download. Once completed these step you will have all the netcdf files for your climate change model, these can be loaded with xarray or whatever other method you prefer.cc.download_links(nworker=4)If you want to merge the yearly individual ".nc" files into one for each variable use:cc.merge_files(cont)Additional stepsIf you would like to get 2 ".csv" files with coordinates of the following structure:IDLatitudeLongitudeP_0_0.........P_0_1.....................andDateP_0_0P_0_1...2015-01-01............2015-01-02...........................You can use the following function after running "merge_files", where "cont=True" does not process the data if the files already exist. This function returns a dictionary of the climate change models and dates that were not processed because of missing dates in the timeserie from 2015-01-01 to 2100-12-31.todel=cc.get_csv(cont)
Package: cmip6-data-citation-generator
_____ __  __ _____ _____   __      _                   _____        _
  / ____|  \/  |_   _|  __ \ / /     (_)                 |  __ \      | |
 | |    | \  / | | | | |__) / /_      _ ___  ___  _ __   | |  | | __ _| |_ __ _
 | |    | |\/| | | | |  ___/ '_ \    | / __|/ _ \| '_ \  | |  | |/ _` | __/ _` |
 | |____| |  | |_| |_| |   | (_) |   | \__ \ (_) | | | | | |__| | (_| | || (_| |
  \_____|_|  |_|_____|_|    \___/    | |___/\___/|_| |_| |_____/ \__,_|\__\__,_|
                                    _/ |
                                   |__/

  _____ _ _        _   _                _____                           _
 / ____(_) |      | | (_)              / ____|                         | |
| |     _| |_ __ _| |_ _  ___  _ __   | |  __  ___ _ __   ___ _ __ __ _| |_ ___  _ __
| |    | | __/ _` | __| |/ _ \| '_ \  | | |_ |/ _ \ '_ \ / _ \ '__/ _` | __/ _ \| '__|
| |____| | || (_| | |_| | (_) | | | | | |__| |  __/ | | |  __/ | | (_| | || (_) | |
 \_____|_|\__\__,_|\__|_|\___/|_| |_|  \_____|\___|_| |_|\___|_|  \__,_|\__\___/|_|BasicsCitationsRepository healthLatest releasesLatest activityLicenseThe CMIP6 Data Citation Generator is free software under a BSD 2-Clause License, seeLICENSE.
If you make any use of the CMIP6 Data Citation Generator, please cite the relevantZenodo release.InstallationThe CMIP6 Data Citation Generator can be installed withpip.# if you're using a virtual environment, make sure you're in itpipinstallcmip6-data-citation-generatorDocumentationDocumentation can be found on ourdocumentation pages(we are thankful toRead the Docsfor hosting us).
Package: cmip6-downscaling
climate downnscaling using cmip6 datacarbonplan / cmip6-downscalingNote: This project is under active development. We expect to make breaking changes until reaching version 1.0.0.This repository includes our tools/scripts/models/etc for climate downscaling. This work is described in more detail in aweb articlewith
a companionmap toolto explore the data. We encourage you to reach out if you are interested in using the code or datasets byopening an issueorsending us an email.installpipinstall-e.usagefromcmip6_downscaling.methodsimport...data accessThere are two ways to access the data using Python.First, the entire collection of datasets at daily timescales is available through anintakecatalog using the following code snippet.import intake
cat = intake.open_esm_datastore(
  'https://cpdataeuwest.blob.core.windows.net/cp-cmip/version1/catalogs/global-downscaled-cmip6.json'
)You can check out this exampleJupyter notebookto see how to access the data, perform some simple analysis, and download subsets.You can also access the data by using the URL of an individual dataset. Seethe datasets pagefor a table of all available datasets in this collection with storage locations and other metadata. A code snippet showing how to use the URL is shown below:import xarray as xr
xr.open_zarr('https://cpdataeuwest.blob.core.windows.net/cp-cmip/version1/data/DeepSD/ScenarioMIP.CCCma.CanESM5.ssp245.r1i1p1f1.day.DeepSD.pr.zarr')licenseAll the code in this repository isMITlicensed. Some of the data provided by this API is sourced from content made available under aCC-BY-4.0license. We include attribution for this content, and we please request that you also maintain that attribution if using this data.about usCarbonPlan is a non-profit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of carbon removal and climate solutions through open data and tools. Find out more atcarbonplan.orgor get in touch byopening an issueorsending us an email.
Package: cmip6-preprocessing
Science is not immune to racism. Academia is an elitist system with numerous gatekeepers that has mostly allowed a very limited spectrum of people to pursue a career. I believe we need to change that.Open source development and reproducible science are a great way to democratize the means for scientific analysis.But you can't git clone software if you are being murdered by the police for being Black!Free access to software and hollow diversity statements are hardly enough to crush the systemic and institutionalized racism in our society and academia.If you are using this package, I ask you to go beyond just speaking out and donateheretoData for Black LivesandBlack Lives Matter Action.I explicitly welcome suggestions regarding the wording of this statement and for additional organizations to support. Please raise anissuefor suggestions.cmip6_preprocessingAre you interested in CMIP6 data, but find that is is not quiteanalysis ready? Do you just want to run a simple (or complicated) analysis on various models and end up having to write logic for each seperate case, because various datasets still require fixes to names, coordinates, etc.? Then this package is for you.Developed during thecmip6-hackathonthis package provides utility functions that play nicely withintake-esm.We currently support the following functionsPreprocessing CMIP6 data (Please check out thetutorialfor some examples using thepangeo cloud). The preprocessig includes:
a. Fix inconsistent naming of dimensions and coordinates
b. Fix inconsistent values,shape and dataset location of coordinates
c. Homogenize longitude conventions
d. Fix inconsistent unitsCreating large scale ocean basin masks for arbitrary model outputThe following issues are under development:Reconstruct/find grid metricsArrange different variables on their respective staggered grid, so they can work seamlessly withxgcmCheck out this recent Earthcubenotebook(cite via doi:10.1002/essoar.10504241.1) for a high level demo ofcmip6_preprocessingandxgcm.InstallationInstallcmip6_preprocessingvia pip:pip install cmip6_preprocessingor conda:conda install -c conda-forge cmip6_preprocessingTo install the newest master from github you can use pip aswell:pip install git+pip install git+https://github.com/jbusecke/cmip6_preprocessing.git
Package: cmip-basins
cmip_basinsis a Python package in the public domain
that generates 2-dimensional basin masks for arbitraty
ocean model grids. The tool supports both standard (i.e. “lat-lon”)
and non-standard (e.g. “tripolar) ocean model grids.The package provides two types of basin codes:Classic 10-code CMIP specificationsMore detailed sub-regions developed at GFDLMore InformationSource code:http://github.com/jkrasting/cmip_basins
Package: cmipdata
Introductioncmipdatais a python package for preprocessing and analysis of climate model
data in standardized NetCDF files, such as those used in the Coupled Model
Intercomparison Project (CMIP). With cmipdata processing hundreds of NetCDF files
that make up a large model ensemble is easy.cmipdatais the python wrapper
that intelligently interfaces with the ensemble of model data, while the underlying
data processing is done efficiently and transparently usingClimate Data Operators (cdo).
Limited functionality for loading processed data intonumpyarrays and making basic plots is also provided.Common operations and some example analyses that can be applied across the whole
model ensemble with only one or two commands are:joining model time-slices (or experiments)spatial remapping to a common gridselecting a specific time-interval or spatial regioncomputing a climatology or an anomalycalculating an area mean or integralcalculating more advanced metrics such as Arctic sea-ice extentDocumentationDocumentation is rendered athttps://cmipdata.readthedocs.organd is included in the
docs/ directory.ContributorsNeil Swart, CCCma, Environment Canada:Neil.Swart@canada.caDavid Fallis, University of Victoria:davidwfallis@gmail.comPull requests and comments are welcome.LICENSESee the LICENSE.txt file in the cmipdata package. cmipdata is distributed
under the GNU General Public License version 2, and the Open Government
License - Canada (http://data.gc.ca/eng/open-government-licence-canada)
Package: cmip-metric
CMIP - Conditional Mutual Information with the logging PolicyCMIP implementation from the 2023 SIGIR paper:An Offline Metric for the Debiasedness of Click Models.The metric quantifies the mutual information between a new click model policy and the production system that collected the train dataset (logging policy), conditional on human relevance judgments. CMIP quantifies the degree of debiasedness (see paper for details). A policy is said to be debiased w.r.t. its logging policy with acmip <= 0.Exampleimportnumpyasnpn_queries=1_000n_results=25# Human relevance annotations per query-document pairy_true=np.random.randint(5,size=(n_queries,n_results))# Relevance scores of the logging policyy_logging_policy=y_true+np.random.randn(n_queries,n_results)# Relevance scores of a new policy (in this case, strongly dependent on logging policy)y_predict=y_logging_policy+np.random.randn(n_queries,n_results)# Number of documents per query, used for maskingn=np.full(n_queries,n_results)fromcmip_metricimportCMIPmetric=CMIP()metric(y_predict,y_logging_policy,y_true,n)>0.2687# The policy predicting y_predict is not debiased w.r.t. the logging policy.Installationpip install cmip-metricReferenceNote: To be published at:@inproceedings{Deffayet2023Debiasedness,
  author = {Romain Deffayet and Philipp Hager and Jean-Michel Renders and Maarten de Rijke},
  title = {An Offline Metric for the Debiasedness of Click Models},
  booktitle = {Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR`23)},
  organization = {ACM},
  year = {2023},
}LicenseThis project uses theMIT license.
Package: cmislib
ABOUTThanks for using cmislib, the CMIS client library for Python.The goal of this library is to provide an interoperable API to CMIS
repositories such as Alfresco, Nuxeo, KnowledgeTree, MS SharePoint,
EMC Documentum, and any other content repository that is CMIS-compliant.More info on CMIS can be found at:http://www.oasis-open.org/committees/cmisSOURCEThe source code for this project lives athttp://chemistry.apache.org/TESTSThere are unit tests available in the tests directory. They require access
to a CMIS provider. There are many freely-available CMIS repositories
available to run locally or that are hosted.DOCDocumentation that tells you what this is all about can be found in the doc
directory. Please see the doc for dependencies, required CMIS version level,
required Python version, etc.
Package: cmislib3
ABOUTThanks for using cmislib, the CMIS client library for Python v. >= 3.The goal of this library is to provide an interoperable API to CMIS
repositories such as Alfresco, Nuxeo, KnowledgeTree, MS SharePoint,
EMC Documentum, and any other content repository that is CMIS-compliant.More info on CMIS can be found at:http://www.oasis-open.org/committees/cmisSOURCEThe source code for this project implemented for Python 2 lives athttp://chemistry.apache.org/.
The source code for this project implemented for Python 3 lives athttps://github.com/luca-92/cmislib3.TESTSThere are unit tests available in the tests directory. They require access
to a CMIS provider. There are many freely-available CMIS repositories
available to run locally or that are hosted.DOCDocumentation that tells you what this is all about can be found in the doc
directory. Please see the doc for dependencies, required CMIS version level,
required Python version, etc.
Package: cmislib-maykin
ABOUTThanks for using cmislib, the CMIS client library for Python.The goal of this library is to provide an interoperable API to CMIS
repositories such as Alfresco, Nuxeo, KnowledgeTree, MS SharePoint,
EMC Documentum, and any other content repository that is CMIS-compliant.More info on CMIS can be found at:http://www.oasis-open.org/committees/cmisThis is a fork fromhttps://github.com/apache/chemistry-cmisliband update to work with
Python 2.7 and 3.5.SOURCEThe source code for this project lives athttp://chemistry.apache.org/TESTSThere are unit tests available in the tests directory. They require access
to a CMIS provider. There are many freely-available CMIS repositories
available to run locally or that are hosted.DOCDocumentation that tells you what this is all about can be found in the doc
directory. Please see the doc for dependencies, required CMIS version level,
required Python version, etc.NOTES:This is a working version, and has been tested on Python 3.5 and Alfresco Community - 5.1.0 (r127059-b7)