Saravanan666/pypi-org huggingface dataset:
Package: chlearn
# 使用说明自己平时会使用的一些统计学和数学模型,目前有两个改进的朴素贝叶斯算法和一个TOPSISGitHub: [https://github.com/CheckeyZerone/Checkey-Sklearn](https://github.com/CheckeyZerone/Checkey-Sklearn)PyPI: [https://pypi.org/project/checkey-sklearn/](https://pypi.org/project/checkey-sklearn/)## 版权声明Checkey-Sklearn
Copyright (C) 2023  CheckeyZeroneThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.## 安装方法`commandline pip install chlearn `## 依赖的第三方模块包` numpy pandasscikit-learn`## 实现算法朴素贝叶斯改进熵权-TOPSIS模型## 使用方法`python model =Model(*params)model.fit(x_train[, y_train, params]) model.predict(x_test)  # or model.transform(x_test) `
Package: chlengmo
Character-Level N-Gram ModelChlengmo: ("Kling-mo") A lean, simple,fastcharacter-level n-gram model. Faster thanNLTK. Zero dependencies.Sample Usage# retrieve corpus from NLTK# NOTE: NLTK is not a dependency, only using it to fetch a training corpus.filename="melville-moby_dick.txt"text=gutenberg.raw(filename)start="Call me Ishmael"start_idx=text.index(start)text=text[start_idx:]# 15-gram modelmodel=Chlengmo(n=15).fit(text)model.generate(length=981,prompt="Call me ",seed=42)Call me Ishmael . Some years ago -- never mind how long precisely -- who knows ? Certain I am , however , the sperm whale ' s food ; and , also , calling to mind the regular , ascertained seasons for hunting him in particular that , in the internal parts of the vessel ; the becharmed crew maintaining the profoundest homage ; yea , an all - abounding adoration ! for almost all the tapers , lamps , and candles that burn round the globe , by girdling it with guineas , one to every three parts of an inch ; stabbing him in the ventricles of his heart . He was in Radney the chief mate , said ,--" Take the rope , sir -- I give it into thy hands , Starbuck watched the Pequod ' s jaw - bone tiller had several times descended from heaven by the way of this fire - ship on the sea . A short space elapsed , and up into this noiselessness came Ahab alone from his cabin . He was a small , short , youngish man , sprinkled all over his face with freckles , and wearing redundant yellow hair .Unit Tests# from inside the tests/ subfoldercdtests/# create virtual environmentvirtualenv.venv
..venv/bin/activate# install unit test dependenciespython3-mpipinstall-rrequirements.txt# run unit testspytest# run coverage reportcoveragerun-mpytest
coveragereport
coveragehtml
openhtmlcov/index.html# cleanupdeactivate
rm-rf.venvNotebooksREF:https://janakiev.com/blog/jupyter-virtual-envs/# from inside the notebooks/ subfoldercdnotebooks/# create virtual environmentvirtualenv.venv
..venv/bin/activate# install notebook dependenciespython3-mpipinstall-rrequirements.txt# create jupyter kernelpython3-mpipinstallipykernel
python3-mipykernelinstall--user--name=.venv# exit virtual environment & run jupyterdeactivatePYTHONPATH=../jupyternotebook# cleanuprm-rf.venv
Package: chloris-app-sdk
The Chloris Platform Python SDKThe Chloris Platform Python SDK (chloris-app-sdk) is a Python package that provides a convenient interface to the Chloris Platform API. It is designed to be used by both humans and machines, but if you are a human you may find it easier to use theChloris Platformweb interface. Note that the API is only available for use with premium organizations, please contact us if you are interested in using the API.See theAPI documentationfor more information about the Chloris Platform API.See thePython API referencefor the full list of functions and classes available in the SDK.InstallationTo install the Chloris Platform Python SDK run:pipinstallchloris_app_sdkUsageAuthenticationThe Chloris Platform API usesOAuth 2.0for authentication. You can authenticate using either a refresh token or an ID token. Refresh tokens are long-lived and can be used to generate new ID tokens. ID tokens are short-lived and can be used directly for authentication. Refresh tokens are recommended for use in scripts and ID tokens are recommended for use in web applications.See theChloris Platform API documentationfor more information about authentication.Listing sitesHere is an example which lists active sites in your organization, then prints the annual stock for the first site, and then the average biomass density for 2015:fromchloris_app_sdkimportChlorisAppClientfromchloris_app_sdk.utilsimportto_tco2e# create the clientclient=ChlorisAppClient(organization_id="your-organization-id",refresh_token="your-refresh-token",# env: CHLORIS_REFRESH_TOKEN# or# id_token="your-id-token" # env: CHLORIS_ID_TOKEN)# list all active sites and get the stats for the first onereporting_units=client.list_active_sites()stats=client.get_reporting_unit_stats(reporting_units[0])# print the annual stock (in tons co2e) for each yearfori,yearinenumerate(stats["annualYears"]):stock=to_tco2e(stats["annualStock"][i])print(f"{year}:{stock}tco₂e")# calculate average biomass density in t/ha for 2015:i=stats["annualYears"].index(2015)biomass_density=stats["annualStock"][i]/(stats["annualAreaKm2"][i]*100)print(f"Average biomass density in 2015:{biomass_density}t/ha")
Package: chlorophyll
ChlorophyllNoteThis module is the successor totkcode, as it is deprecated - please do not use it any more.DescriptionChlorophyll provides theCodeViewwidget for tkinter, which is aTextwidget with syntax highlighting, line numbers, and works as a simple code editor. It is written in Python and uses thepygmentslibrary for syntax highlighting and theTkLineNumsmodule for line numbers.Installationpip install chlorophyllDocumentationCodeViewWidgetOptionsDescriptionInputmasterThe parent widgetTkinter widgetlexerThe Language lexerPygments lexercolor_schemeA color scheme for the codeDict, string, or toml filetab_widthThe width of a tab (\t)Int**kwargsKeyword arguments for the widgetAny keyword arguments given to aTextwidgetBasic Usage:fromtkinterimportTkimportpygments.lexersfromchlorophyllimportCodeViewroot=Tk()codeview=CodeView(root,lexer=pygments.lexers.RustLexer,color_scheme="monokai")codeview.pack(fill="both",expand=True)root.mainloop()
Package: chloryne
Chloryne - libsodium wrapperAnother libsodium wrapper, with its own scheme.InstallationChloryne is available via PyPI:$ pip install chloryneInstallation requires the presence oflibsodium.UsageUse the up-level interfaceChloridefor a full cryptographic scheme.Key generation:fromchloryneimportChloride# lib sodium will be initialized automaticallyserver=Chloride()client=Chloride()Key export / import:server.importKey(client.exportKey())client.importKey(server.exportKey())Compute a blake2b-derived shared secret:assertserver.compute()==client.compute()NOTE: If you want a raw secret useserver.privateKey.compute(client.publicKey, raw=True)and vice versa.Signature (Ed25519):sig=server.sign(b'data')assertclient.verify(b'data',sig)NOTE: Signing messages only does not require peer key.Encryption (Curve25519XSalsa20Poly1305):ct=server.encrypt(b'data')assertclient.decrypt(ct)==b'data'NOTE: Decrypting messages only does not require peer key.Unsafe MAC (fixed key):mac=server.unsafeMAC()mac.update(b'data')digest=mac.finalize()mac=client.unsafeMAC()mac.update(b'data')assertmac.verify(digest)Safe MAC (ephemeral keys)eph,mac=server.safeMAC()mac.update(b'data')digest=mac.finalize()mac=client.safeMAC(eph)mac.update(b'data')assertmac.verify(digest)NOTE: Verifying MACs only does not require peer key.Incremental signing:fromchloride.signersimportSignersigner=Signer()signer.update(b'data')sig=signer.sign(server.privateKey)signer=Signer()signer.update(b'data')assertsigner.verify(client.peerPublicKey,sig)Password hashing:fromchloride.passwordimportPasswordimportos# password-based KDFsalt=os.urandom(32)# must be 32-bytesPassword.derive(b'password',salt)# password storagestrhash=Password.stringify(b'password')assertPassword.verify(b'password',strhash)Stream Cipher (XChaCha20):fromchloride.ciphersimportStreamCipherimportoskey=os.urandom(32)sc=StreamCipher(key)ct=sc.encrypt(b'data')+sc.nonce# other side...ct,nonce=ct[:-24],ct[-24:]sc=StreamCipher(key,nonce)assertsc.decrypt(ct)==b'data'NOTE:nonceisb''before callingencryptif not provided via constructor.Store a chloride:sk=server.privateKey.exportKey()# sk is a bytes object that can be stored anywhereserver=Chloride(sk)
Package: chmod
chmod-calculatorThis is a python module for calculating chmod.
This is my first module so it will have some bugs.How to useAfter runningpip install chmod, you can use it in Pythonimportchmoda=chmod.ChmodConversion()# Octal to Symbolicprint(a.int_to_perm(172))# Symbolic to Octalprint(a.perm_to_int("--xrwx-w-"))
Package: chmod-monkey
python-chmod-monkeyAdd support foros.chmod('script.sh', 'ug+x')syntax style.Almost any expression supported byGNU Coreutils chmodshould be supported by this module.[ugoa]*([-+=]([rwx]*|[ugo]))+|[-+=][0-7]+Xstflags are not supported though.Installpip install chmod-monkeyUsageThere are two ways to usechmod-monkey.Using os.chmod MonkeyPatchimportosimportchmod_monkeychmod_monkey.install()# Install monkeypatch because we are evil !os.chmod('script.sh','ug+x')# Magic :)Using to_mode converterimportosfromchmod_monkeyimportto_modeos.chmod('script.sh',to_mode('script.sh','ug+x'))# For serious people.Other featuresContext managerYou may use the following syntax to temporary change a file mode.fromchmod_monkeyimporttmp_chmodwithtmp_chmod('script.sh',"+w"):pass# File permissions are modified in this block only# File permissions are restored hereHistory1.1.1 (2020-05-12)Addexception_in_contextoption totmp_chmodand more data in context manager.1.1.0 (2020-05-12)Addtmp_chmodfunction to temporary apply a permission on a file in awithstatement.1.0.0 (2020-05-11)First version
Package: chmod-reset
Python package to reset chmod recursivelyInstallWithpip:$pipinstallchmod_resetWith thesource files:$gitclonehttps://github.com/seignovert/python-chmod-reset.git$cdchmod_reset;pythonsetup.pyinstallUsagereset-chmod-h# For helpreset-chmod[-q]<FOLDER_NAME># [-q] `quiet` optional>>>importchmod_reset>>>chmod_reset.scan('.')
Package: chmpy
chmpyA library for computational chemistry in python.Documentation»Report a bug·Request a new featurechmpy supports handling molecules, crystals, Hirshfeld & promolecule
density isosurfaces, spherical harmonic shape descriptors and much more...InstallationBasic installation can be done through the python package managerpip:pipinstallchmpy# or to install directly from GitHub:pipinstallgit+https://github.com/peterspackman/chmpy.gitFor development or modifications, install locally using pip:pipinstall-e.FeaturesWhile the library is intended to be flexible and make it easy to build
complex pipelines or properties, the following is a brief summary of
intended features:Load crystal structures from.cif,.res,POSCARfiles.Evaluate promolecule and procrystal electron densities.Easily generate Hirshfeld or promolecule isosurfaces and associated properties.Easily generate spherical harmonic shape descriptors for atoms, molecules, or molecular fragments.Efficiently calculate crystal slabs, periodic connectivity and more...Automatic parallelization of some calculations using OpenMP (set theOMP_NUM_THREADSenvironment variable)It should also serve as a simple, easy to read library for learning
how to represent crystal structures, molecules etc. and evaluate
scientifically relevant information quickly and efficiently using
python.ExamplesCrystal structures and moleculesLoading a crystal structure from a CIF (.cif) or SHELX (.res)
file, or a molecule from an XMOL (.xyz) file is straightforward:fromchmpyimportCrystal,Moleculec=Crystal.load("tests/acetic_acid.cif")print(c)# <Crystal C2H4O2 Pna2_1># Calculate the unique molecules in this crystalc.symmetry_unique_molecules()# [<Molecule: C2H4O2(2.12,1.15,0.97)>]m=Molecule.load("tests/water.xyz")print(m)# <Molecule: H2O(-0.67,-0.00,0.01)>Hirshfeld and promolecule density isosurfacesHirshfeld and promolecule density isosurfacesGeneration of surfaces with the default settings can be done with
minimal hassle, simply by using the corresponding members of the Crystal
class:c=Crystal.load("tests/test_files/acetic_acid.cif")# This will generate a high resolution surface# for each symmetry unique molecule in the crystalsurfaces=c.hirshfeld_surfaces()print(surfaces)# [<trimesh.Trimesh(vertices.shape=(3598, 3), faces.shape=(7192, 3))>]# We can generate lower resolution surfaces with the separation parametersurfaces=c.hirshfeld_surfaces(separation=0.5)print(surfaces)# [<trimesh.Trimesh(vertices.shape=(584, 3), faces.shape=(1164, 3))>]# Surfaces can be saved via trimesh, or a utility function provided in chmpyfromchmpy.util.meshimportsave_meshsave_mesh(surfaces[0],"acetic_acid.ply")The resulting surface should look something like this when visualized:
Package: chncal
中国节假日判断某年某月某一天是不是工作日/节假日。修改自chinese_calendar：github:chinese-calendar, pypi:chinese-calendar在chinese_calendar的基础上增加了从2001到2003年的数据。增加了A股交易日和公历农历干支转换相关函数（日期参数均可传字符串或整数格式）：get_recent_workday：最近的工作日get_next_nth_workday：往后（前）推n个工作日get_work_dates：取指定起止日期内的工作日列表is_tradeday：判断是否为沪深A股交易日get_recent_tradeday：最近交易日get_next_nth_tradeday：往后（前）推n个交易日get_trade_dates：取指定起止日期内的交易日期（周内的工作日）列表get_xingzuo：获取日期所属星座get_tgdz_year：计算（农历）年份天干地支gen2lun：公历日期转农历日期lun2gen：农历日期转普通日期（日期只能传字符串格式，形如'2023.02.30'）gen2gz：公历日期转干支纪日法get_tgdz_hour：公历时间（小时）转干支纪时法get_bazi：根据公历时间生成八字get_bazi_lunar：根据农历时间生成八字（时间只能传字符串格式，形如'2023.02.30 19:30:20'分和秒可以不写）fate_weight：称命，传入公历时间fate_weight_lunar：称命，传入农历时间（时间只能传字符串格式，形如'2023.02.30 19:30:20'分和秒可以不写）zodiac_match：生肖合婚信息get_zodiac_match：根据公历时间获取生肖合婚信息get_zodiac_match_lunar：根据农历时间获取生肖合婚信息（时间只能传字符串格式，形如'2023.02.30 19:30:20'时分秒可以不写）安装：pip install chncal --upgradeGithub：chncalPypichncal感谢使用和支持！
Package: chnese-encrypt-or-decrypt
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: choba
chobaWrapper to simplify calls to pythonunittest,coverageandwebtest.Installation$pipinstallchoba
$choba-h
Usage:choba[-hl][-s<submodule>][-f<filter>]<dir>Usage$exportPYTHONPATH=`pwd`/src
$choba<your_test_directory>The call will internally process./.coveragerc. HTML and
Cobertura-compatible XML code coverage report are automatically
generated.sample configuration.coveragerc:[run]
source = src
omit =
    src/myproject/__init__.py
    src/myproject/daemon.py
    */__main__.py

