Saravanan666/pypi-org huggingface dataset:
Package: wulfric
Crystal, Lattice, Atoms, K-path.For the detailed description checkdocumentation.InstallationRequirement for Wulfric installation are:Python (>=3.8)NumPySciPytermcolormatplotlib (optional)plotly (optional)Optional dependencies are required if you want to use visual capabilities.Wulfric can be installed withpipor from source.pipTo install Wulfric, run (you may need to usepip3):pip install wulfricTo install with optional visualisation capabilities, run (you may need to usepip3):pip install wulfric[visual]Installing from sourceClone the project to your local computer:git clone git@github.com:adrybakov/wulfric.gitChange the directory:cd wulfricInstal the dependencies (you may need to usepip3):pip install -r requirements.txtTo install Wulfric, run (you may need to usepip3):pip install wulfric
Package: wulkanowy-qr
UONET+ QR Code converter for PythonInstallationpip install wulkanowy-qrUsage>>>importwulkanowy_qr>>>wulkanowy_qr.encode("0123456789ABCDEF","CERT#https://api.fakelog.cf/Default/mobile-api#FK100000#ENDCERT")'27Grk6d8ZDely5eeF7j2ngWrWV9eZa5Dz9ZmuiBavysDp74TCr6EHJOs6TaIXFh3HsROWSM11pv3cPvRGSi7Nw=='>>>wulkanowy_qr.decode("0123456789ABCDEF","27Grk6d8ZDely5eeF7j2ngWrWV9eZa5Dz9ZmuiBavysDp74TCr6EHJOs6TaIXFh3HsROWSM11pv3cPvRGSi7Nw==")'CERT#https://api.fakelog.cf/Default/mobile-api#FK100000#ENDCERT'
Package: wultiplexor
WultiplexorWhat?Wultiplexor is a reverse proxy server and client that uses websockets to multiplex tcp connections or unix sockets.
You can use it to forward connections from one machine to another both behind NAT or firewall.How?Why?In the beginning, I had needed to redirect a unix socket for one specific application.
Later I implemented this in a general way.Deploy server using docker composedockernetworkcreatewultiplexorDOMAIN=wultiplexor.example.comACME_EMAIL=acme@example.comSECRET=sEcReTkEydockercompose-pwultiplexor-fcompose.yamlup--build-dWARNING:The server is not intended to be used "as is" in a public accessible infrastructure.
Use a reverse proxy likeTraefikto secure the connection like I did in thecompose.yamlfile.Install the client utilitypipinstallwultiplexorUsage: Forward tcp portOn one machine, called the server or acceptor:whannelws://example.com/acceptor-ssEcReTkEylocalhost8080sEcReTGaTeWaYnAmeEnc-l8080On another machine, called client or requestor:whannelws://example.com/requestorsEcReTGaTeWaYnAmeE9090nclocalhost9090And now you can chat between two machines.Usage: Forward unix socket fileOn one machine, called the server or acceptor:whannelwss://example.com/sock-acceptor-ssEcReTkEy./serversEcReTGaTeWaYnAmeEsocatUNIX-LISTEN:./server,forkSTDIOOn another machine, called client or requestor:whannelwss://example.com/sock-requestorsEcReTGaTeWaYnAmeE./clientsocatSTDIOUNIX-CONNECT:./clientAnd now you can chat between two machines.Mixed usageYou can mix unix sockets and tcp ports. To do that, use tcp-acceptor from one side and sock-requestor from the another.
Or vice versa. This is also a way to "convert" a unix socket to a tcp port on the same machine.
Package: wumb-to-sqlite
wumb-to-sqliteScrapeWUMB playliststo SQLite.WUMB is a public radio station based at UMass Boston. It's awesome andyou should support itif you like great music with no ads. This is a personal project, however, and not associated with WUMB or UMass Boston in any way.The station puts its daily playlist online here:http://wumb.org/cgi-bin/playlist1.pl. I often want to look up a song I heard in the car, or remember something that played last week. I'm also just curious about the music mix. So this is a tool to scratch that itch.InstallationInstall this tool usingpip:pip install wumb-to-sqliteOr install globally withpipx:pipx install wumb-to-sqliteUsageScrape today's playlist:wumb-to-sqlite playlist wumb.dbThat will use (or create) a SQLIte database calledwumb.dband a table calledplaylist. Change the table name by passing a--tableoption.Scrape a specific date, with a custom table name:wumb-to-sqlite playlist wumb.db --table songs --date 2020-09-01That will get songs fromSept. 1, 2020, and use a table calledsongs.Scrape all daily playlists from Oct. 1 to Oct. 11, 2020:wumb-to-sqlite playlist wumb.db --since 2020-10-01 --until 2020-10-01 --delay 1That will pull down playlists for each day between Oct. 1 and 11, inclusive. It adds a one second delay (which is the default) between days, as a courtesy to WUMB's servers.Downloaded pages are cached locally, so subsequent runs don't keep re-fetching the same data. By default, it's located at$HOME/.wumb-to-sqlite/.DevelopmentTo contribute to this tool, first checkout the code. Then create a new virtual environment:cd wumb-to-sqlite
python -mvenv venv
source venv/bin/activateOr if you are usingpipenv:pipenv shellNow install the dependencies and tests:pip install -e '.[test]'To run the tests:pytestPlease note that scraping tests should be run against the included HTML filetests/wumb-2020-10-10.html, not against the live site. Again, this is a small public radio station. Please be nice.
Package: wumpy-bot
Wumpy-botEasy to use high abstraction over other Wumpy subpackages.This is the most beginner-friendly way to use Wumpy, and provides all features
of the Discord API. This is the primary package installed from PyPI when you
only specifywumpy.Getting startedAll official Wumpy projects prioritise both asyncio and Trio support so you can
run the bot under either:importanyiofromwumpy.botimportBotbot=Bot('ABC123.XYZ789')# Replace with your token and keep it safe!# This runs the bot with Trio as the event loop (recommended),# use backend='asyncio' to run it under asyncio.anyio.run(bot.run,backend='trio')Registering listenersContinuing from the previous code, you can register listeners for Discord
events using Wumpy's rich event listeners:importanyiofromwumpy.botimportBotfromwumpy.bot.eventsimportMessageDeleteEventbot=Bot('ABC123.XYZ789')@bot.listener()asyncdeflog_deleted_messages(event:MessageDeleteEvent):print(f'Message{event.message_id}in{event.channel_id}was deleted')anyio.run(bot.run,backend='trio')The listener is registered with the@bot.listener()decorator, which tells
Wumpy to read the annotation of the first parameter (name does not matter, but
here it is calledevent) and register that function for the type of event
that it is typehinted as.
Package: wumpy-cache
Wumpy-cacheSimple memory cache for the gateway.The default implementation inwumpy-cacheis rather simple dictionaries, but
it can be overriden by other implementations as long as they follow the typingCacheProtocol.This means that you can use alternate implementations of data structures for
more efficient retrieval for your use-case or offload caching to something like
Redis or even store it in Postgres.
Package: wumpy-gateway
Wumpy-gatewayGateway implementation for the Wumpy project.InstallationWumpy-gateway is available as a package on PyPI. Just use your favourite
package manager such as pip or Poetry:# Installing from PyPI using pip:pipinstallwumpy-gateway# Alternatively, using Poetry:poetryaddwumpy-gatewayQuickstartThe API of wumpy-gateway is very simple:fromwumpy.gatewayimportShardINTENTS=65535TOKEN='ABC123.XYZ789'asyncdefmain():# Connect to the URI wss://gateway.discord.gg/ with the token# ABC123.XYZ8789 and all intents.asyncwithShard('wss://gateway.discord.gg/',TOKEN,INTENTS)asws:asyncforeventinws:print(event)# The deserialized JSON event payload
Package: wumpy-rest
Wumpy-restRichly and accurately typed wrapper around the Discord REST API.UsageThe best way to usewumpy-restis to importAPIClient:importanyiofromwumpy.restimportAPIClientTOKEN='ABC123.XYZ789'asyncdefmain():asyncwithAPIClient(TOKEN)asapi:print(awaitapi.fetch_my_user())anyio.run(main)APIClientis a class that implements all routes of the Discord API. This is
made up of multiple route classes. You can create your own class with the
routes you use:fromwumpy.restimport(ApplicationCommandRequester,InteractionRequester,HTTPXRequester)classMyAPIClient(ApplicationCommandRequester,InteractionRequester,HTTPXRequester):__slots__=()# Save some memory for this classFilesSome endpoints support uploading files, for these a file-like object is
expected that's been opened in binary-mode (for example'rb').For the message/interaction endpoints, remember to include a matchingattachmentobject with'id'set to the index of the file.RatelimiterYou can pass a custom ratelimiter to the requester if you want to customize
that behaviour. For more,read the documentation.
Here's an example of a ratelimiter that does no ratelimiting and does not
handle any kind of429-responses.fromcontextlibimportasynccontextmanagerfromtypingimport(Any,AsyncContextManager,AsyncGenerator,Awaitable,Callable,Coroutine,Mapping)importanyiofromwumpy.restimportAPIClientclassNoOpRatelimiter:"""Ratelimiter implementation that does nothing; a no-op implementation."""asyncdef__aenter__(self):returnselfasyncdef__aexit__(self,exc_type:Optional[Type[BaseException]],exc_val:Optional[BaseException],exc_tb:Optional[TracebackType])->object:pass@asynccontextmanagerasyncdef__call__(self,route:Route)->AsyncGenerator[Callable[[Mapping[str,str]],Coroutine[Any,Any,object]],None]:# The return type may look a little weird, but this is how# @asynccontextmanager works. You pass it a function that returns an# async generator (which yields what the asynchronous context manager# then returns).yieldself.updateasyncdefupdate(self,headers:Mapping[str,str])->object:passasyncdefmain():asyncwithAPIClient(TOKEN,ratelimiter=NoOpRatelimiter())asapi:print(awaitapi.fetch_my_user())anyio.run(main)
Package: wuncolors
wuncolorsHelp manipulate Color objects and use custom Color Palettes.Basic UsageColorPalette ObjectContains a hierachy of colors.fromwuncolorsimportColorPalettepalette=ColorPalette.from_toml(full_path="palette_example.toml")Primary
 - blue(0, 0, 255, 1.0)
 - red(255, 0, 0, 1.0)
