Saravanan666/pypi-org huggingface dataset:
Package: psdr
PSDR: Parameter Space Dimension Reduction ToolboxAuthor: Jeffrey M. Hokanson, Postdoctoral Fellow at the University of Colorado Boulder (jeffrey@hokanson.us)IntroductionGiven a function mapping some subset of an m-dimensional space to a scalar valueparameter space dimension reductionseeks to identify a low-dimensional manifold
of the input along which this function varies the most.
Frequently we will choose to use a linear manifold
and consequently identify linear combinations of input variables along
which the function varies the most; we call this subspace-based dimension reduction.
There also techniques that identify a set of active variables (coordinate-based dimension reduction)
and methods that identity low-dimensional nonlinear manifolds of the input (nonlinear dimension reduction).We emphasize that this library is for parameter space dimension reduction
as the term 'dimension reduction' often appears in other contexts.
For example, model reduction is often referred to as dimension reduction
because it reduces the state-space dimension of a set of differential equations,
yielding a smaller set of differential equations.Simple exampleOne basic use of the library is to identify an active subspace using
the outer product of gradients:importpsdr,psdr.demosfun=psdr.demos.Borehole()# load a test problemX=fun.domain.sample(1000)# sample points from the domain with uniform probabiltygrads=fun.grad(X)# evaluate the gradient at the points in Xact=psdr.ActiveSubspace()# initialize a class to find the Active Subspaceact.fit(grads)# estimate the active subspace using these Monte-Carlo samplesprint(act.U[:,0])# print the most important linear combination of variables>>>array([9.19118904e-01,-2.26566967e-03,2.90116247e-06,2.17665629e-01,2.78485430e-03,-2.17665629e-01,-2.21695479e-01,1.06310937e-01])We can then create ashadow plotshowing the projection of the input to this function
onto a one-dimensional subspace spanned by the important linear combination identified aboveimportmatplotlib.pyplotaspltfX=fun(X)# evaluate the function at the points Xact.shadow_plot(X,fX)# generate the shadow plotplt.show()# draw the resultsWe say this function is has low-dimensional structure since the output of the function
is well described by the value of this one linear combination of its input parameters.DocumentationFor further documentation, please see our page onRead the Docs.Similar SoftwareSMT: Surrogate Modeling Toolbox(github)PySOT: Surrogate Optimization Toolbox(github)ContributingI welcome contributions to this library,
particularly of test functions similar to those inpsdr.demos.
Please submit a pull request along with unit tests for the proposed code.
If you are submitting a complex test function that requires calling code outside of Python,
please submit a Docker image along with a docker file generating that image
(see the OpenAeroStruct demo function for an example of how to do this).ContributorsZach GreyLakshya Sharma
Package: psdtojpg
psdtojpgVersion 0.1.0Convert one or more PSD files to JPG format. Thumbnail and optimize
them, or don’t.I keep many of the assets I use for web development in PSD format. This
lets me perform non-destructive edits and crops in Photoshop and come
back to edit the originals later. I builtpsdtojpgto make it easier
to generate, downsize, and optimize JPGs from my asset PSDs.InstallationThis is a Python 3 script, so usepip3to install:pip3 install psdtojpgAfter this, runpsdtojpg--helpfrom your terminal to verify it’s
installed properly.UsageBasic Conversionpsdtojpg my_file.psdmy_file.psd ➔ Converted/Original/my_file.jpg(original size,
default quality: 80)Downsizing Imagespsdtojpg -w 640 -t 480 my_file.psdmy_file.psd ➔ Converted/Original/my_file.jpg(original size)my_file.psd ➔ Converted/Resized/my_file.jpg(max size: 640x480
px)psdtojpg -w 640 -t 480 -n my_file.psdmy_file.psd ➔ Converted/Resized/my_file.jpg(max size: 640x480
px)Quality and Optimizationpsdtojpg -q 60 my_file.psdmy_file.psd ➔ Converted/Original/my_file.jpg(original size,
quality: 60)psdtojpg -o my_file.psdmy_file.psd ➔ Converted/Original/my_file.jpg(original size,
optimized withImageOptim)Custom Output Folderspsdtojpg -w 800 -t 600 -g orig -r thumb/sm my_file.psdmy_file.psd ➔ orig/my_file.jpg(original size)my_file.psd ➔ thumb/sm/my_file.jpg(max size: 800x600 px)RequirementsPython 3. (Tested with Python 3.4.1 on Mac OS X 10.9.3.)Relies on the following packages:Pillow, the Python 3 PIL forkpsd-toolsOptional dependencies:For image optimization on OS X:ImageOptim
CLI—install withnpm install-gimageoptim-cliHelpCommand:psdtojpg--helpusage: psdtojpg [-h] [-w MAX_WIDTH] [-t MAX_HEIGHT] [-q QUALITY] [-o] [-n]
                [-g ORIGINAL_FOLDER] [-r RESIZED_FOLDER]
                psd_file [psd_file ...]

