Saravanan666/pypi-org huggingface dataset:
Package: what-a-dict
what-a-dictDictionary class with advanced functionalityInstallationMake sure your are using the up-to-date version of pippipinstall--upgradepipThen install the packagepipinstallwhat-a-dictUsageimport the class firstfromwadimportDictInstance CreationUse it as a dictionary class with string keyword arguments:# style1members=Dict(name="SYHuang",discriptions="Please Subscribe")# style2d={"name":"SYHuang","discriptions":"Please Subscribe"}members=Dict(**d)It is also allowed to create instance of Dict which value of traditional dict or Dict# style1members=Dict(friends={"ge62":"computer","iphone":"phone"})# style2members=Dict(friends=Dict(ge62="computer",iphone="phone"))UsageItems can be get as in a dictmembers["friend"]The keys are also the attribute of this objectmembers.friendother functions like iteration, update are the same as in dict:# update (you can put in a hybrid with "dict"s and "Dict"s)members.update({"friends":Dict(ge62="good computer")})# iterationfork,vinmembers.items():pass# concatenationmembers_new=Dict(members,**{"friends":Dict(ge62="good computer")})###I provided a way of pretty print FYI:members.repr_()# print out:- layer1 key1: value
- layer1 key2(if it is a list/tuple): value[0] * (lenth of the list/tuple)
- layer1 key3(if it is a Dict):
    - layer2 ke1{a Dict}:
        - layer3 ke1: value(Example showing for iterable objects can be further extend to numpy array or other tensors, to be discussed)
Package: whatalovelyday
Malicious package proof of conceptThis package demonstrates what a malicious PyPI package could do to you :-)What it does: It downloads a python file from a github gist and runs it. That
python file creates a file in your/tmp. Nothing really malicious, but you
get the point.I created it mainly to test methods of installing python packages without the
danger of running theirsetup.py. At the moment there seem to be none. Poetry
manages to at least determine the dependencies of packages without running
theirsetup.pyfiles, but also uses pip internally when installing.As a workaround, you can forbid the usage of source distribution packages by
using the--only-binary :all:flag on your pip commands. Unfortunately, some
packages do not have a binary distribution and you will be unable to install
them with this flag.Here are some more resources to read about the problem:mschwager's 0wned package:https://github.com/mschwager/0wnedJordan Wright caught my package:https://prog.world/check-thousands-of-pypi-packages-for-malware/
Package: whatami
AboutWhatami is an attempt to abstract configurability and experiment
identifiability in a convenient way. It does so by leveraging object
introspection and defining a simple, flexible and consistent API
that python objects can adhere to, even if they were not originally
designed to do it.It works this way:Objects provide their own ids based on parameters=value dictionaries.
They do so by returning an instance of theWhatclass from
a method called“what()”.Optionally, this package provides awhatabledecorator to provide automatic
creation ofWhatobjects from objects dictionaries, slots and properties.
All attributes will be considered part of the configuration, except for those
whose names start or end by ‘_’.The id stringsThey aim to look like they would be generated if__repr__in python was always implemented
taking into account recursion and exposing only result-changing parameters. They pretty much
look like python function calls with nested parameters expanded to look like python calls
themselves.FeaturesRepresent your computations as standardized ID strings.Pluggable architecture.ID strings can be parsed and manipulated.“whatamise” your library. Included support for:scikit-learnpyopyConvenience functions for data tidying.ExampleWhatami is simple but powerful. This example just shows its surface and
better docs are coming, but in the meantime, just check the docstrings
and unit tests.# Objects of this class provide a configuration (`What` object)classDuckedConfigurable(object):def__init__(self,quantity,name,company=None,verbose=True):self.quantity=quantityself.name=nameself.company=companyself.verbose=verbosedefwhat(self):returnWhat('ducked',{'quantity':self.quantity,'name':self.name,'company':self.company})duckedc=DuckedConfigurable(33,'salty-lollypops',verbose=False)# The configuration id string sorts by key alphanumeric order, helping id consistencyprintduckedc.what().id()# ducked(company=None,name='salty-lollypops',quantity=33)# Using the whatable decorator makes objects gain a what() method;# in this case, what() is infered automatically@whatableclassCompany(object):def__init__(self,name,city,verbose=True):super(Company,self).__init__()self.name=nameself.city=cityself._verbose=verbose# not part of configself.social_reason_='%sS.A.,%s'%(name,city)# not part of configcc=Company(name='Chupa Chups',city='Barcelona')print(cc.what().id())# Company(city='Barcelona',name='Chupa Chups')# Ultimately, we can nest whatables...duckedc=DuckedConfigurable(33,'salty-lollypops',company=cc,verbose=False)printduckedc.what().id()# ducked(company=Company(city='Barcelona',name='Chupa Chups'),name='salty-lollypops',quantity=33)# We can also decorate functions and partials - use with caution@whatabledefbuy(company,price=2**32,currency='euro'):return'%sis now mine for%g%s'%(company.name,price,currency)printbuy.what().id()# buy(currency='euro',price=4294967296)VersioningSince release 4.0.0 whatami usessemantic versioning, where a major version bump
happens also if the default id strings can be generated differently, even if no API
actually changes.
Package: whatapi
This project is a simple wrapper around the What.cd AJAX API. Also compatible
with what-like trackers such as pth/apollo.Available via PyPI via pip:# pip install whatapiExample usage:>>> import whatapi
>>> apihandle = whatapi.WhatAPI(username='me', password='secret')
>>> apihandle.request("browse", searchstr="Talulah Gosh")
...
>>> apihandle.get_torrent(1234567)
...To use another tracker:>>> import whatapi
>>> apihandle = whatapi.WhatAPI(username='me', password='secret',
                                server='https://passtheheadphones.me')
