Saravanan666/pypi-org huggingface dataset:
Package: wrangler
WranglerWrangler is a static site generator for people who aren’t building blogs.At Springload, we often need to whip up static sites, but we’ve struggled to find a tool that, well..
lets us get on with it. Enter the Wrangler. It won’t expect your content to be formatted as a
series of blog posts. It doesn’t copy static assets or process SaSS or make coffee.It does one thing, and it does that one thing pretty well.We hope you like it.DocumentationFull documentation lives over here atGitHub.Install the wrangler with::>>> pip install wranglerSetupTo get started, wrangler can generate a project for you.In your terminal::>>> wrangler create .
>>> wrangler build content wwwTo automatically watch files for changes::>>> wrangler watch content wwwTo start a simple HTTP server::>>> wrangler serve wwwThat’s all for now, folks!Documentationhttps://github.com/springload/Wrangler.py.Springloadhttp://springload.co.nz.
Package: wrangles
WranglesFull documentation available atwrangles.io.What are Wrangles?Wrangles are a set of modular transformations for data cleaning and enrichment. Each Wrangle is optimized for a particular job, many of which are backed by sophisticated machine learning models.With Wrangles, you can:Extract information from a set of messy descriptions.Predict which category items belong to.Standardize text data to a desired format.Move data from one system to another.Much more...Wrangles are system independent, and allow you to pull data from one system, transform it and push it to another. Wrangles can be incorporated directly into python code, or an automated sequence of wrangles can be run as a recipe.InstallationThe python package can be installed usingpip.pipinstallwranglesOnce installed, import the package into your code.importwranglesAuthenticationSome Wrangles use cloud based machine learning models. To use them a WrangleWorks account is required.Create a WrangleWorks account:RegisterThere are two ways to provide the credentials:Environment VariablesThe credentials can be saved as the environment variables:WRANGLES_USERWRANGLES_PASSWORDMethodThe credentials can be provided within the python code using the authenticate method, prior to calling other functions.wrangles.authenticate('<user>','<password>')UsageFunctionsWrangles can be used as functions, directly incorporated into python code.Wrangles broadly accept a single input string, or a list of strings. If a list is provided, the results will be returned in an equivalent list in the same order and length as the original.# Extract alphanumeric codes from a free text strings - e.g. find all part numbers in a set of product description>>>importwrangles>>>wrangles.extract.codes('replacement part ABCD1234ZZ')['ABCD1234ZZ']>>>wrangles.extract.codes(['replacement part ABCD1234ZZ','NNN555BBB this one has two XYZ789'])[['ABCD1234ZZ'],['NNN555BBB','XYZ789']]RecipesRecipes are written in YAML and allow a series of Wrangles to be run as an automated sequence.Recipes can be triggered either from python code or a terminal command.Run# PYTHONimportwrangleswrangles.recipe.run('recipe.wrgl.yml')# TERMINALwrangles.reciperecipe.wrgl.ymlRecipe# file: recipe.wrgl.yml# ---# Convert a CSV file to an Excel file# and change the case of a column.read:-file:name:file.csvwrangles:-convert.case:input:my columncase:upperwrite:-file:name:file.xlsx
Package: wrap
useful wrap collectionsNote: this package is still in alpha. Use with caution !QuickstartInstall wrap:pip install wrapUse logcc:@show(level='DEBUG')@safe(Exception)deftest(text):print(text)raiseException('test')if__name__=='__main__':logging.basicConfig(level=logging.INFO)log=logging.getLogger()ret=test('hello world')print(ret,type(ret))
Package: wrap2
wrap2: Library for wrapping social network wrappersThewrap2package is a wrapper for various social networks wrappers.
Various networks have different format for “posts”. Twitter is chosen as standard, so other networks posts are
converted to be twitter-like.Installationpip install wrap2Usagefromwrap2importfbookfb=fbook.Facebook('id','secret')# get authorization url on Facebookurl,opts=fb.get_authorization_url('http://example.com',scope=('read','write'))# get access token and profile infoid,access_token,name,link=fb.on_authorization_callback('http://facebook.com/some_callback_url',code='some code')# Put a post on the wall of the user authorized by ``access_token``.post=fb.post(access_token)fromwrap2importtwittertw=twitter.Twitter('id','secret')# get authorization url on Twitterurl,opts=tw.get_authorization_url('http://example.com')# get access token and profile infoid,(access_token_key,access_token_secret),name,link=tw.on_authorization_callback('http://twitter.com/some_callback_url',oauth_verifier='some oauth verifier',request_token='some request token')# Put an update status of the user authorized by ``access_token``.post=tw.post(access_token)ContactIf you have questions, bug reports, suggestions, etc. please create an issue on
theGitHub project page.LicenseThis software is licensed under theMIT licenseSeeLicense© 2013 Paylogic International.Changelog0.9Initial public release
Package: wrapanapi
wrapanapiIntroductionwrapanapi is a simple virtualization client with support (in varying degrees) for the followingRed Hat Enterprize Virtualization (RHEV)Red Hat Openstack (RHOS)Red Hat OpenshiftOpenshiftVMware vCenterMicrosoft SCVMMMicrosoft AzureGoogle Compute EngineHawkularAmazon EC2It can be used to control virtualization clients and offers operations such aslist_vm (returns a list of vm_names)list_template (returns a list of templates/images)start_vm (starts a vm)stop_vm (stops a vm)Though conceptually names differ between cloud and infrastructure virtualization technologies (e.g. instance/vm)
it was decided to stick to one representation in the codebase and interface to give a singlar API across
all systems.InstallationWrapanapi can be installed viapipaspip install wrapanapiIt is always a good idea to use virtualenv to install pip packages.For Linux Users, Depending on the distribution you are using, you may need to install following packages
(or similar for your distribution of linux):libcurl-developenssl-devellibxml2-devellibxml2-staticgccIf you are in doubt if you really need these packages, you will hit errors during installation that will make it
apparent for you to figure out that you need it.
Pycurl is a one such package that requires you to install packages like ones listed above, you can read more about it athttp://pycurl.io/docs/latest/install.htmlUsageEach management system is invoked usually with a hostname and some credentialsfromwrapanapi.virtualcenterimportVMWareSystemsystem=VMWareSystem(hostname='10.0.0.0',username="root",password="password")system.list_vm()Adding a new Management SystemA management system should extend the Base class, and supply “Not Implemented” raises for items which
it doesn’t support. This behaviour may change in the future as more and more diverse management systems.frombaseimportWrapanapiAPIBaseclassRHEVMSystem(WrapanapiAPIBase):_stats_available={'num_vm':lambdaself:self.api.get_summary().get_vms().total,'num_host':lambdaself:len(self.list_host()),'num_cluster':lambdaself:len(self.list_cluster()),'num_template':lambdaself:len(self.list_template()),'num_datastore':lambdaself:len(self.list_datastore()),}def__init__(self,hostname,username,password,**kwargs):super(RHEVMSystem,self).__init__(kwargs)The call tosuperis necessary to set up the logger if noe has not been passed in with theloggerkeyword.The developer can then add their own methods to interact with their own management system. Commonly accessible
statistics are generally all named the same across management systems. In this way we can treat multiple management
systems the same and use an identical method to check the number of vms on a RHEV system, to a VMware system.Exceptions currently sit in a single module, this will probably change later with each management system having it’s own
package and exceptions stored there.This module was originally developed for assisting in the ManageIQ testing team.ContributingThe guidelines to follow for this project can be found in the
cfmedev_guide.
Package: wrapAPI
wrapAPIRequests wrapper for API testingUsageconftestconftest.pyimportpytestfromwrapapiimportApplication,Settings@pytest.fixture(scope='session')defsettings()->Settings:config=Settings()config.base_url='http://localhost:5555'config.headers['Autorization']='Basic secret'returnconfig@pytest.fixture(scope='session')defclient(settings)->Application:app=Application(settings)client=app.create()yieldclientclient.close()@pytest.fixture(scope='function')defapp(client)->Application:yieldclientclient.report.build()tests with pytest fixturedeftest_main(app):response=app.get('/api/main',status=200)response.json.should.be.is_instance(list)deftest_main_item(app):response=app.get('/api/main/666',status=200)response.json.should.be.equal({'id':666,'name':'test'})TestCasewith TestSuitefromwrapapiimportTestSuiteclassTestExample(TestSuite):deftest_main(self):response=self.app.get('/api/main',status=200)response.json.should.be.is_instance(list)deftest_main_item(self):response=self.app.get('/api/main/666',status=200)response.json.should.be.equal({'id':666,'name':'test'})AssertionErrorsIf we have any errors, raise exception with full request data:EAssertionError:E===========================================================EGET:http://localhost:5555/api/main/666
E-----------------------------------------------------------
EStatus:200EBody:None
EHeaders:{'Date':'Wed, 27 Mar 2019 12:17:48 GMT','Connection':'keep-alive','Content-Type':'application/json','Content-Length':'51'....}E===========================================================ENotequal:{'id':666,'name':'test'}=={'id':1,'name':'test'}E->expected:{'id':666,'name':'test'}E->current:{'id':1,'name':'test'}
Package: wrapcache
wrapcache：wrap cache， python方法装饰器缓存系统。wrapcache: Short for wraps cache. A Function / Method OUTPUT cache system base on function Decorators.GitHub:https://github.com/hustcc/wrapcache特点兼容各种版本的python，包括python2和python3的个版本；使用方便：一个装饰器放到方法的头部即可缓存该方法；配置简单：cache指定缓存方式、timeout指定缓存过期时间；MIT 授权协议；安装说明代码对 Python 2/3 均兼容全自动安装：easy_install wrapcache或者pip install wrapcache/pip3 install wrapcache半自动安装：先下载https://pypi.python.org/pypi/wrapcache/，解压后运行
python setup.py install手动安装：将 jieba 目录放置于当前目录或者 site-packages 目录通过 import wrapcache 来引用
Package: wrapclib
wrapclibwrapclibis a wrapper for some C libraries difficult to build
otherwise. One if them isre2with some taken frompyre2.from wrapclib import re2
s = "<h1>mot</h1>"
print(re2.compile("(<.*>)").match(s).groups())Links:GitHub/wrapclibdocumentationBlogHistorycurrent - 2021-01-09 - 0.00Mb4: Update submodule re2 to the latest (2021-01-09)0.1.30 - 2019-09-07 - 0.20Mb0.1.29 - 2019-09-07 - 0.15Mb0.1.27 - 2019-09-07 - 0.15Mb0.1.11 - 2019-03-15 - 0.03Mb2: add method findall (2019-03-15)1: build with re2 (2019-03-15)
Package: wrap-connection
wrap-connectionEasily wrap connections and cursors by using decorators.Usage example:A simple usage is this:defmake_connection():importsqlite3returnsqlite3.connect("test.db")@transact(make_connection,"cur","con")defsome_operation(person):insert_sql="INSERT INTO persons (id, name) VALUES (?, ?)"cur.execute(insert_sql,(person.id,person.name))con.commit()@transact(make_connection)defsome_other_operation():select_sql="SELECT id, name FROM persons"result=[]cursor.execute(select_sql)forrincursor.fetchall():result.append(Person(r[0],r[1]))returnresultThose will delimite a transaction in thesome_operationandsome_other_operationfunctions. Themake_connectionfunction is used to get the connection for each transaction.
Package: wrapenv
WrapEnvAn environment that can hold several callable functions along with pre- and post-processing
functions and auxilary environment. It is intended to be used as a wrapper for a function that
is to be called in a different environment than the one it was defined in.InstallationAs usual, you can install the package using pip:pipinstallwrapenvUsageThe package provides an instance of the classENVIRONMENTthat can be used as a decorator for functions that
are to be wrapped. As the instance is a global variable, it can be used from anywhere in the code (even in other modules).The example in theEXAMPLESfolder demonstrates how to use theENVIRONMENTinstance to wrap a
function that is to be called in a different environment than the one it was defined in.
Package: wraperr
WrapErrThe goal of WrapErr is to avoid contaminating main logic with try-catch blocks and the exception handling logic.Without WrapErr, you have something like this:try://dosomethingexceptExceptionase://exceptionhandlinglogicWith WrapErr, you would write something more like this:deferror_handler(e:Exception)://exceptionhandlinglogic@wrap_error(error_handler)deffoo(*args,**kwargs)://dosomethingYou can reuse the same error handling logic across multiple functions and methods:deferror_handler(e:Exception)://exceptionhandlinglogic@wrap_error(error_handler)deffoo(*args,**kwargs)://dosomething@wrap_error(error_handler):defbar(*args,**kwargs)://dosomethingelseYou can also only handle exceptions of a specific type:defvalue_error_handler(e:ValueError)://exceptionhandlinglogic@wrap_error(error_handler,ValueError)deffoo(*args,**kwargs)://dosomethingAnd you can combine different error handlers that handle different exceptions:defvalue_error_handler(e:ValueError)://exceptionhandlinglogicdefattribute_error_handler(e:AttributeError)://moreexceptionhandlinglogic@wrap_error(value_error_handler,ValueError)@wrap_error(attribute_error_handler,AttributeError)deffoo(*args,**kwargs)://dosomething
Package: wrap-exception
python2_wrapped__exceptionThis is basically an Exception class that would be used to wrap raised Exceptions.The common use case is when one wants to present a custom exception class to a downstream caller.One would typically do this:try:
    doStuffTHatTHrowsAnException()