Secondary
 - random(100, 56, 1, 1.0)
 - random2(222, 222, 7, 1.0)
Others
 - white(255, 255, 255, 1.0)fromwuncolorsimportColorPalettepalette=ColorPalette.from_toml(full_path="palette_example.toml")blue=palette.get_primary("blue")red=palette.all_colors("red")all_primary=palette.get_primary()all_secondary=palette.get_secondary()all_colors=palette.all_colors()print(all_primary)[blue(0, 0, 255, 1.0), red(255, 0, 0, 1.0)]Color objectsfromwuncolorsimportColorblue=Color.from_tuple(name="blue",rgb=(0,0,255))Dynamic UsageYou can create a Palette from scratch and be save using the to_toml() method. Duplicate colors will be ignored if inserted in the same category. Colors are stored as sets in the palette.fromwuncolorsimportColor,ColorPalettep=ColorPalette("Example")p.primary.add(Color.from_tuple("blue",(0,0,255)))p.secondary.add(Color.from_tuple("blue",(0,0,255)))p.others.add(Color.from_tuple("blue",(0,0,255)))p.to_toml("test_palette.toml")ColorPalette(Example)
    Primary
     - blue(0, 0, 255, 1.0)
    Secondary
     - blue(0, 0, 255, 1.0)
    Others
     - blue(0, 0, 255, 1.0)
