Saravanan666/pypi-org huggingface dataset:
Package: ps-typer
ps-typerDescriptionA Python program built on the PyQt5 GUI framework, used for practicing your typing skills and keeping track of your progress.IndexDependenciesInstallationUsageModesW.P.M.StatisticsLicenseDependenciesPython3(v3.9 or later)DateTimePyQt5PyQtGraphAppdirsDataclasses-JSONInstallationUsingpip(if you're on Windows, replacepython3with justpythondown below):python3-mpipinstallps-typerThen, launch the program by running the command:ps-typerNote that if the command does not work you may need to configure your systemPATHvariable (check out some Stack Overflow answers linked below).WindowsLinux or MacUsageSelect amodefrom the dropdown menu (My recommendation is alwaysRandom Text: Brown)Click on begin and start typing! Characters typed correctly are highlighted green and characters typed incorrectly are highlighted red.When finished, a window will appear displaying your accuracy, average w.p.m and whether or not you set a daily or all-time high score.Check out theStatisticssection belowModesSelect one of the following options to choose what you will be typing out:Common PhrasesFactsFamous Literature ExcerptsFamous QuotesRandom Text OptionsThese 3 options are achieved using corpora from nltk, for which documentation can be foundhere. The corpora included are:Brown, which is the first million-word electronic corpus of English.Gutenberg, which is a small selection of texts from the Project Gutenberg electronic text archive, which contains some 25,000 free electronic books, hostedhere.Webtext, a collection of web text includes content from a Firefox discussion forum, conversations overheard in New York, the movie script of Pirates of the Carribean, personal advertisements, and wine reviews, for more informal text.To reduce the number of dependencies, as well as the processing that needs to be done for formatting the text, the corpora are already processed into plain text files stored in theassets/texts/directory, along with the python script used to generate them.W.P.M.Your typing speed is measured by your average wpm, multiplied by your accuracy.Wpm is calculated as words per minute (w.p.m) using(characters typed/5)/minutesThis gives a more fair w.p.m calculation since longer words would be worth more than short words.This figure is then multiplied by the accuracy percentage, but note that accuracy lower than 75% results in a 0 w.p.m. score. Accuracy is taken into account to incentivise you to type all the text out correctly and not enforce bad habits.StatisticsThe program will save all of your daily high scores and keep track of your all-time highscore. This data is then visualised in theStatisticswindow using a graph of wpm over time so you can get a sense of how you're progressing.From here you can also reset your highscores if you so wish.Please note:All the (very limited) data this program stores can be found in the user's data directory underps-typer. By default, these should be:Linux:/home/your_username/.local/share/ps-typerMac:/Users/your_username/Library/Application Support/ps-typerWindows:C:\\Users\\your_username\\AppData\\Local\\ps-typerLicenseMIT
Package: psub
psubSubmit and monitor array jobs on Hoffman2 with minimal configuration and confusion.psub provides an intuitive way to submit array jobs on UCLA's Hoffman2 compute cluster and monitor their output logs. Instead of trying to write scripts that generate scripts that in turn gets submitted to the scheduler or dealing with environmental variables, you can do this with psub and forget about the rest:psub--mem4G--time12:00:00"./my_script.sh {} --argument {} ::: *.csv ::: arg1 arg2"When run in a folder containing f1.csv, f2.csv and f3.csv, this will submit a job array of 6 jobs for each combination ofargand each file, and request 4 GB of memory and 12 hours from the scheduler:./my_script.shf1.csv--argumentarg1
./my_script.shf1.csv--argumentarg2
./my_script.shf2.csv--argumentarg1
./my_script.shf2.csv--argumentarg2
./my_script.shf3.csv--argumentarg1
./my_script.shf3.csv--argumentarg2psub keeps all stdouts and stderrs nice and tidy. You can view and search logs associated with a particular job with thepsub logssubcommand.Seepsub --helpfor all features.There is also a Python programmatic interface:frompsubimportPsubpp=Psub(name="big_job",l_arch="intel*",l_mem="4G",l_time="1:00:00",l_highp=True)foriinrange(3):pp.add(f"echo hi{i}")# add individually# or add parameter combinations in one gopp.add_parameter_combinations("./my_script.sh{}--argument{}",["f1.csv","f2.csv","f3.csv"],["arg1","arg2"])pp.submit()# submit jobspp.status# view job statuspp.exit_codes# view exit codes of individual jobspp.rerun_failed()# rerun any failed jobs (TBA)psub is still in alpha, please let me know of any bugs.psub is for quickly running and monitoring straightforward array jobs. If your workflow has complex interdependencies, you should look into the excellentsnakemaketool.Installation:pipinstallpsubpsub stands for petko-submit, the OG ernstlab member who had the core idea.
Package: psu-progs
psu-progsA collection of utilities to put a computer-connected power supplies to good use.The extraordinarily compact collection includes only a CLI tool for charging lithium-ion batteries with a Korad PSU.Installationpipinstallpsu-progsQuick-show-me-a-thing# Charge a 1400mAh lithium-ion battery, with a Korad PSU connected at /dev/ttyACM0korad-charge-lithium-ion-p/dev/ttyACM0-c1.4Full command helpUsage: korad-charge-lithium-ion [OPTIONS]

  Charge a Li-ion battery using a Korad K300XP power supply

Options:
  -p, --port DEVICE              Name of serial device the power supply can be
                                 communicated through, e.g. /dev/ttyACM0
                                 [default: /dev/ttyUSB1; required]
  -c, --capacity FLOAT           Labeled capacity of battery, in amp hours.
                                 [required]
  --charge-current FLOAT         Current to use while in the constant-current
                                 charging phase, in amps. If not specified,
                                 this defaults to half the battery_capacity.
  --charge-voltage FLOAT         Voltage to use while in constant-voltage
                                 phase. For Li-ion cells, this value should be
                                 ≤4.2.  [default: 4.2]
  --charge-cutoff-ratio FLOAT    Ratio of the charge_current used to derive
                                 the value of measured output current at which
                                 to stop charging.  [default: 0.1]
  --channel INT                  Which channel to output power from (for power
                                 supplies with multiple channels).  [default:
                                 0; 0<=x<=1]
  --num-samples INT              When measuring current, use the average of
                                 this many number of samples. Using a value
                                 over 1 is recommended, as anomalous blips may
                                 be measured. This also addresses low readings
                                 when output is first enabled.  [default: 3;
                                 x>=0]
  --max-successive-failures INT  After this number of continuous errors are
                                 encountered while attempting to read the
                                 output current, stop charging.  [default: 5;
                                 x>=0]
  --help                         Show this message and exit.DevelopingThis package uses poetry for dependency management. To get started hacking around the codebase:Create a new virtualenv (or skip this step and let poetry do it for you)pip install poetrypoetry installGood luck!ContributingIf you have other utilities you'd like to add, or other PSUs you'd like to support, pull requests are welcomed! I may not be able to physically test all contributions, but I sure can review and merge :)