Convert PSD files to JPG images.

positional arguments:
  psd_file              One or more PSD files to be converted

optional arguments:
  -h, --help            show this help message and exit
  -w MAX_WIDTH, --max-width MAX_WIDTH
                        The maximum width of resized output files in pixels.
  -t MAX_HEIGHT, --max-height MAX_HEIGHT
                        The maximum height of resized output files in pixels.
  -q QUALITY, --quality QUALITY
                        The output quality of JPG files. Default is 80.
  -o, --optimize        Optimize output files with ImageOptim after
                        conversion. Requires the imageOptim CLI to be
                        installed.
  -n, --no-originals    Do not output original-size JPGs.
  -g ORIGINAL_FOLDER, --original-folder ORIGINAL_FOLDER
                        The name of the output folder for original-size JPGs.
                        Can be nested.
  -r RESIZED_FOLDER, --resized-folder RESIZED_FOLDER
                        The name of the output folder for resized JPGs. Can be
                        nested.ContributionsBug reports, fixes, or features? Feel free to open an issue or pull
request any time. You can also tweet me atmplewisor email me atmatt@mplewis.com.LicenseCopyright (c) 2014 Matthew Lewis. Licensed underthe MIT
License.
Package: psd-tools
psd-toolsis a Python package for working with Adobe Photoshop PSD files
as described inspecification.FeaturesSupported:Read and write of the low-level PSD/PSB file structureRaw layer image export in NumPy and PIL formatLimited support:Composition of basic pixel-based layersComposition of fill layer effectsVector masksEditing of some layer attributes such as layer nameBlending modes except for dissolveDrawing of bezier curvesNot supported:Editing of layer structure, such as adding or removing a layerComposition of adjustment layersComposition of many layer effectsFont renderingInstallationUsepipto install the package:pip install psd-toolsGetting startedfrompsd_toolsimportPSDImagepsd=PSDImage.open('example.psd')psd.composite().save('example.png')forlayerinpsd:print(layer)layer_image=layer.composite()layer_image.save('%s.png'%layer.name)Check out thedocumentationfor features and details.ContributingSeecontributingpage.NotePSDspecificationis far from complete. If you cannot find a desired
information in thedocumentation, you should inspect the low-level
data structure.
Package: pseanalytics
# pseanalyticspseanalyticsis a module that enables collection of PSE stock data through web scraping. The purpose of this module is to provide an API for monitoring PSE stock data and allow development of trading algorithms and screeners around basic stock indicators.## Features
1. Access historical stock data for up to the past year.
2. Screen and identify potential stock trades based on stock indicators.
3. Send email notifications using [yagmail](https://pypi.org/project/yagmail/) when thresholds against your watchlists are breached.## Indicators
1. close
2. change
3. percent change
4. open
5. low
6. high
7. volume
8. netforeign
9. ema9, ema12, ema20, ema26, ema50, ema52, ema100
10. macd, macds
11. rsi
12. openh, closeh, opent, closet, body## Screeners
1. marketsummary
2. macd rossing
3. rsi oversold and overbought
4. three white soldiers
5. marketvolume
Package: psearch
PSearch - 3D ligand-based pharmacophore modelingPSearch is a tool to generate 3D ligand-based pharmacophore models and perform virtual screening with them.InstallationpipinstallpsearchDependencypmapper >= 0.3.1ExampleCreation of ligand-based pharmacophore modelsIt is recommended to create an empty dir which would be your$PROJECT_DIRand copy an input file to that location.There are two steps of pharmacophore model generation.Dataset preparation.prepare_datatset-i$PROJECT_DIR/input.smi-c4-i- path to the input file-c- number of CPUs to useThere are some other arguments which one can use. Invoke script with-hkey to get full information.The script takes as input a tab-separated SMILES file containingSMILES,compound id,activitycolumns without a header.
The third column should contain a wordactiveorinactive.
The script splits input compounds on active and inactive subsets, generates stereoisomers and conformers, creates databases of active and inactive compounds with labeled pharmacophore features.Model building.psearch-p$PROJECT_DIR-c4-p- path to the project dir-c- number of CPUs to useThere are two other arguments which are worth to mention:-t- threshold for compound clustering to create training sets. Default: 0.4.-ts- strategies to create training sets.1- a single training set will be created from centroids of individual clusters (capturing a common binding mode for all compounds).2- multiple training sets will be created, one per cluster (capturing individual binding modes for compound clusters).
By default both strategies are used.Virtual screening with pharmacophore modelsDatabase creation.The script takes as input a tab-separated SMILES file containingSMILESandcompound idcolumns.prepare_db-icompounds.smi-ocompounds.db-c4-v-i- path to the input file-c- number of CPUs to use-v- print progressThere are other arguments available to tweak database generation. To get the full list of arguments invoke-hkey.Virtual screening.screen_db-dcompounds.db-q$PROJECT_DIR/models/-oscreen_results/-c4-d- input generated SQLite database-q- pharmacophore model or models or a directory with modelsIf a directory would be specified all pma- and xyz-files will be recognized as pharmacophores and will be used for screening-o- path to an output directory if multiple models were supplied for screening or a path to a text file-c- number of CPUs to useDocumentationAll scripts have-hargument to retrieve descriptions of all available options and arguments.AuthorsAlina Kutlushina, Pavel PolishchukCitationLigand-Based Pharmacophore Modeling Using Novel 3D Pharmacophore SignaturesAlina Kutlushina, Aigul Khakimova, Timur Madzhidov, Pavel PolishchukMolecules2018, 23(12), 3094https://doi.org/10.3390/molecules23123094LicenseBSD-3 clause
Package: psearcherr
psearcher-rRewrite for Python baidu search client:iridesc/psearcherfrompsearcherrimportBaidu,Bingforenginein[Baidu(),Bing()]:result=engine.search(kw='蝙蝠侠',amount=20)print(result)requirements: requests, retry(default 3 timesBaseEngine.n_retry), beautifulsoup-4(bs4); loger
Package: psec
psecpackage provides tools for protecting sensitive data and
cardholder authentication in retail payment transactions.Installationpsecis published onPyPIand can be installed from there:pip install psecModulestr31 - TR-31 key block wrapping and unwrappingcvv - Card Verification Value generationdes - Triple DES utilities (a wrapper overcryptography)aes - AES utilities (a wrapper overcryptography)mac - Message Authentication Code generationpin - Personal Identification Number generationpinblock - PIN Blocks encoding and decodingContributorsKonstantin NovichikhinAuthorDavid SchmidPIN block ISO 4 support
Package: psed
psedCLI utility for text search / replace.This project is a simple replacement for thesedin Linux. I had enough issues with
debugging the regular expressions, especially a few months after they were written, so I
have created a replacement in Python. Feel free to use it, but the project aimed to cover
my use case so it might not fit everybody. I plan to improve functionality in the future.Installation and usageTo install, simply runpip installcommand. You need at least Python 3.6 interpreter.pip install psedUsage:$ psed --help

Usage: psed [OPTIONS]

  Console script for psed.

Options:
  -i, --input TEXT    Path to the input file / directory.  [required]
  -f, --find TEXT     String to find.
  -r, --replace TEXT  String to replace.
  --inplace           Modify the file(s) in place.
  -v, --verbose       Increase verbosity.
  --version           Show the version and exit.
  --help              Show this message and exit.Usage exampleInput file:[ERROR] Some error
[INFO] Some info
[WARNING] Some warning
[ERROR] Other error
[ERROR] There's a lot of errors
[DEBUG] And one debugRun psed:psed --input ./sample \
     --find '\[(ERROR)\]' \
     --find '\[(INFO)\]' \
     --find '\[(WARNING)\]' \
     --replace '[LIGHT_\1]'Output file:[LIGHT_ERROR] Some error
[LIGHT_INFO] Some info
[LIGHT_WARNING] Some warning
[LIGHT_ERROR] Other error
[LIGHT_ERROR] There's a lot of errors
[DEBUG] And one debugHistory0.1.0 (2019-08-26)First release on PyPI.
Package: pseg
This is a utility package to interact with a PSE&G gas meterPseg calls the API of the PSE&G gas meter to return the current energy usage.It requires the meter’s energize id and a session id.
You can find this information as cookies after logging into your PSE&G customer account athttps://pseg.com/.Example usage:from pseg import Metermeter = Meter(“17baf96d8fdc0abcded2cf428b74d3151”, “bRWWRMk6PCka1MQ%2BabcedpaZxxMafUhDSQoaRDvDC1Aw%3D%3D”)
gas_consumption_therms = meter.last_gas_consumption_read()
Package: psend
psendSimple python utility for send push notifications.DescriptionA python client to send push notifications to phones and other device.The notifications will recived by the "Simple Push Notification API" App.How to installYou can install it usingpippipinstallpsendHow to useAfter installing this, it can be used by calling the script:psendor using python:python-mpsendTo use in your code:importpsendpsend.psend(["My-Key"],"Title","This is a payload",None)OptionsThe options for this utility can shown using-hflag:usage: psend [-h] -k KEY [KEY ...] -t TITLE -c CONTENT [-u URL]

Utility to send push notification

options:
  -h, --help            show this help message and exit
  -k KEY [KEY ...], --keys KEY [KEY ...]
  -t TITLE, --title TITLE
  -c CONTENT, --content CONTENT
  -u URL, --url URL

Send push notification to Simple Push Notification API
(https://play.google.com/store/apps/details?id=net.xdroid.pn)How to buildThis project is built usingpoetry:poetrybuildReferencesGit repository:https://github.com/sandrospadaro/psendPypi repository:https://pypi.org/project/psend/
Package: psenet-text-detector
PSENet: Shape Robust Text Detection with Progressive Scale Expansion NetworkPackaged Version of the Pytorch implementation of PSENet text detectorOverviewPSENet is designed as a segmentation-based detector with multiple predictions for each text instance. These predictions correspond to different `kernels' produced by shrinking the original text instance into various scales. Consequently, the final detection can be conducted through our progressive scale expansion algorithm which gradually expands the kernels with minimal scales to the text instances with maximal and complete shapes.Getting startedInstallationInstall using conda for Linux, Mac and Windows (preferred):conda install -c fcakyon psenet-text-detectorInstall using pip for Linux and Mac:pip install psenet-text-detectorBasic Usage# import packageimportpsenet_text_detectoraspsenet# set image path and export folder directoryimage_path='figures/idcard.png'output_dir='outputs/'# apply craft text detection and export detected regions to output directoryprediction_result=psenet.detect_text(image_path,output_dir,cuda=False)Advanced Usage# import packageimportpsenet_text_detectoraspsenet# set image path and export folder directoryimage_path='figures/idcard.png'output_dir='outputs/'# read imageimage=psenet.read_image(image_path)# load modelpsenet_model=psenet.load_psenet_model()# perform predictionprediction_result=psenet.get_prediction(image=image,model=psenet_model,binary_th=1.0,kernel_num=3,upsample_scale=1,long_size=1280,min_kernel_area=10.0,min_area=300.0,min_score=0.93,cuda=True)# export detected text regionsexported_file_paths=psenet.export_detected_regions(image_path,image,boxes=prediction_result["boxes"],output_dir=output_dir)# export box visualization_=psenet.visualize_detection(image_path,image=image,quads=prediction_result["boxes"],output_dir=output_dir)
Package: pseq
Parallel Sequence ProcessingThis package provides a framework for parallel processing of sequences.Copyright ® 2019, Luís Gomesluismsgomes@gmail.com. All rights reserved.Links:https://github.com/luismsgomes/pseq|https://pypi.org/project/pseq/There are four main concepts in this package, each one modeled as a
class:AWorkUnitrepresents a sequence element.AProduceris responsible for generating a sequence ofWorkUnits to be processed.AProcessoris responsible for processingWorkUnitsindividually.AConsumeris responsible for handling processedWorkUnits.These concepts/objects are the building blocks of aParallelSequenceProcessor, which is depicted below.TheParallelSequenceProcessorin this figure has been configured with
twolanesfor priority0(lanes 1 and 2) and a singlelanefor
priority1(lane 3).Unless specified otherwise, by settingrequire_in_order=False,
theConsumerreceives processedWorkUnits in the same order as
produced by theProducerdirectly above it (in the same lane). This
ordering is ensured by holding processedWorkUnits until all units
produced before them have been processed and passed onto theConsumer.UsageCurrently, the only documentation available is the example code provided
inexample.py.LicenseThis library is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3 as published
by the Free Software Foundation.This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License version 3 for more details.You should have received a copy of the GNU General Public License along
with this library; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Package: psequant
psequant :nerd_face:Easiest way to access and analyze Philippine stock datapsequant(pronounced "see-kant") allows you easily access stock data fromPSE Edgewith as few as 2 lines of python code. Its goal is to promote data driven investments in the Philippines by making relevant information accessible to everyone.FeaturesEasy access to Philippine stock dataTemplates for backtesting trading strategies on Philippine stocksInstallationpip install psequantGet stock data from PSEfrom psequant import get_pse_data
df = get_pse_data("JFC", "2018-01-01", "2019-01-01")
print(df.head())

#             open   high    low  close        value
#dt                                                 
#2018-01-03  253.4  256.8  253.0  255.4  190253754.0
#2018-01-04  255.4  255.4  253.0  255.0  157152856.0
#2018-01-05  255.6  257.4  255.0  255.0  242201952.0
#2018-01-08  257.4  259.0  253.4  256.0  216069242.0
#2018-01-09  256.0  258.0  255.0  255.8  250188588.0Plot daily closing pricesfrom matplotlib import pyplot as plt

df.close.plot(figsize=(10, 6))
plt.title("Daily Closing Prices of JFC\nfrom 2018-01-01 to 2019-01-01", fontsize=20)Analyze with a simple moving average (SMA) trading strategyma30 = df.close.rolling(30).mean()
close_ma30 = pd.concat([df.close, ma30], axis=1).dropna()
close_ma30.columns = ['Closing Price', 'Simple Moving Average (30 day)']

close_ma30.plot(figsize=(10, 6))
plt.title("Daily Closing Prices vs 30 day SMA of JFC\nfrom 2018-01-01 to 2019-01-01", fontsize=20)Backtesting templatesUsing thebacktraderframeworkRelative strength index (RSI) trading strategy (14 day window)Daily Jollibee prices from 2017-01-01 to 2019-01-01python examples/jfc_rsi.pyMin max support resistance trading strategy (30 day window)Daily Jollibee prices from 2017-01-01 to 2019-01-01python examples/jfc_support_resistance.py
Package: pserialization
PSerializationPython library for serializing & deserializing python objects.Out of the box support for "basic" object de/serialization, that is objects that hold all of their state in __ dict __ and have a trivial __ new __.For more complicated types like datetime.datetime, users of this library can supply custom middleware to handle de/serializing those types.Useful for sending python objects to a system that may only be expecting to handle primitive types, as well as reconstructing python objects from systems that lack type information. I personally use this for editing/loading configuration files stored as json, and for loading objects from nosql dbs like MongoDB.https://github.com/SteffenCucos/PSerialization'Basic' Object Examplefrompserialize.serializerimportSerializerfrompserialize.deserializerimportDeserializerserializer=Serializer()deserializer=Deserializer()classShoe():def__init__(self,size:int,condition:str,brand:str):self.size=sizeself.condition=conditionself.brand=brandif__name__=="__main__":shoes=[Shoe(11,"Good","Nike"),Shoe(12,"Bad","Geox")]# Serialize a python object into primitivesserialized=serializer.serialize(shoes)assertserialized==[{"size":11,"condition":"Good","brand":"Nike"},{"size":12,"condition":"Bad","brand":"Geox"}]# Build back the object representation just from primitivesdeserialized=deserializer.deserialize(serialized,list[Shoe])assertdeserialized==shoesMiddleware Examplefromdatetimeimportdatetimefrompserialize.serializerimportSerializerfrompserialize.deserializerimportDeserializerdefserialize_datetime(date:datetime):returnrepr(date)defdeserialize_date(value:object):asserttype(value)isstrarg_str=value.split("(")[1]arg_str=arg_str.replace(")","")args=arg_str.strip(" ").split(",")args=[int(arg)forarginargs]returndatetime(*args)serializer=Serializer(middleware={datetime:serialize_datetime})deserializer=Deserializer(middleware={datetime:deserialize_datetime})if__name__=="__main__":date=datetime(2022,7,25,11,3,44,21000)# Serialized using the custom functionserialized=serializer.serialize(date)assertserialized=="datetime.datetime(2022, 7, 25, 11, 3, 44, 21000)"# Deserialized back into the correct typedeserialized=deserializer.deserialize(serialized,datetime)assertdeserialized==dateUpdate PyPi Packagepy -m build
py -m twine upload --repository pypi dist/*