Saravanan666/pypi-org huggingface dataset:
Package: plurk.py
plurk.pyAn modern library of interacting with Plurk API 2.0 for Python 3.8+.FeaturesAccess Plurk API with OAuth easily. (Code example)Full sync and async API call support.Support all API endpoints listed in the official API doc.A helper function to subscribe to timeline updates easily. (Code example)RequirementPython 3.8+Testing dependencies requires Python 3.8+. The package might still works for Python 3.7 though it is not recommended.Installation$pip3installplurk.pyQuickstartSee the example below for how to useplurk.py.Replace the value ofAPP_KEYandAPP_SECRETwith your Plurk app's key and secret.
If you haven't create a Plurk app yet, visit theApp Sign Uppage
to register your app and retrieve your app key and app secret.Note that using hardcoded credentials is a bad practice. The script here is only for demonstration purpose, do not use it without modification in production.fromplurkimportClientAPP_KEY='<your-plurk-app-key>'APP_SECRET='<your-plurk-app-secret>'withClient(APP_KEY,APP_SECRET)asclient:# Get app user's access tokenrequest_token=client.get_request_token()auth_url=client.get_auth_url(request_token)print('Plurk OAuth authorization URL (open it with browser): ',auth_url)auth_code=input('Please input the authorization code retrieved from authorization URL: ')client.fetch_access_token(request_token,auth_code)# Access Plurk APIuser_data=client.users.me()print('Display name: ',user_data.display_name)print('Plurks created: ',user_data.plurks_count)For async example, checkhere.Development$gitclonegit@github.com:shc261392/plurk.py.git
$cdplurk.py
$maketest$makeinstallmake installwill automatically create a virtualenv in the current folder named.venv.To run test suite:$maketestDependenciesplurk.pydepends on the following brilliant works:Authlibfor OAuth. The project uses theforked version.httpx, a solid library for both sync and async HTTP requestspydanticfor building data models with great typing and validation support.
Package: plus5
Plus5Python3 port of a subset of the Processing API.Inspired byp5, Plus5 usesPyGamelibrary to implement a subset of theProcessing API. It's in an early stage but works very fast, thanks to PyGame.RequirementsThe current requirements are Python3 and PyGame. PyGame usesSimple Directmedia Layer (SDL). In order to use fonts, sdl2-ttf must be also installed in the systems.Python3PyGame >= 1.9.libsdl2-ttfPlus5, Python3, PyGame and SDL are supported inmultiple operating systems(Linux, Windows, Mac).InstallationUsing pip$pipinstall-rrequirements.txt
$pipinstallplus5Using git$gitclonehttps://github.com/vrruiz/plus5/
$cdplus5/
$python3setup.pyinstalllibsdl2-ttfIn some operating systems, this library must be installed manually.UsageExample. A rectangle follows the mouse pointer.fromplus5import*defsetup():size(500,500)defdraw():background(127,0,0)stroke(255)fill(0,127,0)rect(mouseX-25,mouseY-25,50,50)run()ReferenceUsually, the calls are the same as inProcessing.py Reference.Structuredraw()exit()noLoop()setup()size(width,height)redraw()run()Environmentdelay(milliseconds)displayHeightdisplayWidthframeCountframeRateheightsize()widthColorbackground(color)color(color)fill(color)noFill()noStroke()stroke(width)strokeWeight(weight)InputkeykeyCodekeyIsPressedkeyPressed()keyReleased()mouseIsPressedmousePressed()mouseReleased()mouseXmouseYpmouseXpmouseYOutputsave()Shapearc(x,y,width,height,start,stop)circle(a,b,extent)ellipse(x,y,width,height)line(x1,y1,x2,y2)point(x,y)quad(x1,y1,x2,y2,x3,y3,x4,y4)rect(x,y,width,height)square(a,b,extent)triangle(x1,y1,x2,y2,x3,y3)Texttext(string,x,y)textSize(size)textFont(font,size)loadFont(name)createFont(name,size)ImageloadImage(filename)image(img,x,y)Mathacos(value)asin(value)atan(value)atan2(y,x)ceil(n)cos(radians)degrees(radians)exp(n)floor(n)log(n)radians(degrees)sin(radians)sqrt(n)tan(radians)ConstantsPI=3.14159265358979323846TWO_PI=6.28318530717958647693HALF_PI=1.57079632679489661923TAU=6.28318530717958647693HALF_PI=0.7853982TutorialsIntroducción a Plus5: Programación gráfica fácil con PythonAuthorVíctor R. Ruizrvr@linotipo.esLicenseMIT
Package: pluscal
pluscalPlusCalAST and builder in PythonWhat Is This?PlusCalis an algorithm language that compiles into aTLA+specification. This library definesPython typesthat form an abstract syntax tree (AST) of thePlusCalP-Syntax grammar as well as
abuilderAPI for fluently constructing algorithms. The implementation leans heavily on Pythondataclassesand type-hinting; a type checker (e.g.mypy) can be used to validate the grammar.It is anticipated that this library will be used both by humans and by programs to construct grammatically
correct specifications and run them through the TLC model checker.UsageInstall from pip:pip install pluscalCreate an algorithm:>>>frompluscal.apiimportAlgorithm,Print,Variable>>>algorithm=Algorithm("hello_world",).declare(Variable("s").in_set("Hello","World!"),).do(Print("s",label="A"),)>>>print(algorithm)--algorithmhello_worldvariables\in{"Hello","World!"};beginA:prints;endalgorithmLimitationsThis library is not complete. Some known limitations include:The lower-levelTLA+grammar used by theExpr,Field,Label,Name, andVariabletypes
are neither modeled nor validated fully. These types are essentially strings at this time.The validation logic does not express the full nuances ofPlusCal, especially as it relates to
label placement.See section3.7of the PlusCal manual.Some of the fainess operations are not yet yet implemented.See section4.6of the PlusCal manual.
Package: pluscodepy
pluscodepySimple plus code to lat/long decoder written for White Flag Project.Quickstartpip install pluscodepylist_of_places = [{'name': 'Some place string', 'latitude': 1.921313, 'longitude': 207.124523}, ...]converter = pluscodepy.Converter(filestream)latitude, longitude = converter.decode('GM83+2X Skudai, Johor')Installpip install pluscodepyUsageParameters__init__(index: list[dict])index: list[dict]List of dictionaries with a name field for the place string, a longitude field, and a latitude field.decode(pluscode: str)pluscode: strPlus code to be decoded.ReturnUnion[(float, float), False]Returns a float of tuples representing latitude and longitude OR returns false if the pluscode cannot be decoded.getCities()Returnlist[dict]List of dictionaries with a name field for the place string, a longitude field, and a latitude field.How it worksThe converter makes use of theGoogle Open Location Codelibrary to decode and works with both full code and short code. The converter will try to work offline whenever possible.If the input is a full code, it will just decode without any preprocessing. If a place string is detected in the code, it'll first check for the place's lat/long in the index file, and convert that to the 4 digit prefix. If the place is not yet indexed, it'll search on theNominatim OSM APIand index valid result's lat/long into the index file for future use. And then the lat/long values are returned as a tuple(latitude, longitude).
Package: pluscodes
pluscodesAn implementation of Google's Open Location Code algorithm forked from
theopenlocationcode==1.0.1package.MotivationThe Python implementation of Google's Open Location Code is not particularly
Pythonic with respect to its naming conventions. The core code is in bothopenlocationcodeand this package are pure Python with no dependencies
outside of the standard library.We hope to presents geocoordinates using a more consistent API. A longer term goal
to more efficiently handle bulk Plus Code assignments and further more
readily enable Plus Code lookup and categorization.InstallationThis package is available in PyPi, so simplypipinstallpluscodesUsageThePlusCodeconstructor provides the main entry point for generating
the string Plus Code (encoding) and geographic area boundary ("decoding").frompluscodesimportPlusCode,Area,Pointgoogleplex=PlusCode(37.4223041570954,-122.08410042965134)assertgoogleplex.code=='849VCWC8+W9'# Get the geocoordinate bounds for the length 10 Plus Code area.assertgoogleplex.area==Area(sw=Point(lat=37.42225,lon=-122.084125),ne=Point(lat=37.422375,lon=-122.084),)# Decode a Plus Code into a geographic region.r_googleplex=PlusCode('849VCWC8+W9')assertgoogleplex.code==r_googleplex.codeassertgoogleplex.area==r_googleplex.areaThis package also provides the originalopenlocationcode==1.0.1package
as a subpackage for use-cases that wish to adhere to openlocationcode's
API.importpluscodesfrompluscodesimportopenlocationcodeexpected_code='6FG22222+22'plus=pluscodes.encode(0.0,0.0)olc=openlocationcode.encode(0.0,0.0)assert(plus==expected_code)and(olc==expected_code)print(openlocationcode.decode('6FG22222+22'))# [0.0, 0.0, 0.000125, 0.000125, 6.25e-05, 6.25e-05, 10]print(pluscodes.decode('6FG22222+22'))# Area(sw=Point(lat=0.0, lon=0.0), ne=Point(lat=0.000125, lon=0.000125))Differences from openlocationcodeThis package does not automatically validate or normalize inputs.
For example, it is assumed that all latitude values are in[-90, 90]and all longitude values are  in[-180, 180].Moreover, the encoding and decoding APIs are combined in the PlusCode
class, with the decoding API producing a simple dataclass consisting of two
Point instances.
Package: plus-cpp
# +plusplus is a simple command line tool to manage c++ projects.## Features[x] Create a new project[x] Run the project[x] Build the project[x] Build static library[x] Build shared library[x] Build application without console[x] Build console application[x] Manage multiple subprojects[x] Manage dependencies[x] Custom dependencies[x] Add a new source file[x] Add a new header file[x] Custom build commands for dependencies## Requirementspython3gitgcc## Installation`bash $ git clone $ cd plus $ python3 setup.py install `## Usage`bash $ plus--help`## Hello World`bash $ plus init hello_world $ cd hello_world $ plus run `## SubprojectsFirst create a new project to be the parent project.`bash $ plus init parent_project `Then create a new project to be the child project.`bash $ cd parent_project $ plus init child_project--lib`Now you can add the child project to the parent project.
In the parent project directory, open theproject.tomlfile and add the child project to thesubprojectslist.`toml ... [subprojects] child_project = { path = "child_project" } ... `Now you can build the parent project and the child project will be built too.`bash $ plus build `
Package: plush
A simple Lucene interactive terminal.Main features:View store information.View indexes definition.Search using the Lucene Query Parser Syntax.Sort result list.Browse by document number.Top term occurences for a field, matching a regex.Support PyLucene 1.9.1, 2.0.0 and 2.1.0.Interactive shell emacs like command history and editing features.Command line tool and thus scriptable.Easy installation, no java required.Plush is free software distributed under the GNU GPL.Plush is written in python and can be easily customized.
Package: plushcap
Plushcap monitors websites and alerts people via text or phone call if there
is a problem.Free software: BSD licenseDocumentation:http://plushcap.readthedocs.org.FeaturesContinuously monitors a URL to determine if it is responding appropriately.Sends an SMS alert to a number if the URL HTTP response status code is
anything other than 200 OK.History0.2.1 (2014-07-15)Fixing issue with setup scripts.0.2.0 (2014-07-13)Library now sends an SMS alert if a URL returns something other than 200 OK.0.1.1 (2014-07-07)Working release that allows contacting a URL.0.1.0 (2014-07-06)First release on PyPI.
Package: plush-fabric
PlushA helper library forFabricto simplify creating and managing GitHub deploy keys when deploying your GitHub-hosted
repository. Currently, Plush is only tested on Ubuntu 22.04 LTS.Plush aims to make deployments easier by:Using OAuth flows to securely connect to the GitHub API on your behalf
(while supporting 2 factor auth and never handling your username/password)Generating SSH deploy keys on your target server/computerRegistering these deploy keys with your GitHub repo programmaticallyConfiguring your new clone to use the appropriate deploy key while not conflicting with other
SSH keys used elsewhere on your serverACL'ing these keys so they can be reused by people to fetch/deploy on your behalf
(and not readable by anyone else on the server)Example PowerShell scripts are provided that give tab completion around fab.exeTo see this project in action, follow the directions in Setup-Dev-Environment.md. You will need access to an Ubuntu 18.04 machine (ideally a VM).UsageThis project is intended to be used by projects that use or are consideringFabricfor their deployments. Plush expects Fabric 2.0 or greater.
In a project that uses Fabric, install Plush by running:pip install plush-fabricTo get started, see thefabfile.pyin theGitHub repofor a minimal usage of Plush.
For a more complete example, see myBaseDjangoAngular template.
Package: plusminus
plusminusTheplusminuspackage provides a ready-to-run arithmetic parser and evaluator,
based onpyparsing'sinfix_notationhelper method.Strings containing 6-function arithmetic expressions can be parsed and evaluated using theArithmeticParser:fromplusminusimportBaseArithmeticParserparser=BaseArithmeticParser()print(parser.evaluate("2+3/10"))The parser can also return an Abstract Syntax Tree ofArithNodeobjects:parsed_elements=parser.parse("2+3/10")Arithmetic expressions are evaluated following standard rules for operator precedence, allowing for use of parentheses to override:()
|x|
∩ & ∪ | - ^ ∆ (set operations)
**
-
* / // × ÷ mod
+ -
< > <= >= == != ≠ ≤ ≥
in ∈ ∉ (element in/not in set)
not
and ∧
or ∨
? : (ternary)Functions can be called:abs    ceil   max
round  floor  str
trunc  min    boolTheBaseArithmeticParseralso supports assignment of variables:r = 5
area = π × r²This last expression could be assigned using@=formula assignment:area @= π × r²Asris updated, evaluatingareawill be reevaluated using the new value.AnArithmeticParserclass is also defined, with more extensive operators,
including:!     - factorial  
°     - degree-radian conversion
√ ⁿ√  - square root and n'th root (2-9)
⁻¹  ⁰  ¹  ²  ³ - common exponents as superscriptsand additional pre-defined functions:sin    asin  rad    gcd
cos    acos  deg    lcm
tan    atan  ln     rnd
sgn    sinh  log    randint
gamma  cosh  log2
hypot  tanh  log10This parser class can be used in applications using algebra or trigonometry
expressions.Custom expressions can be defined using a simpleAPI.
Example parsers are included for other specialized applications
and domains:dice rolling ("3d6 + d20")time delta expressions ("today() + 2d + 12h")retail and business expressions ("20% off of 19.99")combinatoric expressions ("6C2"or"5P3")These parsers can be incorporated into other
applications to support the safe evaluation of user-defined domain-specific
expressions.
Package: plusportals
PlusPortalsAPIA reverse-engineered API providing access to information displayed on the PlusPortals web application.RequirementsPython 3.6+Installationpip3installplusportalsUsageimportplusportalsasppclient=pp.Client(True,School,Email,ID,Password)client.printGrades(markingPeriod)The code above imports the plusportals module, instantiates a client with your login credentials, and prints your grades of the specifiedmarkingPeriod.The first parameter passed to theClientconstructor is whether you would like your credentials to be cached so that they do not have to be provided again after the first time, in which case you may simply instantiate a client withclient = pp.Client(). The succeeding parameters are your PlusPortals login credentials: school name, email, ID, and password. Your ID is the multi-digit number found in the URL when you login to Plusportals.Finally, you can print the grades for each of your classes, as is done in the last line, where markingPeriod is the markingPeriod for which you would like to view your grades, e.g., 1 for Semester 1 and 2 for Semester 2.To be notified when your grades change, this package comes with theTrackerclass. Using the code below, you will be notified of a change in your grades (provided that your computer is on) with a little print statement and three beeps.importplusportalsaspptracker=pp.Tracker(markingPeriod,School,Email,ID,Password)tracker.track()The constructor for theTrackerclosely resembles that ofClient. Note that themarkingPeriodparamter is a required parameter that is necessary for the tracker to work as desired. Thetrack()method simply sends a requests to fetch the grades every 30 seconds. If the response does not match the previous, it prints a message that is accompanied by three consecutive system alert sounds.
Package: pluspy
plusFor all your adding needs, up to numbers of about 250 because otherwise the maximum recursion depth is exceeded.InstallingThe package can be installed usingpip install pluspy.ExampleTo get the sum of twopositive integersaandb, you would useplus(a, b):>>> from plus import plus