Package: psus
psusChange the status of a given process (or a group of processes) sending SIGSTOP/SIGCONT.Usage$psusfirefoxsuspendSignaled 101 processes$psusfirefoxcontinueSignaled 101 processesThe script will search for processes with the string in the first command-line argument and execute the action specified in the second command-line argument. The action can be either suspend, or continue.Installationpip install psus
Package: psusannx-email
psusannx_emailA package that allows emails to be sent through a python function usingSendgrid, provided a validSendgrid API Keyis passed as an argument to the function (sendgrid_api_key).The docs for using Sendgrid with python can be foundhere.This package was created to be used as a subpackage in a wider project - PSUSANNX.Package Functionssend_email()Installationpipinstallpsusannx-emailUsage# Import the function from the packagefrompsusannx_emailimportsend_email# Get some info about the functionhelp(send_email)Now use the function to send an email.# Send a test email from your own personal email (once you have a sendgrid api key)send_email(subject="Test email using the psusannx_email package",body="This is a test email.\n\nThanks.",from_email="<your-email>",recipients=["<recipient-1>","<recipient-2>"],sendgrid_api_key="<verified-sendgrid-api-key>")NotesThe package is quite restricted in what it can do, but it only needs to do things that are required by the parent project so there won't be much development.A new feature that will be added is the ability to send emails where the body is html, rather than just plain text.
Package: psusannx-pipeline
psusannx_pipelineA package that contains the custom classes & sklearn preprocessing pipeline object to be used in the PSUSANNX project. Creating the package will allow the custom classes to be imported into any script (like standard sklearn preprocessors) and used. In particular once the pipeline has been fit to data, this package will allow the fitted transformer to be pickled out as a file and read into another script that has this package imported too.This package was created to be used as a subpackage in a wider project - PSUSANNX.Custom TransformersCorrectNegPointsBucketFormationsGetLogRatiosGetPercentagesAndPerGameGetDifferencesCatboostEncodeFormationsDropFeaturesCustomScalerInstallationpipinstallpsusannx_pipelineUsageThis pipeline is to be used on a specific dataframe.# Import all the custom classes & pipeline objectfrompsusannx_pipeline.pipelineimport*# Fit the processing pipeline to the datadata_preprocessed=preprocessing_pipeline.fit_transform(data).dropna()Now save the fitted preprocessing pipeline out to a pkl file so it can be used in other scripts.# Import pickle for serializationimportpickle# Save out the preprocessing pipeline to be used in processing the new predictionspickle.dump(preprocessing_pipeline,open("preprocessing_pipeline.pkl","wb"))NotesThe package is quite restricted in what it can do, but it only needs to do things that are required by the parent project so there won't be much development.
Package: psusannx-s3
psusannx_s3A package that allows a connection to the Amazon simple storage service (S3) to be made, provided a valid set of AWS credentials are provided. This connection is set up through a python class which, once created, can allow for easy read/write functions for certain file extensions (.csv, .json, .pkl, .h5). It uses the boto3 package to perform these actions.
The docs for using boto3 can be foundhere.This package was created to be used as a subpackage in a wider project - PSUSANNX.Package classesPsusannxS3Installationpipinstallpsusannx-s3Usage# Import the function from the packagefrompsusannx_s3importPsusannxS3# Get some info about the functionhelp(PsusannxS3)Set up a connection to the S3 service by instantiating the class with valid credentials. And store that connection in a variables3.# Store the AWS credentials as variablesAWS_ACCESS_KEY="<aws-access-key>"AWS_SECRET_KEY="<aws-secret-key>"# Set up the connection to AWS s3 through the PsusannxS3 classs3=PsusannxS3(aws_access_key=AWS_ACCESS_KEY,aws_secret_key=AWS_SECRET_KEY)Now that we have created a connection to the S3 service with the credentials provided, we can use the class to read/write files to S3. We will demonstrate this with a pickled list object but the same steps & syntax apply for each of the other file types.For this step to work, you need to set up an AWS account & have a bucket created in S3 in your account (and that the credentials provided above have the required permissions to read/write to the S3 service).# Create a listthat we want to put in S3test_list=[1,2,3]# Use the s3 instance of the class to put the list in S3s3.write_pkl_to_s3(bucket_name="<s3-bucket-name>",object_name="<path\to\file\in\bucket\file_name.pkl>",data=test_list)We can now read the same file/list from the S3 bucket into the code, and even save the file to the local directory if necessary.# Read the pickled list from S3 to the test_list variable# & aslo persist the file to the current directory using retain=Truetest_list=s3.read_pkl_from_s3(bucket_name="<s3-bucket-name>",object_name="<path\to\file\in\bucket\file_name.pkl>",retain=True)# Print the list to screenprint(test_list)NotesThe package is quite restricted in what it can do, but it only needs to do things that are required by the parent project so there won't be much development.
Package: psusigner
PSU SignerQuick development for applying PSU digital signature using (Endensive)[https://github.com/m32/endesive].Documentshttps://documenter.getpostman.com/view/644041/2s93eU1tyDInstallationpip install psusignerExampleimportdatetimefrompsusignerimportPSUSignerdefmain():fname="file.pdf"date=datetime.datetime.utcnow()date=date.strftime("D:%Y%m%d%H%M%S+00'00'")dct={"sigflags":3,"contact":"user@psu.ac.th","location":"Hat Yai, Thailand","signingdate":date.encode(),"reason":"Test","attrs":False,}print("Secret Sign")signer=PSUSigner(code="c1",secret="",agent_key="",api_url="https://ds-dev.psu.ac.th/api/v1",# change it to use production url or remove it for using default api url)outname=fname.replace(".pdf","-signed-cms-psuhsm.pdf")signer.sign_file(fname,dct,outname)print("JWT Sign")signer=PSUSigner(code="c1",secret="",agent_key="",jwt_secret="",api_url="https://ds-dev.psu.ac.th/api/v1",# change it to use production url or remove it for using default api url)outname=fname.replace(".pdf","-signed-cms-psuhsm-jwt.pdf")signer.sign_file(fname,dct,outname)search_response=signer.search(certEntryCode="c1")print("search output:",search_response)main()
Package: psvg-cli
Parametric SVG Utilitypsvg-cliis a commandline utility for applying various transformations to Parametric SVG files.It is written in Python, using theclicklibrary for commandline interfaces, and follows the same pattern as theimagepipe exampleformulti-command chaining.You can access help for the tool as a whole (psvg-cli --help), or for a specific command (psvg-cli process --help), or a subcommand (psvg-cli process open --help).InstallationYou can install the latest release from pypi usingpip install psvg-cliAlternatively, you can install from the source code in this repository by running:gitclonehttps://github.com/jamesscottbrown/psvg-cli.gitcdpsvg-cli
pythonsetup.pyinstallExamplespsvg-cli parameters glyph_definitions/*

psvg-cli process opendir ./glyph_definitions  \
remove_parametric_params save

psvg-cli process \
open -i glyph_definitions/Aptamer.svg -i glyph_definitions/CDS.svg \
remove_parametric_params save

psvg-cli process \
open -i glyph_definitions/Aptamer.svg -i glyph_definitions/CDS.svg remove_parametric_params \
save --format all

psvg-cli process \
open -i glyph_definitions/Aptamer.svg -i glyph_definitions/CDS.svg \ 
remove_parametric_params delete_by_class -c baseline save 

psvg-cli process open -i glyph_definitions/Aptamer.svg apply_transformation save 

psvg-cli process \
open -i glyph_definitions/Aptamer.svg \
style_class -c "baseline" -s "opacity:1;fill:none;fill-opacity:1;stroke:#b3b3b3;stroke-width:0.49999994; stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1,0.5; stroke-dashoffset:0;stroke-opacity:1" \
save

psvg-cli process \
open -i glyph_definitions/Aptamer.svg \
substitute -o width -n w \
saveBy default, the results ofprocesscommands will be written to a./processeddirectory.
Package: psvis
IntroductionThis is pretrained models for person search. (resnet50,resnet18,shufflenetv1)LicenseThis project is released under theApache 2.0 license.InstallationThis project is developed uponMMdetection, please refer toinstall.mdto install MMdetection.We utilized mmcv=1.3.9, pytorch=1.7.0pipinstallpsvisUsageresnet50frompsvis.models.backbonesimportresnetresnet50=resnet.__dict__['resnet50'](pretrained=True)resnet18frompsvis.models.backbonesimportresnetresnet18=resnet.__dict__['resnet18'](pretrained=True)shufflenetv1frompsvis.models.backbonesimportshufflenet_v1shufflenetv1=shufflenet_v1.__dict__['shufflenetv1'](pretrained=True)
Package: pswingw2
.. image:: https://img.shields.io/pypi/v/pswingw2.svg:target: https://pypi.python.org/pypi/pswingw2.. image:: https://travis-ci.org/ZettaIO/pswingw2py.svg?branch=master:target: https://travis-ci.org/ZettaIO/pswingw2pyPSWinCom GW2 / LINK SMS Gateway Python Package=============================================A Python_ interface to the `PSWinCom XML SMS Gateway`_ now also called the `LINK SMS Gateway`_. Link Mobility bought PSWinCom 31 December 2014.The official pswinpy_ package has no activity in the last 5 years and only supports a small subset of the api. In January 2016 the default endpoints in the official package are no longer valid. This was the main motivation for creating this library.This module sends data as XML over HTTPS.Installation------------pip install pswingw2Basic Usage-----------To use this package, you will need sign up for a Gateway account with PSWinCom. Demo account are available.This piece of code demonstrates how to send a simple SMS message::import pswingw2 as smsconfig = sms.config("username", "password")sms.send_simple_message(config, msg_to="4700000000", msg_from="My Company", text="Hello World")More complex messages can also be sent::sms.send(config, data)sms.send_single(config, message)sms.send_batch(config, message_list)Send calls also returns a message status structure that can be inspected. Docs needed.Messages can also be sent using a client class::client = sms.Client(config)client.send_simple_message(..)client.send(..)client.send_single(..)client.send_batch(..)Console Support---------------Installing this module also adds a console command for sending messages::pswinsms -u username -p password -to 4700000000 -from "My Company" This is a test messageProperties----------Receiver, sender and message text are mandatory properties when sending a message. Supported properties can be found in the onlinedocumention under `Element valid for a Submit SMS request`_.Config Object-------------You configure the library by defining a config object that are passed with send calls.The following attributes must be defined and the config object must be able to obtain them by name usingthe get(name) method. This can be a module, dict or class (or whatever structure is suitable for you)::ENDPOINTS = ['https://xml.pswin.com', 'https://xml2.pswin.com']USERNAME = 'myusername'PASSWORD = 'mypassword'The ``pswingw2.config_defaults`` module have some useful examples.License-------This code is free to use under the terms of the MIT license... _Python: http://www.python.org/.. _`Online Documentation`: https://wiki.pswin.com/Gateway%20XML%20API.ashx.. _`PSWinCom XML SMS Gateway`: https://wiki.pswin.com/Gateway%20XML%20API.ashx.. _pswinpy: https://github.com/PSWinCom/pswinpy.. _`LINK SMS Gateway`: http://www.linkmobility.com/products/LINK-sms-gateway/.. _`Element valid for a Submit SMS request`: https://wiki.pswin.com/Gateway%20XML%20API.ashx#Element_valid_for_a_Submit_SMS_request:_0
Package: pswinpy
A Python interface to the [PSWinCom SMS Gateway](http://pswin.com/english/products/gateway).InstallationThe pswinpy package is distributed through PyPI as both egg, Windows and source. THIS IS NOT YET TRUE!!Basic UsageTo use this package, you will need sign up for a Gateway account with PSWinCom. Demo account are available.This piece of code demonstrates how to send a simple SMS message:from pswinpy import API
api = API(“myUsername”, “myPassword”)
api.sendSms(4712345678, “Strange women lying in ponds distributing swords is no basis for a system of government!”)PropertiesReceiver and message text are the two mandatory properties when sending a message. You may specify additional properties by using named arguments.For instance this is how you would specify a sender:api.sendSms(4712345678, “It’s just a flesh wound.”, sender=”BlackKnight”)Properties currently supported are:senderTTL - time to live in minutestariff - the amount (in local currency as cents/”&oslash;rer”) to charge the receiverserviceCode - service code for sending GAS messages. Requires that tariff is set. See [wiki](http://wiki.pswin.com/CPA-Goods-and-Services.ashx) for details.deliveryTime - a datetime object specifying when to send the messageSpecifying HostThe package is set to use a particular PSWinCom SMS Gateway by default. The host can be changed globaly by setting the host class property on HttpSender:HttpSender.host = “some.other.host.com”ModesFor testing purposes the API provides a couple of modes you can set globally to control how the library works.Mode.test = TrueLicenseThis code is free to use under the terms of the MIT license.
Package: psx-data-reader
psx-data-readerwith psx-data-reader, you can scrape the data of Pakistan stock exchange. psx-data-reader is super easy to use and handles everything for you. Just specify which company's stock data you want and how much you want, and the rest is done for you.OverviewThe psx-data-reader was written with fast use in mind. It provides the following key featurescan scrape all historical data till current datecan scrape data for of multiple companies in a single line of codereturns aPandas DataFramefor the scraped datafor better download speed, It does not request the complete data in a single network request rather it makes chunks of data to be downloaded and uses threads to open requests for different chunks of data, hence results in better speedIn the following paragraphs, I am going to describe how you can get and use Scrapeasy for your own projects.InstallationTo get psx-data-reader, either fork this github repo or simply use Pypi via pip.$pipinstallpsx-data-readerUsageFirst, import stocks and tickers from psxfrom psx import stocks, tickersto get the information of all the companies in Pakistan stock Exchange....tickers = tickers()to scrape the data ofSilk Bank Limitedwe have pass its ticker (symbol) to thestocksmethod with proper start and end date. and it will return a DataFrame with the scraped datadata = stocks("SILK", start=datetime.date(2020, 1, 1), end=datetime.date.today())we can also download the data of multiple companies in a single call tostocksmethod by passing a list or tuple of symbolsdata = stocks(["SILK", "PACE"], start=datetime.date(2020, 1, 1), end=datetime.date.today())and now the returned DataFrame object will have a hierarchical index on rows.Author Info