Saravanan666/pypi-org huggingface dataset:
Package: khoshnevis
Khoshnevis (خوشنويس)Python package fornormalizingPersian text.Text CleaningURL RemoverEmoji RemoverText TokenizationPunctuation Space CorrectionHalf Space Correction (usingParsivar)Standardize AlphabetNLTKcompatiblePython 3 supportUsage>>>fromkhoshnevisimportNormalizer>>>normalizer=Normalizer()>>>normalizer.normalize(text="استفاده از نیم‌فاصله متن را زیبا مي كند",zwnj="\u200c",clean_url=False,remove_emoji=False)text (str): input textzwnj (str, optional): Zero-width non-joiner character. Defaults to "\u200c".clean_url (bool, optional): removes all URLs from text. Defaults to True.remove_emoji (bool, optional): removes all emojis from the text. Defaults to True.InstallationThe latest stable version of Hazm can be installed throughpip:pip install khoshnevisCitation info@misc{khoshnevis,author={HamidReza Attar, Milad Lotfi, Saied Alimoradi},title={Khoshnevis, a Python library for Persian text preprocessing},year={2022},url={https://www.khodnevisai.com/},}
Package: khufu_javascript
Introduction============*khufu_javascript* provides various ways for including Javascript intoyour Khufu/Pyramid app.Dojo Support============``khufu_javascript.dojo`` provides support for working with Dojo.Usage-----Setting up khufu_javascript.dojo is easy.::# config must be an instance of pyramid.config.Configuratorconfig.include('khufu_javascript.dojo')config.register_script_dir('myproject:javascripts')The previous example will iterate over all *.js files in the ``javascripts``directory relative to the ``myproject`` package (``register_script_dir`` takesan asset spec).  For each .js file found it scans for a "dojo.provides('foo')"entry and registers that module with khufu_javascript.After having registered scripts, they can be accessed via the ``dojo`` viewat the root of the site.  If one of the javascripts found has"dojo.provides('foo.bar')" then the dojo view will provide::http://127.0.0.1:8080/dojo/foo/bar.jsAnyone working with Dojo modules knows that there still needs to a wayto tell Dojo to look at */dojo/whatever* when looking up non-core modules.Dojo handles this with *djConfig* which can be used to setup module loadpaths.After having registered scripts, inside of your views you can simply call``khufu_javascript.dojo.render_header``.::# views.pyfrom khufu_javascript.dojo import render_header@view_config('myview', renderer='templates/foo.jinja2',context=Root)def myview(request):dojo_header = render_header(request)return {'dojo_header': dojo_header}<!-- templates/foo.jinja2 --><html><head>{{ dojo_header|safe }}</head><body>yes sir!</body></html>The ``render_header`` method will generate the appropriate *<link>*, *<style>*,and *<script>* elements for loading Dojo.  It will also generatethe appropriate *djConfig* object that configures the module loading pathto work with our /dojo view.Changes=======0.1 (Jul-10-2011)-----------------* first release
Package: khufu_script
Overviewkhufu_scriptprovides amanage scriptfor Khufu/Pyramid projects.
Following the usualKhufuopinions, certain commands assume
you are using SQLAlchemy to manage your data.UsageUsingkhufu_scriptis as easy defining the runner and registering it
with disutils console_script entry point.As an example, consider a Pyramid-based web app with a distribution name
of “NoteTaker” and a main package of “notetaker”.First createnotetaker/manage.pywith the following content:import khufu_script
settings = {
    'sqlalchemy.url': 'sqlite:///notetaker.db'
}
main = khufu_script.make_manager(name='NoteTaker',
                                 app_factory='notetaker.app',
                                 config_filename='notetaker-settings.ini',
                                 settings=settings,
                                 db_metadatas=['notetaker.models.Base.metadata']).main
if __name__ == '__main__':
    main()Next make adjustments tosetup.py:from setuptools import setup

setup(name='NoteTaker',
      # ...
      entry_points={
        'console_scripts': [
            'notetaker-manage = notetaker.manage:main',
            ]
        }
      )After installing your app you can launch your app by typing:$ notetaker-manageOr by running the module directly:$ python -m notetaker.manageAvailable CommandsCommands:
    runserver             Run a reloadable development web server.
    loaddata              Add data based on the YAML from filename
    shell                 Launch a Python shell
    syncdb                Ensure all database tables existCreditsCreated and maintained by Rocky Burt <rocky AT serverzen DOT com>.Changes0.6.2 (Aug-29-2011)syncdb/upgradedb now reflect on the database more to avoid
circular model dependencies0.6.1 (Jul-10-2011)Added “rshell” command for connecting to a remote rfoo server and work
with live-running objects0.6 (May-14-2011)first release
Package: khufu_siteview
Overviewkhufu_siteviewis an addon for Pyramid hows the registration of a
view that can be used to serve all.jinja2files out of a directory
as subviews without the need to map them directly.UsageStandard setup is toConfigurator.includethekhufu_siteviewpackage and then add new views as necessary.Example:from pyramid.config import Configurator

def app(global_conf, **settings):
    config = Configurator(settings=settings)
    config.include('khufu_siteview')
    config.add_templateview_route('/some/path/to/site', '/')
    return config.make_wsgi_app()The previous example mounts the view at the root of the new Pyramid
application.  The following example url’s would work:http://127.0.0.1:8080/favicon.ico   ->  /some/path/to/site/favicon.ico
http://127.0.0.1:8080/somepage.jinja2   ->  /some/path/to/site/somepage.jinja2Static assets such as gif’s and ico’s will be looked up as if the view was static.CreditsCreated and maintained by Rocky Burt <rocky AT serverzen DOT com>.Changes0.9.1 - Apr 26, 2011fixed bug where standard global renderer vars were being removed0.9 - Apr 18, 2011first release
Package: khufu_sqlalchemy
khufu_sqlalchemy is meant to reduce the plumbing required to configure aSQLAlchemybased database connection with
aPyramidbased web app.Please seekhufu_sqlalchemy @ githubordocs/index.rstin the source distribution for full docs.Changes0.5.3 (Jul-10-2011)now tries to make sure the active context is part of the active db sessionVarious fixes to make session lookup more rigourous0.5.2 (Jul-10-2011)Small fixes0.5.1 (May-14-2011)Fixed bad import in the paster templatePut in hack to work around bug with connection pooling and sqlitehttps://github.com/Pylons/pyramid/issues/174Now uses scoped_session for session factory by defaultsessions created bydbsession()are now closed upon finishing the
request0.5 (May-04-2011)Added newkhufu_sqlalchemypaster templateMade dbsession() lookup a little more clever0.5b1 (Feb-28-2011)Backwards incompat changes with 0.4, please stay with 0.4
to continue using middlewareNow useskhufu_sqlalchemy.dbsession(request)for getting
the active db sessiontraversalutilswas moved out (in preparation for another
package0.4a4 (Feb-20-2011)Renamed from Khufu-SQLAHelper to khufu_sqlalchemy0.4a3 (Feb-16-2011)Updated project url’s0.4a2 (Feb-11-2011)Fixed small issue where decorator wasn’t working0.4a1 (Feb-10-2011)Added traversalutils for helping expose SQL-based models
using traversal0.3 (Feb-04-2011)Changedwith_dbapi to make db param optionalUpdated docs0.2.1 (Jan-17-2011)Addeduse_zope_tmoption toget_session_factory0.2 (Jan-9-2011)first release
Package: khu-llm-toolkit
My LLM UtilitiesAbout The Project個人工具箱，便於生成式AI的開發探索。私人研究，與工作無關，來窺伺動靜的人請自行退去。2024-02-19修改專案及套件名稱Built WithGetting Started本節說明如何建置本專案, 以及如何將建置成果供用戶使用.Prerequisites開發環境需要先安裝好Python和poetrypyenvcurlhttps://pyenv.run|bashPythonpyenvinstall3.11poetrycurl-sSLhttps://install.python-poetry.org|python3-Virtual environmentpython3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt或 使用 poetry:poetry install
poetry shellDevelopmentseeHow to upload your python package to PyPiWithout PoetryVirtual environmentsource .venv/bin/activateTestpytestGithub Release建立並發布git taggit tag -a 0.1.1 -m "adjust config file content layout"
git push origin 0.1.1然後到Github倉庫頁面建立一個新的release複製Assets中Source code(.tar.gz)的URL, 把它貼到setup.py裡的download_url中Buildpython3 setup.py sdist
python3 setup.py clean --allUploadPyPi不再允許在上傳過程中用個人帳號密碼做為身份驗證方式, 參考Hackmd記錄。
在上傳過程中要求認證的時候, 以"token"做為username, 以該檔案中的token值做為密碼twine upload dist/*With PoetryVirtual environmentpoetry shellTestpytestBuildpoetry buildUploadpoetry publish --username=__token__ --password=上述檔案中的token值Usage完成建置並推送到PyPi server後, 就可以在其它專案中將它設為相依套件, 並在程式碼中使用.相依套件Poetry: 在 pyproject.toml 填入khu_llm_toolkit = "^0.1.6"Pip: 在 requirements.txt 填入khu_llm_toolkit >= 0.1.6匯入套件from khu_llm_toolkit import ModelDefinition
from khu_llm_toolkit.commons import ProviderType

config_file_path = os.path.join(os.getcwd(), f"instance/model_definition.ini")
model_def = ModelDefinition(ProviderType.AZURE, config_file_path)
llm, embeddings = model_def.get_models(temperature=temperature)設定檔範例[DEFAULT]

[openai]
USE_AZURE = False
API_KEY = OPENAI_API_KEY
CHAT_COMPLETIONS_MODEL = gpt-4-0613
EMBEDDINGS_MODEL = text-embedding-ada-002

[azure]
USE_AZURE = True
API_KEY = AZURE_OPENAI_API_KEY
API_BASE = AZURE_OPENAI_API_ENDPOINT_URL
API_VERSION = 2023-05-15
COMPLETIONS_MODEL = gpt-35-turbo
EMBEDDINGS_MODEL = text-embedding-ada-002Roadmap支援 Gemini支援 Huggingface上的開源模型See theopen issuesfor a full list of proposed features (and known issues).LicenseDistributed under the MIT License. SeeLICENSE.txtfor more information.(back to top)ContactKen Hu -kenhu@duck.comProject Link:https://github.com/kenhutaiwan/MyLlmUtils
Package: ki67segmentation
To install, type in terminal:pip install ki67segmentationThen:from cells_detection.ki67_segmentation import ki67_segmentation, load_dataThis package contains two functions :ki67_segmentation(original_image, positive_color=np.array([16.36, 110.89, 53.06]), negative_color=np.array([53.15, -18.15, 1.20]), background_color=np.array([53.15, -18.15, 1.20]), sigma=0.454, resize_factor=8, visualize_regions=False):This function takes an image and return the ratio for cells marked by the ki-67 antigen.
Also, it is able to plot on the initial image the regions that the algorithm considers as positives cells,
negatives cells or background.
The parameters by default are the ones which work good with the images I have worked with.

:param original_image: original image with cells, without pre process
:param positive_color: color of positives cells as a np.array, in the color lab space,
np.array([16.36, 110.89, 53.06]) by default
:param negative_color: color of negatives cells as a np.array, in the color lab space,
np.array([53.15, -18.15, 1.20]) by default
:param background_color: color of the background as a np.array, in the color lab space,
np.array([53.15, -18.15, 1.20]) by default
:param sigma: variance of the 2 dimensional gaussian for the weight matrix, 0.454 by default
:param resize_factor: to resize the original image, 8 by default
:param visualize_regions: boolean, False by default
:return: the ratio of positives cellsload_data():This function loads 5 examples of images and the positive and negative masks associated with each images.

:return: a list of dictionary with the followed keys : "sample_name", "original_image", "positive_mask"
and "negative_mask".
Package: kiacopy
kiacopykiacopy can make k-independent traveling salesman problemFree software: MIT licenseDocumentation:https://kiacopy.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-07-18)First release on PyPI.
Package: kia-hyundai-api
Api Wrapper for Kia/Hyundai API using async in python, this was inspired bythis guideto be a lightweight wrapper, with simple error handling.a lot of this is a port ofBluelinkyfrom node.US Kialoginget_vehiclesget_cached_vehicle_statusrequest_vehicle_data_synccheck_last_action_status - allows verification actions have completed on vehiclelockunlockstart_climatestop_climatestart_chargestop_chargeset_charge_limitsUS Hyundailoginget_vehiclesget_cached_vehicle_statusget_locationlockunlockstart_climatestop_climateCA Kia/Hyundailoginget_vehiclesget_cached_vehicle_statusget_next_service_statusget_pin_tokenget_locationrequest_vehicle_data_synccheck_last_action_status - allows verification actions have completed on vehiclelockunlockstart_climatestart_climate_evstop_climatestop_climate_evstart_chargestop_chargeset_charge_limits
Package: ki-aikido
IntroAikido is a multi-language set of tools for the self-defense of MacOS
usersInstallingHomebrew FormulaThe homebrew formula installs both the rust crateaikidoand the python packageki-aikido.brewtapgabrielfalcao/aikidogit@github.com:gabrielfalcao/aikido.gitbrewinstallgabrielfalcao/aikidoPython Packagepipinstallki-aikidoRust Cratecargoinstallaikido
Package: kian
Kian================Kian is the neural network designed to serve Wikidata.This library in current shape adds statements to items based on categories in Wikis (Wikipedia, Wikisource, etc.)In order to add statements or parse articles you need to have pywikibot-core installed.How to run this code for a run on classifying humans based on Persian Wikipedia:::python scripts/initiate_model.py -n faHuman -w fawiki -p P31 -v Q5python scripts/train_model.py -n faHumanpython scripts/evaluate.py -n faHuman #To see AUC and fitness parameterspython scripts/parser.py -lang:fa -newpages:100 -n faHumanBottlenecks of speed in Kian are:1) Loading category links from Wikipedia. Since it caches them training different models from one wiki tends to work better2) Training the model. Since it's an ANN and ANNs are resource consuming to train, this may take a while but depends on Wiki you are working with.Dependency injection--------------------Kian is usable for any kind of training, you can simply inject the training set and get the result:.. code-block:: python>>> from kian import Kian>>> bot = Kian(training_set=the_training_set)>>> bot.train()>>> bot.theta>>> bot.finalize(path='path_to_save_results')Authors=======Amir Sarabadani:* Ladsgroup<AT>gmail.com
Package: kiara
kiaraA data-centric workflow orchestration framework.kiarauser documentation:https://dharpa.org/kiara.documentationCode:https://github.com/DHARPA-Project/kiaraDevelopment documentation for this repo:https://dharpa.org/kiaraDescriptionKiarais the data orchestration engine developed by the DHARPA project. It uses a modular approach
to let users re-use tried and tested data orchestration pipelines, as well as create new ones from existing building
blocks. It also helps you manage your research data, and augment it with automatically-, semi-automatically-, and manually-
created metadata. Most of this is not yet implemented.DevelopmentRequirementsPython (version >=3.6 -- some make targets only work for Python >=3.7, butkiaraitself should work on 3.6)pip, virtualenvgitmakedirenv(optional)Prepare development environmentgit clone https://github.com/DHARPA-Project/kiara.gitcd kiarapython3 -m venv .venvsource .venv/bin/activatemake initIf you usedirenv, you can alternatively do:git clone https://github.com/DHARPA-Project/kiara.gitcd kiaracp .envrc.disabled .envrcdirenv allowmake initNote: you might want to adjust the Python version in.envrc(should not be necessary in most cases though)maketargetsinit: init development project (install project & dev dependencies into virtualenv, as well as pre-commit git hook)update-modules: update default kiara modules package from gitflake: runflake8testsmypy: runmypyteststest: run unit testsdocs: create static documentation pages (underbuild/site)serve-docs: serve documentation pages (incl. auto-reload) for getting direct feedback when working on documentationclean: clean build directoriesFor details (and other, minor targets), check theMakefile.Running tests> make test#or> make coverageCopyright & licenseThis project is MPL v2.0 licensed, for the license text please check theLICENSEfile in this repository.Copyright (c) 2021, 2022DHARPA projectCopyright (c) 2021, 2022 Markus Binsteiner
Package: kiara-plugin.core-types
kiaraplugin: (core-types)Core data types for kiara.Documentation:https://DHARPA-Project.github.io/kiara_plugin.core_typesCode:https://github.com/DHARPA-Project/kiara_plugin.core_typeskiara:https://dharpa.org/kiara.documentationDescriptionTODODevelopmentRequirementsPython (version >= 3.8)pip, virtualenvgitmake (on Linux / Mac OS X -- optional)Prepare development environmentIf you only want to work on the modules, and not the coreKiaracodebase, follow the instructions below. Otherwise, please
check the notes on how to setup aKiaradevelopment environment under (TODO).Linux & Mac OS X (using make)For *NIX-like operating system, setting up a development environment is relatively easy:git clone https://github.com/DHARPA-Project/kiara_plugin.core_types.gitcd kiara_plugin.core_typespython3 -m venv .venvsource .venv/bin/activatemake initWindows (or manual pip install)It's impossible to lay out all the ways Python can be installed on a machine, and virtual- (or conda-)envs can be created, so I'll assume you know how to do this.
One simple way is to install theAnaconda (individual edition), then use the Anaconda navigator to create a new environment, install the 'git' package in it (if your system does not already have it), and use the 'Open Terminal' option of that environment to start up a terminal that has that virtual-/conda-environment activated.Once that is done,cdinto a directory where you want this project folder to live, and do:#makesureyourvirtualenvisactivated!!!git clone https://github.com/DHARPA-Project/kiara_plugin.core_types.gitcd kiara_plugin.core_typespip install --extra-index-url https://pypi.fury.io/dharpa/ -U -e .[all_dev]Try it outAfter this is done, you should be able to run the included example module via:kiara run core_types_example text_1="xxx" text_2="yyy"......Re-activate the development environmentThe 'prepare' step from above only has to be done once. After that, to re-enable your virtual environment,
you'll need to navigate to the directory again (wherever that is, in your case), and run thesourcecommand from before again:cd path/to/kiara_plugin.core_typessource .venv/bin/activate  # if it isn't activated already, for example by the Anaconda navigatorkiara --help  # or whatever, point is, kiara should be available for you now,maketargets (Linux & Mac OS X)init: init development project (install project & dev dependencies into virtualenv, as well as pre-commit git hook)update-dependencies: update development dependencies (mainly the corekiarapackage from git)flake: runflake8testsmypy: run mypy teststest: run unit testsdocs: create static documentation pages (underbuild/site)serve-docs: serve documentation pages (incl. auto-reload) for getting direct feedback when working on documentationclean: clean build directoriesFor details (and other, minor targets), check theMakefile.Running tests> make test#or> make coverageCopyright & licenseThis project is MPL v2.0 licensed, for the license text please check theLICENSEfile in this repository.
Package: kiara-plugin.develop
kiaraplugin: (develop)Development utilities for kiara.Documentation:https://DHARPA-Project.github.io/kiara_plugin.developCode:https://github.com/DHARPA-Project/kiara_plugin.developkiara:https://dharpa.org/kiara.documentationDescriptionTODODevelopmentRequirementsPython (version >= 3.8)pip, virtualenvgitmake (on Linux / Mac OS X -- optional)Prepare development environmentIf you only want to work on the modules, and not the coreKiaracodebase, follow the instructions below. Otherwise, please
check the notes on how to setup aKiaradevelopment environment under (TODO).Linux & Mac OS X (using make)For *NIX-like operating system, setting up a development environment is relatively easy:git clone https://github.com/DHARPA-Project/kiara_plugin.develop.gitcd kiara_plugin.developpython3 -m venv .venvsource .venv/bin/activatemake initWindows (or manual pip install)It's impossible to lay out all the ways Python can be installed on a machine, and virtual- (or conda-)envs can be created, so I'll assume you know how to do this.
One simple way is to install theAnaconda (individual edition), then use the Anaconda navigator to create a new environment, install the 'git' package in it (if your system does not already have it), and use the 'Open Terminal' option of that environment to start up a terminal that has that virtual-/conda-environment activated.Once that is done,cdinto a directory where you want this project folder to live, and do:#makesureyourvirtualenvisactivated!!!git clone https://github.com/DHARPA-Project/kiara_plugin.develop.gitcd kiara_plugin.developpip install --extra-index-url https://pypi.fury.io/dharpa/ -U -e .[all_dev]Try it outAfter this is done, you should be able to run the included example module via:kiara run develop_example text_1="xxx" text_2="yyy"......Re-activate the development environmentThe 'prepare' step from above only has to be done once. After that, to re-enable your virtual environment,
you'll need to navigate to the directory again (wherever that is, in your case), and run thesourcecommand from before again:cd path/to/kiara_plugin.developsource .venv/bin/activate  # if it isn't activated already, for example by the Anaconda navigatorkiara --help  # or whatever, point is, kiara should be available for you now,maketargets (Linux & Mac OS X)init: init development project (install project & dev dependencies into virtualenv, as well as pre-commit git hook)update-dependencies: update development dependencies (mainly the corekiarapackage from git)flake: runflake8testsmypy: run mypy teststest: run unit testsdocs: create static documentation pages (underbuild/site)serve-docs: serve documentation pages (incl. auto-reload) for getting direct feedback when working on documentationclean: clean build directoriesFor details (and other, minor targets), check theMakefile.Running tests> make test#or> make coverageCopyright & licenseThis project is MPL v2.0 licensed, for the license text please check theLICENSEfile in this repository.