Saravanan666/pypi-org huggingface dataset:
Package: wk-classify
wk-classifyA package of tools for building deep-learning classification programs. Easy to use, light and powerful.Installpip3installwk-classifyUsageQuick startfromwcfimporttrain,TrainValConfigBaseclassConfig(TrainValConfigBase):TRAIN_DIR='path for train set'VAL_DIR='path for val set'cfg=Config()train(cfg)A real examplefromwcfimporttrain,TrainValConfigBase,val,t,EasyTransform,models_namesclassConfig(TrainValConfigBase):MODEL_TYPE=models_names.shufflenet_v2_x0_5TAG='[%s]'%(MODEL_TYPE)GEN_CLASSES_FILE=TrueUSE_tqdm_TRAIN=TrueINPUT_SIZE=(252,196)#(w,h)BATCH_SIZE=64MAX_EPOCHS=200BALANCE_CLASSES=TrueVAL_INTERVAL=1WEIGHTS_SAVE_INTERVAL=1WEIGHTS_INIT='weights/training/model_best.pkl'TRAIN_DIR='/home/ars/sda5/data/projects/烟盒/data/现场采集好坏烟照片/相机1-train'VAL_DIR='/home/ars/sda5/data/projects/烟盒/data/现场采集好坏烟照片/相机1-val'val_transform=EasyTransform([t.Resize(INPUT_SIZE[::-1]),t.SaveToDir('data/test'),t.ToTensor(),])train_transform=EasyTransform([t.ColorJitter(brightness=0.2,contrast=0,saturation=0,hue=0),# t.RandomHorizontalFlip(),# t.RandomVerticalFlip(),# t.RandomRotate(360),t.RandomTranslate(30),t.RandomBlur(p=0.3,radius=1),t.RandomSPNoise(p=0.3),*val_transform,])# def get_model(self, num_classes=None):# model=YourModel(...)# return modelif__name__=='__main__':cfg=Config()train(cfg)# res=val(cfg)# print(res)all optionssee theTrainValConfigBaseclass for all optionshow to predict?seedemo_predict.pymoreseedemo_train.pyanddemo_predict.py
Package: wkcuber
⚠️⚠️⚠️ wkcuber ⚠️⚠️⚠️⚠️⚠️⚠️ Thewkcuberpackage is deprecated because the CLI was integrated into thewebknossospackage. Please use thewebknossospackage instead. ⚠️⚠️⚠️How to migrate to the new CLIusepip install webknossos[all]instead ofpip install wkcuberreplacewkcuberwithwebknossosin your requirements file (requirements.txt,pyproject.toml,setup.py, ...)if thewkcuberpackage is used by one of your dependencies it would be great if you would take the time to report the deprecation of thewkcuberpackage in the issue trackerRunwebknossos --helpto get an overview of the currently available commands. Runwebknossos <subcommand> --helpto learn more about specific subcommands.These commands changed:python -m wkcuber,python -m wkcuber.convert_image_stack_to_wkw→webknossos convertpython -m wkcuber.export_wkw_as_tiff→webknossos export-wkw-as-tiffpython -m wkcuber.convert_knossos→webknossos convert-knossospython -m wkcuber.convert_nifti→webknossos convert-niftipython -m wkcuber.convert_raw→webknossos convert-rawpython -m wkcuber.downsampling→webknossos downsamplepython -m wkcuber.compress→webknossos compresspython -m wkcuber.check_equality→webknossos check-equalityThere is one new command for the CLI:webknossos uploadto upload a dataset to a WEBKNOSSOS serverThese commands have been removed:python -m wkcuber.cubingpython -m wkcuber.tile_cubingpython -m wkcuber.metadatapython -m wkcuber.recubingLicenseAGPLv3
Copyright scalable minds
Package: wkdfh
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Description: # Wikidata for humanswkdfhis a Python module for humans who want to work with Wikidata.It’s a wrapper around [pywikibot](https://www.mediawiki.org/wiki/Manual:Pywikibot)
that adds a couple shortcuts to ease data exploration.Note:This is really experimental at this point.## Example`pycon >>> import wkdfh >>> p =wkdfh.Item("Q6756362")>>> p.label 'Marcella Hazan' >>> p.populate_attributes() >>> p.given_name.label 'Marcella' >>> p.family_name.label 'Hazan' >>> p.sex_or_gender.label 'female' >>> p.viaf_id '79375768' `## Installpip install wkdfhRequirement: Python 3.Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Package: wkdict
wkdict (v0.1.0)A dictionary app sits in your CLI environment.Install on Mac/LinuxMake sure you have the python3 installed on your machine, and use the following command to installwkdictpip3 install wkdictUsageIn terminal, run the application usingwkdict "word-you-wanna-lookup"For example,wkdict lovewill give you the following result:1) love	(UK, US) IPA: /lʌv/
   🏷  noun

	📗 Definitions
	☞ love (countable and uncountable, plural loves)
	☞ (uncountable) Strong affection.
	☞ (countable) A person who is the object of romantic feelings; a
	  darling, a sweetheart, a beloved.

	📘 Examples
	➡ A mother’s love is not easily shaken.
	➡ My husband’s love is the most important thing in my
	  life.
	➡ He on his side / Leaning half-raised, with looks of
	  cordial love / Hung over her enamoured.