[html]
directory = docs/coverage

[xml]
output = docs/coverage/coverage.xml

[report]
exclude_lines = if __name__ ==In choba,branch coverageis always true regardless what you put in the configuration file.sample module:# ./src/myproject/common/utils.pyimportredefflatten(text):"""Remove line breaks and trim."""text=re.sub(r'[\r\n\t]+',' ',text)text=re.sub(r'  +',' ',text)returntext.strip()sample test:# ./tests/common/utils.pyimportunittest# test against ./src/myproject/common/utils.pyfrommyprojectimportutilsclassTestCommon(unittest.TestCase):deftest_myfunc(self):text="\raaa\nbbb\t\r\n"self.assertEquals("aaa bbb",utils.flatten(text))
Package: chobo
choboThe chobo module is a forked version of theintrographicsmodule developed byDr. Lisa Torrey.It allows you to create graphical displays in your Python 3 programs.
The name chobo (초보) is a Korean word that means a beginner/novice, and the name is to inspire beginners at programming to give it a try.It is written inPython 3, and uses thepygamemodule as the back-end, and adds the following features:Image files other than just GIFArc as a new shapeAn empty image shapeShape rotationsUse of any system fontsSound/music files and their playbackThe full documentation is available in thedocfolder.
Package: choc-ddp
choc_ddppipinstallchoc-ddp#推荐poetryaddchoc-ddp示例importasynciofromloguruimportloggerfromchoc.ddp.chocolateimportChocoasyncdeftest():asyncwithChoco()asc:resp=awaitc.deduplication(input("待去重：\n"),3)logger.info(resp)if__name__=='__main__':loop=asyncio.get_event_loop()loop.run_until_complete(test())
Package: choclo
Kernel functions for your geophysical modelsDocumentation(latest)•Documentation(main branch)•Contributing•ContactPart of theFatiando a TerraprojectAboutChoclois a Python library that hosts optimized kernel functions for
running geophysical forward and inverse models, intended to be used by other
libraries as the underlying layer of their computation.
"Choclo" is a term used in some countries of South America to refer to corn,
originated from thequechuawordchuqllu.Project goalsProvide optimized kernel functions for gravity and magnetic forward and
inverse models that can be easily harnessed by different geophysical
libraries.Generate a pure-Python library that could be easily distributed and installed
on any operating system.Rely onNumbafor just-in-time compilations and
optional parallelization.Keep the dependencies to the bare minimum to encourage other libraries to
depend on Choclo.Project statusChoclo is ready for use but still changing.This means that we sometimes break backwards compatibility as we try to
improve the software based on user experience, new ideas, better design
decisions, etc. Please keep that in mind before you update Choclo to a newer
version.We welcome feedback and ideas!This is a great time to bring new ideas on
how we can improve the project.Join the conversationor submitissues on GitHub.Getting involved🗨️Contact us:Find out more about how to reach us atfatiando.org/contact.👩🏾‍💻Contributing to project development:Please read ourContributing Guideto see how you can help and give feedback.🧑🏾‍🤝‍🧑🏼Code of conduct:This project is released with aCode of Conduct.
By participating in this project you agree to abide by its terms.Imposter syndrome disclaimer:We want your help.No, really.There may be a little voice inside your
head that is telling you that you're not ready, that you aren't skilled
enough to contribute. We assure you that the little voice in your head is
wrong. Most importantly,there are many valuable ways to contribute besides
writing code.This disclaimer was adapted from theMetPy project.LicenseThis is free software: you can redistribute it and/or modify it under the terms
of theBSD 3-clause License. A copy of this license is provided inLICENSE.txt.
Package: chocochip
ChocochipThis is my first repository that will be published to PyPIGoal 1: Publishing to PyPICreating project structureClone the Github repository locally.Create a subfolder with the same name as the package. We will refer this as primary subfolder.Create a file namedinit.py inside the primary subfolderInside the primary subfolder create a python file with the same name as the package name.Create a file named requirements_dev.txtAdding requirementsFirst of all identify the latest versions of pip and wheel and add them to the requirements_dev.txtNow install it usingpip install -r requirements_dev.txtAdding first functionNow add code to your main python file. In my case itschocochip.pyHere is my code snippetdefgive_me_a_cookie(name:str):"""This function gives a cookie to the person who calls itArgs:name (str): Name of the personReturns:str: Name of the person"""print(f'Hi{name}! Here is your cookie again and again')returnnameAdd setup.py fileHere is my templatefromsetuptoolsimportsetup,find_packageswithopen("README.md","r")asreadme_file:readme=readme_file.read()setup(name="chocochip",version="0.0.1",author="Vignesh Baskaran",author_email="vignesh.sbaskaran@gmail.com",description="A package to provide you Chocochip cookies",long_description=readme,long_description_content_type="text/markdown",url="https://github.com/VigneshBaskar/chocochip",packages=find_packages(),classifiers=["Programming Language :: Python :: 3.7","License :: OSI Approved :: GNU General Public License v3 (GPLv3)",],)Install twineFind the latest version of twine on PyPIAdd it to the requirements_dev.txt and install it usingpip install -r requirements_dev.txtCommiting and Pushing the code to GithubAdd and commit the modified files until now. In my case they are:README.mdrequirements_dev.txtchocochip/init.pychocochip/chocochip.pysetup.pyPush the files to remote branchReferences:https://towardsdatascience.com/build-your-first-open-source-python-project-53471c9942a7https://stackoverflow.com/a/33685899/6882624
Package: chocolate
ChocolateChocolateis a Python package that improves Python's**kwargs.fromchocolateimportfilter_args# Here is some function.defexample_function(arg1,arg2:int,arg3=3,arg4:str=""):print(f"{arg1}{arg2}{arg3}{arg4}")# We can give this function a dictionary of arguments using **kwargs.kwargs={"arg1":1,"arg2":2,"arg4":"4"}example_function(**kwargs)# But what if the **kwargs dictionary has additional keys?broken_kwargs={"arg1":"This","arg2":"does","undefined_arg":"not","arg3":"work"}try:example_function(**broken_kwargs)exceptExceptionasexception:print(exception)# Chocolate can take care of that!example_function(**filter_args(broken_kwargs,example_function))
Package: chocolatey-choco
pychocoMinimal choco command for use on non-Windows platforms.Installationpipinstallchocolatey-chocoCommand line usageUsage: choco [OPTIONS] COMMAND [ARGS]...

  Root command.

Options:
  --help  Show this message and exit.

Commands:
  apikey
  config
  new
  pack
  push
  searchsearchis not 1:1 with the officialchococommand in behaviour.