>>> apihandle.request("browse", searchstr="The Beatles")
...It’s strongly recommended that your script implements saving/loading session cookies to prevent overloading the server.Example:>>> import whatapi
>>> import cPickle as pickle
>>> cookies = pickle.load(open('cookies.dat', 'rb'))
>>> apihandle = whatapi.WhatAPI(username='me', password='me', cookies=cookies)
...
>>> pickle.dump(apihandle.session.cookies, open('cookies.dat', 'wb'))API available atGwindow’s API pageor via the JSON API page on What.
Package: whatap-python
WhaTapfor pythonWhatap allows for application performance monitoring.Support: WSGI server application & Batch job & Specific method profiling.Python version : 2.7 + & 3.3+Installation$pipinstallwhatap-pythonApplication MonitoringSupported web frameworks such as Django, Flask, Bottle, Cherrypy, Tornado and WSGI Server Application.Configuration$exportWHATAP_HOME=[PATH]$whatap-setting-config--host[HOST_ADDR]--license[LICENSE_KEY]--app_name[APPLICATION_NAME]--app_process_name[APP_PROCESS_NAME]Usage$whatap-start-agent[YOUR_APPLICATION_START_COMMAND]...Unsupported web frameworks WSGIIf you want WSGI Application monitoring, include the @register_app decorator.importwhatap@whatap.register_appdefsimple_app(environ,start_response):"""Simplest possible application object"""status='200 OK'response_headers=[('Content-type','text/plain')]start_response(status,response_headers)return['Hello world!\n']Method ProfilingIf you want method profiling, include the @method_profiling decorator.fromwhatapimportmethod_profiling@method_profilingdefdb_connection():db.connect('mysql:// ..')@method_profilingdefquery():db.select('select * from ..')....Batch Monitoringfor Batch job.ConfigurationSet Environment valiable configuration.$exportWHATAP_BATCH_HOME=[PATH]$cat>>$WHATAP_BATCH_HOME/whatap.conf<< EOF
license=[LICENSE_KEY]
whatap.server.host=[HOST_ADDR]