except Exception as e:
    raise MyCustomException(e.message)However, the above code causes the execution stack at the time of the first exception to be lost.The WrappedException allows us to do this:try:
    doStuffTHatTHrowsAnException()
except Exception:
    WrappedException.throw()Callers can now catch "WrappedException" and still have the original execution stack.Alternatively, they can do this:try:
    doStuffTHatTHrowsAnException()
except Exception as e:
    WrappedException(e.message, another_parameter, etc.).throw()As WrappedException would typically be subclassed with a "business" exception.
Package: wrap-genius
wrap-geniusPython wrapper for genius.com's APISetupwrap-geniusis supported on Python 3.8+ and it can be installed usingpip.pipinstallwrap-geniusTo be able to use it, you'll need to create an API client forgenius.comand get aCLIENT ACCESS TOKEN.QuickstartAssuming you already have you access token, get an instance of the genius wrapper as follows:fromgeniusimportGeniusg=Genius(access_token="YOUR-TOKEN")With this instance you can interact with genius in many ways:# Search for an artist by nameartist=g.search_artist("Gorillaz")print(artist)>> "Gorillaz (860)"# Get the artist's song by popularityforsonginartist.songs_by_popularity:print(song)>> "Feel Good Inc. (21569)"
>> "Clint Eastwood (1698)"
>> "Saturnz Barz (3027437)"
>> "Ascension (3027418)"
>> "On Melancholy Hill (53533)"
>> ...# Get the details of a song by its idsong=g.get_song(song_id=3027414)print(song.title_with_featured)print(song.release_date_for_display)>> "Andromeda (Ft. DRAM)"
>> "March 23, 2017"# Get the song album, or the featured artistsprint(song.album)forfeaturedinsong.features:print(featured.name)>> "Humanz (335930)"
>> "DRAM (241761)"# And even, a song's lyricslyrics=song.lyricsprint('\n'.join(lyrics))>> "[Verse 1: 2-D]"
>> "When the pulsing looks to die for"
>> "Take it in your heart now, lover"
>> "When the case is out"
>> "And tired and sodden"
>> "Take it in your heart"
>> "Take it in your heart"
>> ...
Package: wrap-glmnet
Wrap GlmnetTODOs: Configuring this templateCreate a Netlify site for your repository, then turn off automatic builds in Netlify settings.Add these CI secrets:PYPI_API_TOKEN,NETLIFY_AUTH_TOKEN(Netlify user settings - personal access tokens),DEV_NETLIFY_SITE_ID,PROD_NETLIFY_SITE_ID(API ID from Netlify site settings)Set up Codecov at TODOOverviewInstallationpipinstallwrap_glmnetUsageDevelopmentSubmit PRs againstdevelopbranch, then make a release pull request tomaster.# Optional: set up a pyenv virtualenvpyenvvirtualenv3.9wrap_glmnet-3.9echo"wrap_glmnet-3.9">.python-version
pyenvversion# Install requirementspipinstall--upgradepipwheel
pipinstall-rrequirements_dev.txt
pipinstall-rrequirements_dev_extra.txt# Install local packagepipinstall-e.# Install pre-commitpre-commitinstall# Run testsmaketest# Run lintmakelint# bump version before submitting a PR against master (all master commits are deployed)bump2versionpatch# possible: major / minor / patch# also ensure CHANGELOG.md updatedChangelog0.0.1First release on PyPI.
Package: wraphper
wraphperPython wrappers for PHP functions, when you just can't shake it.Why?If you're coming from PHP, you'll take a bit of time getting used to the new names or methods in Python. You could look up something like"python str_replace"everytime you want to do so, or you could just save time and usephp.str_replace('Hello', 'Goodbye', 'Hello, world!').Why not?InstallationPip it.$ pip install wraphperUsageImport the module and then fulfil your PHP fantasies in Python:importwraphperasphpa=[1,2,3]php.count(a)# outputs: 3Supported functionsThis module is a work in progress. Not all functions are supported yet. The current list includes:countstr_replacePRs with more functions are welcome!Performance and Securitywraphper doesn't internally call PHP to run these functions, it simply provides you a PHP-like function name that runs the Python equivalent. As such, performance is unaffected because only Python is running.Similarly, there are no implications of this on security.ContributingFollow these rules with contributed functions:The function must be annative PHP function, not from a third-party library.The name of the function must match the original exactly. Otherwise, the purpose of this module is defeated.The function should take the exact same number of arguments as the original.The argument types must match the PHP types as closely as possible, sostringisstr,intisint,arrayislistordict, etc.The function must throw an appropriate exception with the exact same error message from the PHP function.The function should avoid any pre- or post-processing of the argument or return value. The goal is not to match PHP functions' inputs and outputs, but to provide a PHP-familiar syntax for Python developers.TestingTests can be run by the following command:$ python tests.pyCompatibilitywraphper has been checked with Python 2.7 and 3.6, but there's no reason why it shouldn't work with older versions.Changelog0.0.2 - 2019-01-29Addedstr_replace0.0.1.post2 - 2019-01-28BREAKINGRemoved class to make it easier to import and useAdded tuple supportAdded more testsAdded changelog0.0.1.post1 - 2019-01-26Added tests0.0.1 - 2019-01-26Initial release withcountfunction
Package: wraplite
WrapLitePython No SQL SQLite WrapperInstallationpip install wrapliteUsageimportwrapliteaswlimportdatetimeasdtimportpandasaspd# get will automatically create the database if needsimpsons=wl.get('simpsons')# table definition without any SQL knowledgesimpsons.create_table('sons',wl.TableFormat(id=str,name=str,email=str,birthday=dt.date,address=str,).primary_keys(['id']))data=[]data.append({'id':1,'name':'Bart','email':'bart@simpsons.com','birthday':dt.date('23-02-1980'),'address':'742 Evergreen Terrace in Springfield',})data.append({'id':2,'name':'Lisa','email':'lisa@simpsons.com','birthday':dt.date('09-05-1981'),'address':'742 Evergreen Terrace in Springfield',})# insert to table with any pandas DataFrame that respect the table formatsimpsons.sons.insert(pd.DataFrame(data))
Package: wraplorenzmie
wraplorenzmieA simple wrapper that uses the pylorenzmie package in order to fit full movies.https://github.com/davidgrier/pylorenzmieall necessary packages should be found in the requirments.get_next_datajust do :pip install -r requirments.txtHolopy needs to be installed through conda :conda install -c conda-forge holopyWebappTo try out the fitting of a single image, you can use the webapp provided in thehere
Package: wraplot
wraplotA simple pythonic matplotlib wrapper: plot, subplot and animate with ease.Installationgitclonegit@github.com:LucaMoschella/wraplot.gitcdwraplot
poetryinstallSample usageSpyspyplot=Spy()spyobj=Spy.Object(matrix=dense_matrix>0.5,axis_visibility='off',markersize=4)o=spyplot(spyobj)Imagescspyplot=Spy()spyobj=Spy.Object(matrix=dense_matrix>0.5,axis_visibility='off',markersize=4)o=spyplot(spyobj)PlotCloudcloudplot=PlotCloud2D()cloudobj=PlotCloud2D.Object(points=points,axis_visibility='off',xlim=[0,1],ylim=[0,1],markersize=500)o=cloudplot(cloudobj,outfile="sample/cloudplot.png")Subplottingsubplotter=Subplotter()o=subplotter(objs=[[spyobj,cloudobj],[imagescobj,spyobj]],plot_functions=[[spyplot,cloudplot],[imagescplot,spyplot]],outfile="sample/subplot.png")Animationanimator=Animator()foriinrange(50):dense_matrix=dense_matrix@dense_matrixo=imagescplot(Imagesc.Object(matrix=np.random.rand(100,100).astype(np.float)))animator.add_figure(o)animator.save("sample/video.mp4",fps=15)Live samplestreamlitrunsample/demo
Package: wrapmail
WrapmailInstallationpip install wrapmailGoogle Gmail API Wrapper SetupThis module comes with a wrapper for Google's Gmail api.
Google requires authentication for using the Gmail api. In order to use the wrapper, go to google developers console, create project, register Gmail api.
The only required scope ishttps://mail.google.com/Then, you need to download the client_secret json file and include it in your directory.After you include client_secret.json and instantiated the Gmail class and run the main python file, and automatic authentication window will open and ask you
to sign in. After signing in, if your authentication was successful you will be prompted by message "authentication flow has completed" and a pickle file will be created. As long as pickle file does not expire and is included in your working directory, you won't need to complete these steps. Do not share your client secret file, its contents or your pickle file. The authenticated email address will be used to send mails.Since OAuth is used, you don't need to allow for less secure apps in your gmail account.
Package: wrapnumpy3
IntroductionThis Python 3.2 wrapper module, requires Numpy to be installed. For a slower module that is written in pure Python, consider “Matalg”.The well documented module is easy to use and allows use of the usual
scalar variable syntax for the more complex matrix operations. Thus, for matrix multiplication of matricesmaandmbone simply writes:result = ma * mbIt is assumed that all elements of matrices are floats.
For the solution of equations ma * x = rhs (with unknown x = result), one only needs to write:result = ma ** rhsMatrix naming is left to the end user.  The module is well documented with pdf filesquickStart,userManualandreferenceManual.Documentation and ServicingQuick Startwill get an experienced user up to speed very quickly.User Manualhas an explanation and examples of most capabilities of the package, whilst theReference Manuallists all the methods and functions of the module with a brief explanation of each. In addition to the supplied pdf files, the information may also be accessible on the web at:http://akabaila.pcug.org.au/wrapnumpy3/index.htmlThe author is interested in your comments of this project and will consider all reasonable requests for extensions and improvements and/or bug fixes of the module. Your emails will be appreciated:algis.kabaila@gmail.comThe development and initial testing of the package was on a kubuntu 11.04 “natty” platform.LicenceThe module is licensed under GPL and is Open Source Freeware. You are welcome to copy it and to share it.Algis Kabaila, Canberra, 2011.