Package: wunderground-pws
Weather Underground PWS Python APIA small Python module forWeather Underground PWSAPIs.Installation$ pip3 install wunderground_pwsExample usagefromdatetimeimportdatefrompprintimportpprintfromwunderground_pwsimportWUndergroundAPI,unitswu=WUndergroundAPI(api_key='my api key',default_station_id='KMAHANOV10',units=units.ENGLISH_UNITS,)print('Current status of my weather station:')pprint(wu.current()['observations'][0])print('Summary of last 7 days:')pprint(wu.summary())print('Detailed hourly history for the last 7 days:')pprint(wu.hourly())print('History for 4/20/2019:')pprint(wu.history(date(day=20,month=4,year=2019)))Building docs$ pip3 install -r requirements-docs.txt
$ cd docs/
$ make html
Package: wunderpy2
OverviewWunderpy2 is a thin Python library for accessingthe official Wunderlist 2 API. What does a thin library mean here?Only the bare minimum of error-checking to passthe Wunderlist API specificationsis performed (e.g. there’s no checking whether a task’s title is empty, even though the Wunderlist web client enforces nonempty titles).There aren’t any ‘convenience’ functions, like getting a list by name instead of ID (that being said, I’ll likely get tired of repeating the same things myself, write a few, and bundle them in a separate helper module).Installationpip install wunderpy2Usage & ExamplesGetting a clientWunderlist uses OAuth2 to allow applications to access users’ data, so you’ll need tocreate an applicationbefore doing anything. If you only want to access your own Wunderlist, generate an access token after creating your application and use it and the client ID as follows:import wunderpy2
api = wunderpy2.WunderApi()
client = api.get_client(access_token, client_id)    # Fill in your valuesIf you want other Wunderlisters to use your application, you’ll need to see the “Redirect users to request Wunderlist access” section ofthe authorization docsin order to get a temporary code when a user has authorized your app. Once you have the code, you only need one more step:api = wunderpy2.WunderApi()
access_token = api.get_access_token(temporary_code, client_id, client_secret)   # Fill in your values here
client = api.get_client(access_token, client_id)    # Fill in your client IDWunderlist ObjectsAll Wunderlist objects are merely Python objects with special keys. For convenience, these keys are laid out in a class format inmodel.py. Note that not every object will have every key (e.g. List objects with type ‘inbox’ do not have creation metadata).ExamplesCreating a task with a due date, note, ‘starred’ flag, and subtask:lists = client.get_lists()
list = lists[0]
task = client.create_task(1234, "My new task", due_date="2015-08-02", starred=True)
client.create_note(task[wunderpy2.Task.ID], "My note")
client.create_subtask(task[wunderpy2.Task.ID], "My subtask")Shuffling the order of tasks within a list (seethe Positions endpoint documentation):import random
task_positions_obj = client.get_task_positions_obj(list[wunderpy2.List.ID])
ordering = task_positions_obj[wunderpy2.Task.VALUES]
random.shuffle(ordering)
client.update_task_positions_obj(task_positions_obj[wunderpy2.TaskPositionsObj.ID], task_positions_obj[wunderpy2.TaskPositionsObj.REVISION], ordering)TODOEndpoint implementation:AvatarFileFile previewFolderReminderTask commentUploadUserWebhooks?Release History0.1.6 (2018-07-27)
—
* Fix typo in RecurrenceTypes class name0.1.5 (2018-07-27)
—
* Switch fromdict.iteritems()todict.items()for Python 2 & 3 compatibility
* Expose a few more classes in the public-facing API0.1.4 (2016-03-14)Bugfix in task endpoint code0.1.3 (2016-03-12)Fix imports for Python 30.1.2 (2015-10-31)Added ‘position’ endpointAdded ‘subtask’ endpoint0.1.1 (2015-08-16)Fixed setup.py requiring ‘argparse’ module for Python >2.60.1.0 (2015-08-15)Initial releasewunderpy2 is written and maintained bymieubrisseContributorsNobody yet!
Package: wunderpy2-python-3-fixes
OverviewWunderpy2 is a thin Python library for accessingthe official Wunderlist 2 API. What does a thin library mean here?Only the bare minimum of error-checking to passthe Wunderlist API specificationsis performed (e.g. there’s no checking whether a task’s title is empty, even though the Wunderlist web client enforces nonempty titles).There aren’t any ‘convenience’ functions, like getting a list by name instead of ID (that being said, I’ll likely get tired of repeating the same things myself, write a few, and bundle them in a separate helper module).Installationpip install wunderpy2Usage & ExamplesGetting a clientWunderlist uses OAuth2 to allow applications to access users’ data, so you’ll need tocreate an applicationbefore doing anything. If you only want to access your own Wunderlist, generate an access token after creating your application and use it and the client ID as follows:import wunderpy2
api = wunderpy2.WunderApi()
client = api.get_client(access_token, client_id)    # Fill in your valuesIf you want other Wunderlisters to use your application, you’ll need to see the “Redirect users to request Wunderlist access” section ofthe authorization docsin order to get a temporary code when a user has authorized your app. Once you have the code, you only need one more step:api = wunderpy2.WunderApi()
access_token = api.get_access_token(temporary_code, client_id, client_secret)   # Fill in your values here
client = api.get_client(access_token, client_id)    # Fill in your client IDWunderlist ObjectsAll Wunderlist objects are merely Python objects with special keys. For convenience, these keys are laid out in a class format inmodel.py. Note that not every object will have every key (e.g. List objects with type ‘inbox’ do not have creation metadata).ExamplesCreating a task with a due date, note, ‘starred’ flag, and subtask:lists = client.get_lists()
list = lists[0]
task = client.create_task(1234, "My new task", due_date="2015-08-02", starred=True)
client.create_note(task[wunderpy2.Task.ID], "My note")
client.create_subtask(task[wunderpy2.Task.ID], "My subtask")Shuffling the order of tasks within a list (seethe Positions endpoint documentation):import random
task_positions_obj = client.get_task_positions_obj(list[wunderpy2.List.ID])
ordering = task_positions_obj[wunderpy2.Task.VALUES]
random.shuffle(ordering)
client.update_task_positions_obj(task_positions_obj[wunderpy2.TaskPositionsObj.ID], task_positions_obj[wunderpy2.TaskPositionsObj.REVISION], ordering)TODOEndpoint implementation:AvatarFileFile previewFolderReminderTask commentUploadUserWebhooks?Release HistoryTBASwitch fromdict.iteritems()todict.items()for Python 2 & 3 compatibilityExpose a few more classes in the public-facing API0.1.4 (2016/03/14)Bugfix in task endpoint code0.1.3 (2016/03/12)Fix imports for Python 30.1.2 (2015/10/31)Added ‘position’ endpointAdded ‘subtask’ endpoint0.1.1 (2015/08/16)Fixed setup.py requiring ‘argparse’ module for Python >2.60.1.0 (2015/08/15)Initial releasewunderpy2 is written and maintained bymieubrisseContributorsNobody yet!
Package: wundertool
wundertool-py==============Tool for working with `Docker <https://www.docker.com/>`_ containers.Mission statement:1. Provide a simplified and unified tool for all the members of the team.2. Provide additional functionality to existing tools.3. Include everything from developing to packaging and deploying code in one tool.3. Allow the project team to easily define the whole stack of software required for the project that is used everywhere from local development to production.Requirements:- docker- python 3 or laterInstallation------------You can always install the tool from PyPI with::pip install wundertool*Note: OS X doesn't have python 3 or pip installed by default. You should install them with `brew` first and then install `wundertool`*::brew install python3pip3 install wundertoolUpgrade-------Upgrade to the latest version with::pip install wundertool --upgradeor on OS X with python 3::pip3 install wundertool --upgradeUsage-----Currently available commands are mostly equivalent of those of docker-compose. See this for list of available commands::wundertool commandsDevelopment-----------Requirements:- python 3.4 or laterYou can clone this module locally and install it in development mode in an virtual environment like this::git clone https://github.com/wunderkraut/wundertool-py.gitcd wundertool-pygit submodule initgit submodule updatepyvenv .source bin/activatepip install -e ".[dev]"You always need to activate the wundertool-py virtual environment when opening a new terminal for development::source <DIR>/wundertool-py/bin/activateSubmodule upstream changes can be updated with::git submodule update --remoteDistribution packages to PyPI can be created with::python setup.py sdistpython setup.py bdist_wheelDistribution packages can be uploaded to PyPI with::twine upload dist/wundertool-[version].tar.gztwine upload dist/wundertool-[version]-py3-none-any.whl
Package: wunger-cdk
cdk pip packagesthis project shows how to package cdk constructs as pip modules and import and use them in our projectsinstall required toolspip install setuptoolspip install twinepip install wheel.pypircyou must have a file named .pypirc in your user foldercontent must be some like this :[distutils]index-servers=pypi[pypi]repository =https://upload.pypi.org/legacy/username=change2yourusernamepassword=change2yourpasswordproject structurecdk_pip_modulesâ”œâ”€â”€ LICENSEâ”œâ”€â”€ wunger_cdk_constructs ( folder with the constructs, content will be packaged as pip module)â”‚   â”œâ”€â”€init.pyâ”‚   â”œâ”€â”€ cdk classesâ”‚   â”œâ”€â”€ ...â”œâ”€â”€ stacks (wrapper stacks to test the constructs before creating the pip module)â”œâ”€â”€ usage ( stacks that will import and use the final pip modules)â”œâ”€â”€ README.mdâ”œâ”€â”€ app.py ( main python file, entry point )â””â”€â”€ setup.py-please create your constructs in the folder wunger_cdk_constructs or your own folder ( my_cdk_constructs)-adapt setup.py-adapt the app.py-build the module and install locally-upload to remote repo-use the module by cdk stacks in usage folder, see examplecheckpython setup.py checkcreate packagepython setup.py bdist_wheelpython -m pip install dist/wunger_cdk-0.0.2-py3-none-any.whl
install same version new
python -m pip install dist/wunger_cdk-0.0.2-py3-none-any.whl --forceuploadtwine upload -r pypi dist/wunger_cdk-0.0.2-py3-none-any.whluse in client projectsetup requirements.txt:
wunger-cdk==0.0.1pip install -r requirements.txt
or explicit :
pip install wunger-cdkimport class:
from wunger_cdk.ecr_repo import WUngerEcrConstructhttps://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-packaging/https://packaging.python.org/https://dzone.com/articles/executable-package-pip-install
Package: wunlatex
wunlatexLibrary for LaTeX document writingfrompathlibimportPathimportwunlateximportpandasaspdfrommatplotlibimportpyplotaspltdoc=wunlatex.Document("Test")df=pd.DataFrame([(1,2,3,4)],columns=["One","JJJ","LKAS","ONENEE"])tbl=wunlatex.components.Table("Random Numbers",df)doc.add_component(tbl)# Sections within other sections are subsections, then subsubsections etc.doc.add_component(wunlatex.components.Section("First",components=[wunlatex.components.Section("Subsection 1",components=[tbl]),wunlatex.components.Section("Subsection 2",components=[wunlatex.components.Section("SubSubSection 3")])]))fig,ax=plt.subplots()ax.plot([1,1],[0,1])figname=Path(__file__).parent/"testfig.png"plt.savefig(figname)f=wunlatex.components.Figure("Test Fig",path=figname)doc.add_component(f)doc.compile(Path(__file__).parent,filename="Testpdf")
Package: wunplots
wunplotsAutomating plot formattingBasic UsagefrompathlibimportPathfromwuncolorsimportColorPalette,utilsfromwunplotsimportPlotting# See wuncolors packagepalpath=Path(__file__)/"color_palette.toml"colors=ColorPalette.from_toml(palpath,"example")p=Plotting()n=1000p.cycler_colors=utils.gradient(colors.all_colors("blue"),colors.all_colors("red"),n=n)fig,ax=p.new(width=3,nrows=3,ncols=3)forxinrange(0,n):ax[0,0].plot([x/n,x/n],[0,1],label=x)p.show()It can also be used by creating a new class inheriting from Plotting with more attributes and it can contain all your plotting boilerplate code to be later re-used.