...Command optionsUsage: wkdict [OPTIONS] WORD

Options:
  --limit INTEGER  Maximum number of entries/examples shown.  [default: 3]
  --version        Show the version and exit.
  --help           Show this message and exit.ChangelogCurren app version(master branch) is0.1.0.Changes in current version:Better formatting of dictionary entriesAdd unicode supportAdd test casesAdd Command-Line OptionsThis application is powered byWiktionary'sDictionary API
Package: wkey
whisper-keyboardVideo demo:https://www.youtube.com/watch?v=VnFtVR72jM4&feature=youtu.beSmulate keyboard typing with voice commands on your computer. Use the power of OpenAI's Whisper.Start the wkey listener. Keep a button pressed (by default: right ctrl) and speak. Your voice will be recoded locally. When the button is released, your command will be transcribed via Whisper and the text will be streamed to your keyboard.You can use your voice to write anywhere.You will incur costs for Whisper API. Currently, it costs $0.36 for 1 hour of transcription.SetupInstall the package.pipinstallwkeyYou will need to set two environment variables:OPENAI_API_KEY: your personal OpenAI API key. You can get it by signing up here:https://platform.openai.com/WKEY: the keyboard key you want to use to start recording. By default, it is set to right ctrl. You can use any key. Note that Mac and Windows might have different key codes. You can runfkeyto find the code of the key you want to use.You can set the environment variables in your shell:exportOPENAI_API_KEY=<yourkey>exportWKEY=ctrl_rRunwkeyin a terminal window to start listening.If there are issues, check the additional requirements.Additional requirementsRequirements differ depending on your OS.UbuntuYou will need to install the portaudio library.sudoapt-getinstallportaudio19-devMacYou will need to authorize your terminal to use the microphone and keyboard. Go to System Settings > Privacy and Security. Then:Select Microphone and authorize your terminal.Select Accessibility and authorize your terminal.Restart the terminal for the changes to take effect.Note that this might entail security risks.WindowsHaven't tested it on Windows yet. If you do, please let me know how it goes.Security risksThis script creates a recording with your microphone and sends the audio to the Whisper API. The Whisper API response will be automatically streamed to your keyboard and executed there. This might entail security risks. Use at your own risk.
Package: wkhtmltopdf
python-wkhtmltopdfA simple python wrapper for the wkhtmltopdf lib (http://code.google.com/p/wkhtmltopdf/) with flash support.RequirementsSystem:Xvfdwkhtmltopdfflashplugin-nonfreepython 2.5+InstallationwkhtmltopdfInstall Xvfd:$ sudo apt-get install xvfbInstall Fonts:$ sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillicInstall wkhtmltopdf:$ sudo apt-get install wkhtmltopdfInstall flashplugin:$ sudo apt-get install flashplugin-nonfreepython-wkhtmltopdfFrom git:$ git clone git@github.com:qoda/python-wkhtmltopdf.git
$ cd python-wkhtmltopdf
$ python setup.py installUsageSimple Usage::Use from class:from wkhtmltopdf import WKHtmlToPdf

wkhtmltopdf = WKHtmlToPdf(
    url='http://www.example.com',
    output_file='~/example.pdf',
)
wkhtmltopdf.render()Use from method:from wkhtmltopdf import wkhtmltopdf

wkhtmltopdf(url='example.com', output_file='~/example.pdf')Use from commandline (installed):$ python -m wkhtmltopdf.main example.com ~/example.pdfUse the api (installed):$ python -m wkhtmltopdf.api &
$ wget http://localhost:8888/?url=example.com&output_file=example.pdfRequired Arguments:url- the url to convert to pdfoutput_file- the pdf file that you want to createOptional Arguments:screen_resolution(default: [1024, 768])color_depth(default: 24 (bit))flash_plugin(default: True)disable_javascript(default: False)delay(default: 0 (millisecs))orientation(default: Portrait)dpi(default: 100)no_background(default: False)grayscale(default: False)http_username(default: None)http_password(default: None)header_html(default: None)footer_html(default: None)Authors:Jonathan Bydendyk (jpbydendyk@gmail.com)
Package: wkhtmltopdf-pack
This package installs awkhtmltopdfbinary in a Heroku or cloudControl deployment. Versioning on this package mimics
the version number of the includedwkhtmltopdfbinary.wkhtmltopdfis an open source (LGPLv3) command line tool to render HTML into PDF using the
Qt WebKit rendering engine.InstallationInstall it in the usual way:pip install wkhtmltopdf-packUsageThere are multiple Python wrappers for wkhtmltopdf you can use. If you are using Django in your project, you can use
thedjango-wkhtmltopdfwrapper.The binary you want to use is namedwkhtmltopdf-pack.AcknowledgementsBinaries are originally generated for thewkhtmltopdf-herokuRuby Gem. A big thank you to thewkhtmltopdf-herokucontributors!
Package: wkhtmltopdf-pack-ng
This package installs awkhtmltopdfbinary in a Heroku or cloudControl deployment. Versioning on this package mimics
the version number of the includedwkhtmltopdfbinary.wkhtmltopdfis an open source (LGPLv3) command line tool to render HTML into PDF using the
Qt WebKit rendering engine.InstallationInstall it in the usual way:pip install wkhtmltopdf-packUsageThere are multiple Python wrappers for wkhtmltopdf you can use. If you are using Django in your project, you can use
thedjango-wkhtmltopdfwrapper.The binary you want to use is namedwkhtmltopdf-pack.AcknowledgementsBinaries are originally generated for thewkhtmltopdf-herokuRuby Gem. A big thank you to thewkhtmltopdf-herokucontributors!
Package: wkhtmltopdf-wrapper
wkhtmltopdf-wrapper===================A simple and direct python wrapper for the `wkhtmltopdflib <https://github.com/wkhtmltopdf/wkhtmltopdf>`__ inspired by inspiredby `Qoda'spython-wkhtmltopdf <https://github.com/qoda/python-wkhtmltopdf>`__Requirements------------System:~~~~~~~-  Linux 32/64 or OSX only (Windows is not supported at this stage)-  wkhtmltopdf-  python 2.5+ / python3Installation------------wkhtmltopdf (Linux)~~~~~~~~~~~~~~~~~~~1. Install Fonts:.. code:: bash$ sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic2. Install wkhtmltopdfgoto http://wkhtmltopdf.org/downloads.html for the latest release(Recommended)wkhtmltopdf (OSX)~~~~~~~~~~~~~~~~~or goto http://wkhtmltopdf.org/downloads.html for the latest release(Recommended)wkhtmltopdf-wrapper (Any Platform)----------------------------------1. PIP:.. code:: bash$ pip install wkhtmltopdf-wrapperor.. code:: bash$ pip install git+https://github.com/aguegu/wkhtmltopdf-wrapper.git2. Development:.. code:: bash$ git clone https://github.com/aguegu/wkhtmltopdf-wrapper.git$ cd wkhtmltopdf-wrapper$ virtualenv .$ pip install -r requirements.pipUsage=====the option\_string would be sent to the wkhtmltopdf command line inexactly the same shape. so the options can be anything as long as thewkhtmltopdf supports. check its`usage <http://wkhtmltopdf.org/usage/wkhtmltopdf.txt>`__. This lib isjust as simple as that. If anything goes wrong, just check the doc. Ifthe command execute ok with wkhtmltopdf dircetly, this wrapper shouldwork too.As I check`qoda/python-wkhtmltopdf <https://github.com/qoda/python-wkhtmltopdf>`__,where this repo forked from, it tried to prase args. But it only includea small set of the arguments the command supports. Furthermore, it setdefault values to this set of arguments and pass them all to thecommand. For me, it is totally unnecessary and even mistakeful. There isdefault setting setup and doc in the command. Some arugments may noteven work together, as ``--page-size`` and ``--page-height``,``--page-width``. So my solution is just pass the option in as a string,Lazy, flexible and effective.from class:~~~~~~~~~~~.. code:: pythonfrom wkhtmltopdfwrapper import WKHtmlToPdfwkhtmltopdf = WKHtmlToPdf('-T 20 -B 20 -g --zoom 1.5')# option_stringwkhtmltopdf.render('http://www.example.com', '~/example.pdf')# source url, output file pathfrom method:~~~~~~~~~~~~.. code:: pythonfrom wkhtmltopdfwrapper import wkhtmltopdfwkhtmltopdf('example.com', '~/example.pdf', '-T 20 -B 20 -g --zoom 1.5')from commandline (installed):~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.. code:: bash$ python -m wkhtmltopdfwrapper.__init__ example.com ~/example.pdf -T 20 -B 20 -g --zoom 1.5Authors:========- Jonathan Bydendyk (jpbydendyk@gmail.com)- Weihong Guan (weihong.guan@gmail.com)
Package: wkmanager
Welcome to WkManager!An unnoficial lib that facilitates the download of wkhtmltopdf/wkhtmltoimage (wkhtmltox), based on the characteristics of the system such as OS, architecture of the processor and also the availability of the software, also being possible to manually select this information.WkManagerA class to validation of system characteristics to start downloading wkhtmltopdf/wkhtmltopdf (wkhtmltox) files from the official website (please consult directly for more information).AttributesAttributeTypesysstrsupportstrarchstrextensionstrsystem: the OS you are looking for, if None will be replace by checking your OS.support: the support are looking for, like "XP", "Vista", "Debian", "Arch. if None wil be replaced by checking your OS.arch: the OS architecture you are looking for, if None will be replace by checking your machine.extension: the extension you looking for, if None will raise an ValueError with the avaliable extensions for you based on others attributes.Example:from wkmanager import WkManager

Wk = WkManager("Windows", "XP", "64bit", "7z")If successful, you can use theget_wkmethod.get_wkMethod to download the wkhtmltox files, being able to unzip it automatically (winrar required for 7z files).ArgsAttributeTypepathstrextractboolwinrar_pathstrpath: the path where the file will be saved, if None will saved on root.extract: if True, the file will be extracted if it is 7z or Zip, by default it is False.winrar_path: if a 7z file extension is selected and extract is True, it will be necessary to have Winrar installed and pass the path to winrar.exe for the file to be unpacked.from wkmanager import WkManager

Wk = WkManager("Windows", "XP", "64bit", "7z")
wk_path = Wk.get_wk("wk_folder", True, "C:\Program Files\WinRAR\WinRAR.exe")the if extract is True, the file will be full unpacked without internal folder.ReturnsReturns the path of folder with wk files.
Package: wknml
wknmlPython library for working withwebKnossosskeleton annotation files (NML).Installationwknml requires Python 3.6+pip install wknmlDocumentationSeedocs/wknml.mdfor an API documentation.ExamplesSome examples to get you started. Make sure to also check theexamplesdirectory:# Load an NML filewithopen("input.nml","rb")asf:nml=wknml.parse_nml(f)# Access the most important propertiesprint(nml.parameters)print(nml.trees)print(nml.branchpoints)print(nml.comments)print(nml.groups)# Iterate over all nodesfortreeinnml.trees:fornodeintree.nodes:print(tree,node)# Write a new NML file to diskwithopen("out.nml","wb")asf:wknml.write_nml(f,nml)# Convert an NML file with unlinked nodes to one with connected treespython-mexamples.fix_unlinked_nml<unlinked>.nml<fixed>.nmlDevelopmentMake sure to install all the required dependencies using Poetry:pip install poetry
poetry installPlease, format and test your code changes before merging them.poetry run black wknml tests examples
poetry run pytest testsPyPi releases are automatically pushed when creating a new Git tag/Github release. Make sure to bump the package version number manually:poetry version <patch, minor, major>If necessary, rebuild the documentation and commit to repository:poetry run pydoc-markdown -m wknml -m wknml.nml_generation -m wknml.nml_utils --render-toc > docs/wknml.mdLicenseMIT License
Package: wks
wks: Simple CMake workspace managerHow it worksThe basic purpose ofwksis to spawn repositories to build a project, then generate aCMakeLists.txtcontainingadd_subdirectory()directives for all of them.This way, the project can be built using the top-level generatedCMakeLists.txt.UsageThe following commands are available:wks install [repository]: If a repository is given,wkswill install it first. Then,wkswill scan for
dependencies in thewks.ymlfiles (see below) and install them until all requirements are met. This way, it is
possible that dependencies of dependencies are installed. Callingwks installwithout repository argument will
cause dependencies scan. TheCMakeLists.txtwill eventually be generated.wks cmake: This will cause theCMakeLists.txtto be re-generated.wks build [target]: Will create a build and run it.wkswill try to create a Ninja build, and
fall back to makefiles if it is not available. The[target]you can pass will be given to the build command
(make [target]orninja [target]). The build will be stored inbuild/directory.wks pull: Will run agit pullin all repositories. This will then scan for dependencies (equivalent towks installwith no argument) and re-generate theCMakeLists.txt.wks status: Gives insight on the status of your repositories, this will check for:Untracked filesChanges without commitsChanges commited but not pushedAll sources will be stored insrc/, undersrc/vendor/repository.Repositories formatAll repositories are fetched for GitHub, and repositories can have those formats:vendor/repositoryvendor/repository#branchvendor/repository@tagThewks.ymlfileThewks.ymlcan contain the following sections:deps: a list of dependencies that the repository want to be installedoptional: a list of optional dependencies, they will not be installed but it ensure that the projects will appear
in the proper order in the generatedCMakeLists.txtcmakes: if theCMakeLists.txtfor this repository is not at the top level (or not unique), you can specify them
using this sectioninstall: a list of shell command that should be run post installcmake_prefix: a list of directories to be added toCMAKE_PREFIX_PATHAn example is:deps:-rhoban/utils@v1.0-rhoban/geometry@v2.0cmakes:-client-server
Package: wkstools
wkstoolswkstools is a small convenience library that provides utilities to efficiently work with entities and relations provided by IBM Natural Language Understanding.IntuitionWhen using IBM Watson Knowledge Studio (WKS) models in IBM Natural Language Understanding (NLU), in most cases the resulting JSON requires post-processing to work with the extracted entities and relations.
This is where wkstools comes to help:Let's assume you have trained a machine learning model in IBM Watson Knowledge Studio that recognizes relations between quantifiers, numbers and units."I want a smartphone that weighs no more than 160 g."If we want to build a tool that allows natural language searches for smartphone against a product database, you need to understand the relevant concepts in a structured manner.
For the above example it will be helpful to extract the relations that point from the operator (no more than) to the (value) and the unit (g).See theintuition.pyandnlu_response.jsonin the exmaples folder to have a running example.RequirementsPython 3.6+PydanticInstallation$pipinstallwkstoolsUsageParse entities and relationsTo parse the NLU JSON response retrieved from IBM Natural Language Understanding, use:importwkstools# Your NLU JSON response to processnlu_response='{..., "relations": [{"type": "specifiesValue", ...], "entities": [...]}'entities=wkstools.parse_entities(nlu_response)relations=wkstools.parse_relations(nlu_response)See the entity and relation models for available fields.Access specific relationsimportwkstools# Your NLU JSON response to processnlu_response='{..., "relations": [{"type": "specifiesValue", ...], "entities": [...]}'relations=wkstools.parse_relations(nlu_response)value_relations=wkstools.get_relations_by_type(relations,"specifiesValue")TestingTo lint and test, run:$./scripts/test.shTo get the html coverage report run:$./scripts/test-cov-report.shLicenseThis project is licensed under the terms of the MIT license.
Package: wkt-scraper
Wiktionary ScraperWiktionary Scraper is a basic scraper implementation to get word data from Wiktionary for a given word and language.InstallationYou can install the Wiktionary Scraper fromPyPI:pip install wkt_scraperIn python code, to look up the word "street" from English to Spanish:from scraper import scrape
response = scrape('en', 'es', 'street')Currently only English, Spanish and Turkish are supported.
Supporting more languages will require additional work and testing.
Package: wkweb
wkweb -- A Python Devkit For Web Development, Based On FlaskInstallpip3 install wkwebUsagefromwebimportAppication,NestableBlueprintapp=Appication(__name__)@app.route('/')defhome():return'Hello, World!'app.run()# visit http://localhost:5000 in your browserNestableBlueprintfromwebimportAppication,NestableBlueprintapp=Appication(__name__)@app.route('/')defhome():return'Hello, World!'bpa=NestableBlueprint('a',__name__,static_map={'/':'./'})bpb=NestableBlueprint('b',__name__,static_map={'/b':'./data'})bpa.register_blueprint(bpb,url_prefix='/b')app.register_blueprint(bpa,url_prefix='/a')app.run()# visit in your browser:# http://localhost:5000/# http://localhost:5000/a# http://localhost:5000/a/b