app_name=batch
app_process_name=batch
EOFUsageStart bach agent.$whatap-start-batchExample codefromwhatapimportmethod_profilingclassCommand(BaseCommand):@batch_profilingdefhandle(self,*args,**options)://batchcode......RestartYour Application restart.CopyrightCopyright (c) 2017 Whatap, Inc. All rights reserved.
Package: whatchamacallit
whatchamacallitUse web resources the pythonic way, import JavaScript modules like you do with Python modules.
Specify Javascript modules, HTML, CSS as bare URLs and rewrite on the fly.Example(A) Install the desired package, in this examplegridchenpipinstallgridchen(B) From HTML/JavaScript<!DOCTYPE html><h1>Hello World</h1><scripttype="module">import*asutilsfrom"gridchen/utils.js";consttm=utils.createTransactionManager();</script>(C) Register your FastAPI app (see also module whatchamacallit.examples.fastapi_server.py)fromfastapiimportFastAPIfromwhatchamacallit.fastapiimportregisterapp=FastAPI()register(app)or Flask app (see also module whatchamacallit.examples.flask_server.py)importflaskfromwhatchamacallit.flaskimportregister# Important: Do not use the evil static_url_pathapp=flask.Flask(__name__,static_folder=None)register(app)WorkingUltimately, theimport * as utils from "gridchen/utils.js"must be mapped to its physical location, for example/C/projects/myproject/venv/Lib/site-packages/gridchen/utils.js.
This is done in two steps.Remap bare import specifierTheimport * as utils from "gridchen/utils.js"isnotvalid JavaScript. So at HTML/JavaScript load time the
import is remapped toimport * as utils from "/@gridchen/utils.js"Route resource to Python moduleWhen the server now gets the request for/@gridchen/utils.js, then it resolves to the packagegridchenand serve its resourceutils.js.ContributePackagevisetup.py
gitcommit.-m'bumped version'gittagx.y.z
gitpush&gitpush--tags
pythonsetup.pysdistbdist_wheel## Publishing````shellscript
python-mtwineuploaddist/*Previous WorkBundlersUnpkg.com, rollup, webpack, babel, pika, assetgraph, Browserify, gulp, JSPMIn Place HandlersSnowpackBrowsersyncES Module ShimsReferenceshttp://dplatz.de/blog/2019/es6-bare-imports.htmlhttps://jakearchibald.com/2017/es-modules-in-browsers/https://medium.com/@dmnsgn/in-2020-go-bundler-free-eb29c1f05fc9https://wicg.github.io/import-maps/https://medium.com/@dmnsgn/es-modules-in-the-browser-almost-now-3638ffafdc68https://github.com/fanstatic/fanstaticPackages onPyPI starting with js.
Package: whatever
An easy way to make lambdas by partial application of python operators.Inspired by Perl 6 one, seehttp://perlcabal.org/syn/S02.html#The_Whatever_ObjectUsagefromwhateverimport_,that# get a list of guys namesnames=map(_.name,guys)names=map(that.name,guys)odd=map(_*2+1,range(10))squares=map(_**2,range(100))small_squares=filter(_<100,squares)best=max(tries,key=_.score)sort(guys,key=-that.height)factorial=lambdan:reduce(_*_,range(2,n+1))NOTE: chained comparisons cannot be implemented since there is no boolean overloading in python.CAVEATSIn some special cases whatever can cause confusion:_.attr# this makes callableobj._# this fetches '_' attribute of obj_[key]# this works tood[_]# KeyError, most probably_._# short for attrgetter('_')_[_]# short for lambda d, k: d[k]if_=='Any value':# You will get here, definitely# `_ == something` produces callable, which is true[1,2,_*2,None].index('hi')# => 2, since bool(_ * 2 == 'hi') is TrueAlso, whatever sometimes fails on late binding:(_*2)('2')# -> NotImplemented
Package: whatever-forever
``whatever-forever``====================Create reusable, higher-order functions using declarative syntaxes inPython.Installation------------``pip install whatever-forever``Basic Usage-----------Chaining in Python~~~~~~~~~~~~~~~~~~.. code:: pythonfrom whatever import *__my_chain = __x(5).range.map(lambda x: x+3).list__my_chain.. parsed-literal::[3, 4, 5, 6, 7]A random list'''''''''''''.. code:: pythonfrom random import random__random_list = __x(5).range.map(lambda x: random()).list.value()str(__random_list).. parsed-literal::'[0.10095399022711649, 0.8604968925166636, 0.008445535846122287, 0.6610363926991931, 0.6330613356373495]'Syntactic Sugar~~~~~~~~~~~~~~~.. code:: pythonfrom random import random__x(__random_list.__()) * (lambda s: '%3.2f' % s) | list.. parsed-literal::['0.08', '0.06', '0.33', '0.89', '0.71'].. code:: pythonfrom random import random((__x(__random_list.__()) + (lambda x: x >.5) )* (lambda s: '%3.2f' % s)| list).. parsed-literal::['0.80', '0.63', '0.80', '0.64']Development-----------Running the Build and Tests^^^^^^^^^^^^^^^^^^^^^^^^^^^::pip install -r requirements-dev.txtpython setup.py developwatchmedo tricks tricks.yamlThe ``watchmedo`` script will convert your notebooks to scripts and htmlfiles. ``py.test-ipynb`` will test all notebooks matching``test-*.ipynb``.Running the docs^^^^^^^^^^^^^^^^::jekyll serve docs -witDocs are hosted at ``http://localhost:4000/whatever-forever/``.License-------``whatever-forever`` is released as free software under the `BSD3-Clauselicense <https://github.com/tonyfast/whatever-forever/blob/master/LICENSE>`__.
Package: whaTFRecordsWriter
whaTFRecordsWriterOverviewAre you having trouble saving your precious data into an easy format for training and testing? Well, you're in luck because withwhaTFRecordsWriterwe are trying to minimize the effort required to simplify your dataset withTFRecord.InstallationPython 3.6+ is requiredpipinstallwhaTFRecordsWriterExampleConverting Images with no labels to tfrecords# 'test.tfrecords' is what you want to name your tfrecords# 'test_data' is the file directory that has the following structure:# test_data: /#       [image_0001.jpg]#       [image_0002.jpg]#       [image_000x.jpg]#       ...# 'writes_per_tfrecords' is the number of images to save per tfrecord.importwhaTFRecordsWriteraswrwr.write_images_folder('test.tfrecords','test_data',writes_per_tfrecords=10)
Package: whathappened
whathappenedA changelog generator using simply structured git commit messagesInspired byCommit-It-SimpleandSemVerAngular Commit Message FormatAuto Changeloggit_commits.pyInstall and RunInstallation is as simple as it gets:$ pip install whathappenedTo generate a changelog, run:$ whathappenedMake sure to activate any virtual environment that you might be using first.Some options are available:$ whathappened --help
Usage: whathappened [OPTIONS] [GIT_LOG_ARGS]...

  Handle command line arguments. Extra arguments are passed to 'git log'.

Options:
  --overriding-version TEXT  Specify a version number to use [format: x.y.z]
  -o, --output PATH  The changelog destination [default: stdout]
  -e, --emoji        Include emoji in headings if present
  -d, --development  Include development-related commits
  -p, --prefix TEXT  Version prefix, often 'version' or 'v' [default: '']

  --version          Show the version and exit.
  --help             Show this message and exit.To limit the range of commits, add arevision rangeargument.To create a changelog of commits that are yet to be pushed:$ whathappened origin..HEADTo create a changelog of commits between (branch: main) and (tag: v1.0.0) and write the output to file:$ whathappened -o CHANGELOG.md main..v1.0.0To create a development changelog, with addition headings like 'Testing' and 'Reverted':$ whathappened -dPackage ChangelogCreated by Whathappened itself - very meta.For the complete changelog, please seeCHANGELOG.md.Whathappened Commit Message FormatFor a full description of the message format, seeCommit-It-Simple.Whathappened expects git commit messages in the format outlined below:[optional breaking ]<type>[ optional (<scope>)]: <description>

[optional body]<type>is recommended to be one of:fix
feat
build
ci
docs
style
refactor
perf
testVariations on these types likefeat, feature, features, ordoc, docsare seamlessly grouped together.The<scope>is recommended to be a module, file, or folder name as appropriate.More examples can be viewed on whathappened's owncommits.For a nice summary oftypes and what they mean, please seeUnderstanding Semantic Commit Messages Using Git and Angular.EmojiAdding the--emojiflag will add emoji after each heading in the changelog. Below are the emoji that are used:Production:Docs 📝Features ✨Fixes 🐛Performance ⚡️Refactorings ♻️Other 🃏Development:Continuous Integration 🤖Reverted ☠️Testing 🧪
Package: whatimage
whatimagePython library to detect image type from a few bytes, focussed on webby formats (old and new)Currently supports:JPEGWEBPGIFPNGHEICAVIFBMPTIFFPGM/PGM/PPMInstallationpip install whatimageUsageimportwhatimagewithopen('image.jpg','rb')asf:data=f.read()fmt=whatimage.identify_image(data)print(fmt)'jpeg'
Package: whatis
WhatIs packageGives a concise summary of any object's structure and avoids accidentally printing a huge object to stdout.Works with various libraries (NumPy, PyTorch etc.) via duck typing.Exampleswhatisis useful for inspecting large objects quickly:>>x=list(enumerate(range(7,4129,3)))>>x# ... (veeery large output) ...>>whatis(x)listlen=1374├tuplelen=2│├0:int│└7:int│├tuplelen=2│├1:int│└10:int│├tuplelen=2│├2:int│└13:int│├tuplelen=2│├3:int│└16:int│└...>>And makes it easy to view the format of objects like this>>>x=np.ones((5,5))>>>out=np.linalg.eig(x)>>>out# A lot of information...(array([5.00000000e+00,5.65333918e-49,0.00000000e+00,0.00000000e+00,1.73014109e-64]),array([[-4.47213595e-01,1.13586253e-16,1.13586253e-16,1.38161505e-31,-1.11062157e-16],[-4.47213595e-01,8.66025404e-01,8.66025404e-01,1.05339661e-15,-8.46780726e-01],[-4.47213595e-01,-2.88675135e-01,-2.88675135e-01,-2.39769783e-16,1.11088069e-01],[-4.47213595e-01,-2.88675135e-01,-2.88675135e-01,-7.07106781e-01,3.67846328e-01],[-4.47213595e-01,-2.88675135e-01,-2.88675135e-01,7.07106781e-01,3.67846328e-01]]))>>whatis(out)tuplelen=2├ndarrayshape=(5,)dtype=float64└ndarrayshape=(5,5)dtype=float64>>or this>>x=torch.randn((103,75))>>out=torch.topk(x,5)# what's the format of the output again..?>>out# ... (very large output) ...>>whatis(out)topklen=2├Tensorshape=torch.Size([103,5])dtype=torch.float32device=cpu└Tensorshape=torch.Size([103,5])dtype=torch.int64device=cpu>>UsagefromwhatisimportwhatisSetuppip install whatis
Package: whatisthis
whatisthis==========UI for manual image classificationInstallation------------.. code:: bashpip install whatisthisUsage-----.. code:: pythonfrom whatisthis import serverdef emitter(image, tag):print(image, tag)server.create(emitter=emitter,images=images,categories=categoriesport=8081)License-----The MIT License (MIT)Copyright (c) Tom AlexanderPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, 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 INTHE SOFTWARE.
Package: whatlangid
whatlangidThis project is build on top ofwhatthelangandlangidWhy this project exist?seeissue_lang.pyDependenciesThe dependencies can be installed using the requirements.txt file:$pipinstall-rrequirements.txtInstallfrom github$pipinstallgit+https://github.com/bung87/whatlangidfrom pypi$pipinstallwhatlangidBasic UsagePredicting Language usingwhatlangid>>>fromwhatlangidimportWhatLangId>>>wtl=WhatLangId()>>>wtl.predict_lang("Mother")'en'>>>wtl.predict_lang("தாய்")'ta'>>>wtl.predict_lang("അമ്മ")'ml'>>>wtl.predict_lang("पिता")'hi'>>>wtl.predict_pro(["English sentence","അമ്മ"])[('en',0.8848170638084412),('ml',0.9535570740699768)]Batch Prediction is also supported>>>wtl.predict_lang(["അമ്മ","पिता","teacher"])['ml','hi','en']Advanced usagewtl = WhatLangId(custom_model=abs_path)use bin version model which is faster and slightly more accurate, but has a file size of 126MBpython -m whatlangid.use_binSupported LanguagesSupports 176 languages . The ISO codes for the corresponding languages are as below.af als am an ar arz as ast av az azb ba bar bcl be bg bh bn bo bpy br bs bxr ca cbk
ce ceb ckb co cs cv cy da de diq dsb dty dv el eml en eo es et eu fa fi fr frr fy ga
gd gl gn gom gu gv he hi hif hr hsb ht hu hy ia id ie ilo io is it ja jbo jv ka kk km
kn ko krc ku kv kw ky la lb lez li lmo lo lrc lt lv mai mg mhr min mk ml mn mr mrj ms
mt mwl my myv mzn nah nap nds ne new nl nn no oc or os pa pam pfl pl pms pnb ps pt qu
rm ro ru rue sa sah sc scn sco sd sh si sk sl so sq sr su sv sw ta te tg th tk tl tr
tt tyv ug uk ur uz vec vep vi vls vo wa war wuu xal xmf yi yo yue zhModel Training DetailsQuantized model built using Fasttext. More details present in the fasttextblogReferenceWhatLangIdis powered byFastTextandlangidEnriching Word Vectors with Subword Information[1] P. Bojanowski*, E. Grave*, A. Joulin, T. Mikolov,Enriching Word Vectors with Subword Information@article{bojanowski2016enriching,
  title={Enriching Word Vectors with Subword Information},
  author={Bojanowski, Piotr and Grave, Edouard and Joulin, Armand and Mikolov, Tomas},
  journal={arXiv preprint arXiv:1607.04606},
  year={2016}
}Bag of Tricks for Efficient Text Classification[2] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov,Bag of Tricks for Efficient Text Classification@article{joulin2016bag,
  title={Bag of Tricks for Efficient Text Classification},
  author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas},
  journal={arXiv preprint arXiv:1607.01759},
  year={2016}
}FastText.zip: Compressing text classification models[3] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov,FastText.zip: Compressing text classification models@article{joulin2016fasttext,
  title={FastText.zip: Compressing text classification models},
  author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{\'e}gou, H{\'e}rve and Mikolov, Tomas},
  journal={arXiv preprint arXiv:1612.03651},
  year={2016}
}