>>> plus(2, 5)
7Keep in mind the module is calledplus,notpluspy.FAQWhat is plus?Plus was made to redefine the '+'operator in a recursive way, without using the '+'-operator itself.Why?This library was inspired by the enormous amount ofisEvenandisOdd-type memes, including one where '+' was defined by hardcoding every possible combination of the first 100-or-so numbers.It was not made with the intention of being used (obv.), but rather to see how ridiculous I could make this.The last 5 lines (while-loop &bitshift) by themselves are actually enough to add two numbers together (and it doesn't exceed the maximum recursion depth instantly), which was also done for this very reason. That part being in there adds to the overall idea.Why is there a cache?Well you see, when using numbers above 10 it started to get a bit slow. Calculatingplus(50, 20)had been running for half an hour, and wasn't showing any signs of stopping any time soon.This meant I had to introducedynamic programmingto speed it up a bit, and store results of calculations that had been made before.
Package: plussize
PlusSizeFind out which log files are grows very fast.Installationpip3 install plussizeExamplesWhich log file grows faster in /var/log for next 5 seconds:pluss -t 5 /var/log/ | tailOptions-l- count lines, not just bytes (takes longer time)-r- recursive-t- time difference (in seconds) between two checks. Default: 20-z- print files with zero incrementSee alsoncdu-comparecompare ncdu export files (to watch for bigger changes, like "what takes most space every 24h")
Package: plus-slurm
plus_slurmA python module to make it simple to submit jobs to the Slurm based cluster directly from pythonDocumentationhttps://plus-slurm.readthedocs.ioCodeThe source code can be found here:https://gitlab.com/thht/plus-slurmLicenseThis module is developed by Thomas Hartmann at the Universität Salzburg. You are free to use, copy, modify, distribute it under the terms of the GPL3.
Package: plut
When you’re building several web apps simultaneously (an increasingly
common situation with microservices) it’s annoying to try and remember
which app is on which port. plut (port lookup table) does it for you.InstallationRunpip install plutUsageplut maps names to ports. You supply a name and get back the port it’s mapped
to.Imagine you have a web app with two microservices responsible for
authentication and the user dashboard. Each of these services needs to know
what port to bind to when it starts up, and what port the other is on, so they
can talk. In this case, you might code-name these servicesauthanddashboardrespectively.  Inside the authentication service, you’d say:import plut

port = plut.port('userauth')

run_webserver(port=port)Now imagine the authentication service exposes an API. Inside the dashboard
service you could say:import plut

base_url = 'http://localhost:%d/api/v1' % plut.port('userauth')
# use requests or something to send requests to base_urlFunctionsplut.port(name)returns the port thatnamemaps to.
The same port will be returned for eachname, user-wide.plut.services()returns a dict mapping names to ports.Command-Lineplutshows all names and ports.plut <name>shows the port of a name. This prints out a single
integer, so you can use its output as a command-line argument for another
program.plut rm <name>removes a port. (There’s no programmatic API for this
at the moment. Should I add it? I’m a bit lazy.)Notesplut saves everything to~/.plutfile. If you delete this you’ll
lose (or voluntarily reset) your mappings.
Package: pluthon
PluthonPluto-like programming language for Cardano Smart Contracts in PythonWhat is this?This is an programming language that compiles down to Untyped Plutus Language Core, inspired by MLabsplutoprogramming language.
It is used as an intermediate step when compiling a pythonic smart contract language down to UPLC.ContributingContributions are very welcome.NotesSome higher level functions defined in pluthon use UPLC builtin variables. In order to avoid naming conflicts, all variables assigned start with "0" and end with "_".
Package: pl-utils
PL-utilsUtils for pytorch-lightning.Collection of utils - datamodules, callbacks, models etc for pytorch-lighting.Datamodules.Imagenette.Imagenette dataset Datamodule.Subset of ImageNet.https://github.com/fastai/imagenettefrompl_utils.imagenette_datamoduleimportImagenetteDataModule,ImageWoofDataModuleimagenette_datamodule=ImagenetteDataModule(data_dir=DATADIR)imagenette_datamodule.setup()len(imagenette_datamodule.train_dataset),len(imagenette_datamodule.val_dataset)(9469, 3925)woof_datamodule=ImageWoofDataModule(data_dir=DATADIR)woof_datamodule.setup()len(woof_datamodule.train_dataset),len(woof_datamodule.val_dataset)(9025, 3929)
Package: pluto-dagger
daggerA Python implementation for controlling Pluto Drone.InstallationInstalling the package from sourceGet the latest source by cloning this repo:git clone https://github.com/rohithvarma3000/dagger.gitChange to dagger folder:cd daggerInstall the dependencies:pip install -r requirements.txtInstall dagger:pip install .ExamplesConnecting to Plutoimport dagger
Pluto_IP = "192.168.4.1"
Pluto_PORT = 23
pluto = dagger.PlutoConnection()
pluto.connect((Pluto_IP, Pluto_PORT))Intiating the SetRawRc Object for Controlling the pluto Drone using the RC paramsrc = dagger.SetRawRC(pluto)Arming the dronerc.arm_drone()Disarming the drone:rc.disarm_drone()General InformationWebsite and DocumentationTutorialHow to Use?Refer to ourtutorialto get started with daggerWorking PrinciplesSocketsWe connected to Pluto first by connecting our device to the drone’s hotspot, then we used TCP sockets to connect
to the drone using IPV4 scheme andsocketlibrary in python to do the same. The server iss hosted at192.168.4.1:23We sent the MSP Packet data encoded as bytes to pluto using sockets, the details about the packet is explained below.MSP PacketsWe usedMSP Packet schemeto communicate with Pluto, ie send commands, request data and calibrate the drone.
The data of the packet was first encoded into bytes and then sent as a byte stream (array of bytes) to the drone.
The basic structure of the packet has been explained below.Structure of the PacketHeaderDirectionMessage LengthType of PayloadMessage DataChecksum2 Bytes1 Byte1 Byte1 ByteN Bytes1 ByteDetails of the PacketType of ByteASCIIHexadecimalHeader$M0x24 0x4dDirection‘<’ or ‘>’0x3c (to the drone) or 0x3e (from the drone)Message Length0x00 - 0xffType of Payload0x01 - 0xffPayloadMessage Body encoded into N bytesChecksumXOR of Bytes of  “Msg length”, “Command” and all bytes of “Payload”MSP COMMANDSMSP_RAW_IMUMSP_ALTITUDEMSP_SET_RAW_RCMSP_ANALOGMSP_SET_COMMANDMSP_ACC_CALIBRATIONMSP_ATTITUDEMSP_MAG_CALIBRATIONMODULEDESCRIPTIONAccCalibrationCalibrates the accelerometerAltitudeGet the Altitude data from PlutoAttitudeGet the Attitude data from PlutoAnalogGet the Analog data from PlutoMagCalibrationCalibrates the magnetometerPlutoConnectionDefines API ConnectionPlutoControlControls for the Pluto DroneRawIMUGet the RawIMU data from PlutoSetCommandSets the command in PlutoSetRawRCControls the pluto using RC params