Saravanan666/pypi-org huggingface dataset:
Package: policytools
policy-toolsSummaryThis is a utility of helper tools for working with AWS IAM Policies.Currently it programmatically determine the effect of an AWS OrganizationsService Control Policyon a given user policy.result=scp.effect_on(user_policy)printresult.denied_actionsUsageCreate your "All IAM actions" set# policies-gen.json.js is the content of https://awspolicygen.s3.amazonaws.com/js/policies.jswithopen('policies-gen.json.js')asfile_stream:all_actions_source_data=file_stream.read()Create your ActionExpander utility.  It simply expandsglobstatements (e.g.s3:*) into the full matched set of IAM actions.policy_actions_expander=ActionExpander(PolicyGenActionsMasterList(all_actions_source_data))Create the user policy and the service control policyuser_policy=Policy("""{"Version": "2012-10-17","Statement": [{"Sid": "AllowSts","Effect": "Allow","Resource": "*","Action": ["sqs:*"]},{"Sid": "AllowEfs","Effect": "Allow","Resource": "*","Action": ["elastictranscoder:*"]}]}""",action_expander)scp=ServiceControlPolicy("""{"Version": "2012-10-17","Statement": [{"Sid": "AllowS3Read","Effect": "Allow","Resource": "*","Action": ["sqs:Get*","sqs:List*"]},{"Sid": "AllowElasticTranscoderRead","Effect": "Allow","Resource": "*","Action": ["elastictranscoder:Read*","elastictranscoder:List*"]}]}""",action_expander)Determine the effect of the SCP on the user policyresult=scp.effect_on(user_policy)printresult.denied_actions{'sqs:SetQueueAttributes','sqs:PurgeQueue','sqs:DeleteMessageBatch','sqs:ReceiveMessage','sqs:RemovePermission','sqs:ChangeMessageVisibilityBatch','sqs:SendMessageBatch','sqs:CreateQueue','sqs:TagQueue','sqs:AddPermission','sqs:UntagQueue','sqs:SendMessage','sqs:DeleteMessage','sqs:ChangeMessageVisibility','sqs:DeleteQueue','elastictranscoder:TestRole','elastictranscoder:CreatePipeline','elastictranscoder:DeletePipeline','elastictranscoder:UpdatePipelineNotifications','elastictranscoder:DeletePreset','elastictranscoder:CancelJob','elastictranscoder:CreateJob','elastictranscoder:UpdatePipelineStatus','elastictranscoder:CreatePreset','elastictranscoder:UpdatePipeline'}Developingcreate file ~/.pypirc(if you do not already have)[distutils]
index-servers =
  pypi
  pypitest

[pypi]
repository: https://upload.pypi.org/legacy/
username:
password:

[pypitest]
repository: https://test.pypi.org/legacy/
username:
password:buildUpdate the version inpolicytools/version.txtrm -rf dist
python setup.py bdist_wheel --universalpypitesttwine upload --repository pypitest dist/*
pip install policytools --index-url https://test.pypi.org/simple/ --upgradepypitwine upload --repository pypi dist/*
pip install policytools --upgrade
Package: poliduckie-segmentation
Poliduckies common packagesA package ready to be installed that provides the work made by the Poliduckie teampip install poliduckie-segmentationExample for segmentationfrompoliduckie_segmentation.segmentationimportSegmentationimage=[...]segmentation=Segmentation()# To predict:prediction=segmentation.predict(image)# To get the model:segmentation.get_model()# To get the model summary:segmentation.get_model_summary()Example for MPCfrompoliduckie_segmentation.controlimportMPCM=MPC()# x = state, r = reference (with N=10 be like r=[[0.1, 0.1]]*10)next_action=M.mpc(x,r)Example for Modelfrompoliduckie_segmentation.modelimportModelF=Model()x,y,theta=0,0,0action=[1,1]# linear and angular speednext_state=F.step(x,y,theta,previous_speed,previous_angular_speed,action)# To use as action left and right wheel speed:F.step_wheel_speed(x,y,theta,previous_speed,previous_angular_speed,action)
Package: poli-enum
Several dead-simple political python Enums:pip installpoli-enum.Python 3.6+ supported.EnumsContinentContinent codes fromData hub.frompoli_enum.continentimportContinentContinent.EU.value=='Europe'CountryCountry codes as ISO 3166-1 alpha 2, taken fromiso-3616-1 commit
8e31d749b9ce331cfa50c280a29b04ae2d805b7e.frompoli_enum.countryimportCountryCountry.ES.value=='Spain'SubdivisionSubdivision country codes from ISO 3166-2. Taken fromGEFEG.frompoli_enum.subdivisionimportSubdivisioncatalonia=Subdivision['ES-CA']You can check whether a subdivision is part of a country:frompoli_enum.countryimportCountryfrompoli_enum.subdivisionimportSubdivisionSubdivision['US-FL']inCountry.US==TrueCurrencyCurrency codes as for ISO 4217 and currency symbols as forxe.com.frompoli_enum.currencyimportCurrencyCurrency.EUR.value==34You can get the currency symbol:frompoli_enum.currencyimportCurrencyCurrency.EUR.symbol=='€'Currency.PHP.symbol=='₱'f'Cost: 54{Currency.EUR:s}'=='Cost: 54€'Symbolfrompoli_enum.currencyimportSymbolSymbol.GBP.value=='£'LayoutsKeyboard layout codes. From Debian 9/usr/share/X11/xkb/rules/evdev.lst.frompoli_enum.layoutimportLayoutLayout.US.value=='English (US)'Layout.BRAI.value=='Braille'Testinggit clonethis project.Executepython setup.py testin the project folder.ContributingIs a missing or wrong code? Say it in the issues! Feel free to contribute.
Package: poli-holas
poli-holasSaludar en múltiples idiomasInstallationpipinstall-Upoli-holasThen you can runpoli-holas--help📈 ReleasesYou can see the list of available releases on theGitHub Releasespage.We followSemantic Versionsspecification.We useRelease Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.List of labels and corresponding titlesLabelTitle in Releasesenhancement,feature🚀 Featuresbug,refactoring,bugfix,fix🔧 Fixes & Refactoringbuild,ci,testing📦 Build System & CI/CDbreaking💥 Breaking Changesdocumentation📝 Documentationdependencies⬆️ Dependencies updatesYou can update it inrelease-drafter.yml.GitHub creates thebug,enhancement, anddocumentationlabels for you. Dependabot creates thedependencieslabel. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.🛡 LicenseThis project is licensed under the terms of theGNU GPL v3.0license. SeeLICENSEfor more details.📃 Citation@misc{poli-holas,author={fraediaz},title={Saludar en múltiples idiomas},year={2021},publisher={GitHub},journal={GitHub repository},howpublished={\url{https://github.com/fraediaz/poli-holas}}}
Package: polint
polintis a linter for gettext PO files. It validates PO files against defined convensions.Usagepolint.py [options] <path>...
polint.py -h | --help
polint.py --versionTo print complete usage use--helpoption.Errorsfuzzy- Translation is fuzzyobsolete- Entry is obsoleteuntranslated- Translation is missing. That includesfuzzyorobsolete.location- Entry contains location dataunsorted- Entry is not properly sortedChangelog0.4Fix installation in environment with C locales.0.3Usedocoptfor argument parsing.Recursively search directories for.pofiles.0.2Add sort validator0.1Initial version
Package: pol-inv
pol-invThe goal of this project is to allow one to use a Jupyter notebook (or a Python program) to investigate various properties of relational structures and algebras.The package is very basic and probably full of bugs at the moment. There some similar packages are already available:Jakub Opršal'sPCSP Toolsfrom which I took a lot of inspirationPeter Jipsen'sSage packagethat uses Prover9 to reason about algebrasMiklos Maroti'sCritical RelationsandGraph PolymorphismJava appletsTheUniversal Algebra Calculatorhas a GUI and a Python API (but only handles algebras, not relational structures)Currently pol-inv can compute:Whether there exists a polymorphism from a relational structure A to a relational structure B that satisfies a given height 1 identity (seehttps://doi.org/10.1145/3457606)
Package: polip
PyTorch Library for ML ProjectsIntroductionThis library is a Python Library designed to help machine learning practitioners and researchers with training models and provides some useful function that will enhance and speed up training.FeaturesCustomDatasets for loading imagesSome functions for printing the progressNormalization, visualisation functionsInstallationThis tool requires Python. Use this command:pip install polipRequired Libraries for visualisationpip install matplotlib, os, torch, PIL, numpy, os, torchvision
Package: polire
PolirepipinstallpolireThe word "interpolation" has a Latin origin and is composed of two words - Inter, meaning between, and Polire, meaning to polish.This repository is a collection of several spatial interpolation algorithms.ExamplesPlease refer tothe documentationto check out practical examples on real datasets.Minimal example of interpolationimportnumpyasnpfrompolireimportKriging# DataX=np.random.rand(10,2)# Spatial 2D pointsy=np.random.rand(10)# ObservationsX_new=np.random.rand(100,2)# New spatial points# Fitmodel=Kriging()model.fit(X,y)# Predicty_new=model.predict(X_new)Supported Interpolation Methodsfrompolireimport(Kriging,# Best spatial unbiased predictorGP,# Gaussian process interpolator from GPyIDW,# Inverse distance weightingSpatialAverage,Spline,Trend,Random,# Predict uniformly within the observation range, a reasonable baselineNaturalNeighbor,CustomInterpolator# Supports any regressor from Scikit-learn)Use GP kernels from GPy (temporarily unavailable)fromGPy.kernimportMatern32# or any other GPy kernel# GP modelmodel=GP(Matern32(input_dim=2))Regressors from sklearnfromsklearn.linear_modelimportLinearRegression# or any Scikit-learn regressorfrompolireimportGP,CustomInterpolator# Sklearn modelmodel=CustomInterpolator(LinearRegression())Extract spatial features from spatio-temporal dataset# X and X_new are datasets as numpy arrays with first three dimensions as longitude, latitute and time.# y is corresponding observations with Xfrompolire.preprocessingimportSpatialFeaturesspatial=SpatialFeatures(n_closest=10)Features=spatial.fit_transform(X,y)Features_new=spatial.transform(X_new)CitationIf you use this library, please cite the following paper:@inproceedings{10.1145/3384419.3430407,
author = {Narayanan, S Deepak and Patel, Zeel B and Agnihotri, Apoorv and Batra, Nipun},
title = {A Toolkit for Spatial Interpolation and Sensor Placement},
year = {2020},
isbn = {9781450375900},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3384419.3430407},
doi = {10.1145/3384419.3430407},
booktitle = {Proceedings of the 18th Conference on Embedded Networked Sensor Systems},
pages = {653–654},
numpages = {2},
location = {Virtual Event, Japan},
series = {SenSys '20}
}
Package: polis
🐋 equitiesOverview:equities allows for easy access to the SEC's XBRL Financial Statement Dataset
Parsed data is stored locally and served to the user in pandas dataframesThe Dataset:https://www.sec.gov/dera/data/financial-statement-data-sets.htmlInstall:pip3 install equitiesDonate:Consider donating bitcoin to fund the future development of this project.bitcoin wallet address: 3LU5MEaAXRJoCo6vx67g1Jj7qDFRKhMs5tTUTORIAL:The library consists of two central objects, Universe and Company.Universe:Building the UniverseWe begin by initializing our universe and downloading our sec data packages.from equities import Universe
u = Universe()Essential MethodsTo get the number of companies in the universe call:
len(u)To get a dataframe of XBRL metadata from of all companies in the universe call:u.properties()"CIK" numbers are the sec's official unique identifier for public companies. To get a full list of the cik numbers call:u.ciks()Accessing CompaniesUniverse objects are indexable by "CIK" integers. As an example, to access the first company in the universe call:first_cik = universe.ciks()[0]
u[first_cik] # This returns an Company object.Company:A Company object should be thought of as an abstract representation of a real company. Every
company must have an associated Universe of origin.from equities import CompanyAccessing the Financial StatementsConsider the first Company in our universe, universe[u.ciks()[0]]. It is a Company object.c = u[u.ciks()[0]]Dataframes of the company's financial statements over the universe in question is given by:c.income()      # income statement dataframe

c.balance()     # Balancesheet dataframe

c.cash()        # Cash Flow Statement dataframe

c.equity()      # Consolidated Equity dataframeAdditional Company DetailsTo get the XBRL metadata for a given company as a pandas series call:c.properties()ExampleI really want to demonstrate the beauty of this dataset since this is often difficult when looking
at thousands of numeric datatables. Let's take a very naive peek by plotting various statements
as a kind of stacked timeseries.The following is a start to finish example of how one might plot the financial statements
of the first three companies in the universe.To perform this experiment, run the following:from equities import test
test()Here is the code that this function executes:import pandas as pd
from equities import Universe, Company
import matplotlib.pyplot as plt

u = Universe()
u.build()

k,f,s = 'bar',(20,10),True
for cik in u.ciks()[:3]:

    u[cik].income().T.plot(
        kind=k,
        figsize=f,
        stacked=s)

    u[cik].cash().T.plot(
        kind=k,
        figsize=f,
        stacked=s)

    u[cik].balance().T.plot(
        kind=k,
        figsize=f,
        stacked=s)

plt.show()
Package: polisan-plugin
Polisan by AdlemasWhat is Polisan by the way?Polisan is an online game in the terminal with support for plugins, communication between players, command input. This game is just the beginning of the path of Adlemas games and its transition to 2D or 3D space.Terminal gaming is boring?But why should I play the game in the terminal if I can just as well play with friends in any messenger? Game in the terminal differs from correspondence in that you can store the state of the player in the game, change his state, keep track of certain commands that the player has entered. For all this, a python library calledPolisan Pluginwas created. Thanks to this library, you can easily describe any rules of your server, events on your server, simulation of hunger and thirst, and much more.How can I create own plugin?To create your own plugin, you just need to install this library using the pip tool and create a class that will inherit from the main plugin constructor - CommandPlugin.InstallationWindowspip install polisan_pluginLinux, Macpip3 install polisan_pluginExamplefromsysimportargvfrompolisan_pluginimportCommandPluginclassChatPlugin(CommandPlugin):def__init__(self)->None:super().__init__(argv)defon_command(self,sender:Sender,command:str,args:list)->None:ifcommand=="commit":forclientinself.clients:client.send_message(" ".join(args))sender.send_message("Your message was sent.")if__name__=="__main__":plugin=ChatPlugin()Build own plugin.Prepare plugin information.To build your plugin, you need to create aconfig.yamlfile in the folder with your plugin code and write inside:name:"PLUGIN_NAME"version:PLUGIN_VERSIONauthor:"PLUGIN_AUTHOR"platforms:# SUPPORTED PLATFORMS-linux-windows-macosexecutable:"NAME_OF_PLUGIN_ENTRY"commands:# COMMANDS# For example:commit:# COMMAND NAMEdescription:Send message to whole world!# DESCRIPTIONusage:/send <message># USAGE INSTRUCTIONConverting python file into executable.Then you need to convert your python code into an executable file according to each platform specified in the config file above. For example, if you want your plugin to work on Windows and Linux machines, you need to build the project twice: in an .exe file for Windows and an executable file for Linux.Using PyInstaller:pyinstaller-D-F-n<OUT_NAME_OF_EXECUTABLE>-c"path/to/python/file"That's it. Deploy.At this point you can publish your plugin or send it to friends so they can use your creation on their server.
Package: polisher
polisher[[TOC]]Graph polisher is a library that helps you clean your plotly figures.
This library was inspired by the book "Storytelling with Data by Cole
Nussbaumer Knaflic (https://www.kobo.com/us/en/ebook/storytelling-with-data).UsageTo start our graph polishing, we will create a basic bar graph:importpandasaspdimportplotly.expressaspxreport_data=[{'name':'Time Sheets','exported':394},{'name':'Schedules','exported':171},{'name':'overtime','exported':457},{'name':'Time-off','exported':93},{'name':'Shift Requests','exported':30},]df=pd.DataFrame(report_data)fig=px.bar(df,title='Exported Reports',x='name',y='exported')fig.show()Cleaning the GraphNext, we will remove all the unnecessary information from the graph. By removing
unnecessary things from the graph, we will then be able to focus on important
information that will help us drive the user to where we want them to focus on.To remove all that default unnecessary information with polisher
do the following:Remove grid lines and backgroundGrid lines usually compete with the information being shown. If you really think
that you should include them, make them thin and grey so it doesn't call
attention.importpolisherpolisher.remove_grids(figure=fig)polisher.remove_background(figure=fig)fig.show()Send to backgroundThe dark colors (black text, bold text) of the graph also calls for attention.
We can easily make them less attention grabbing by sending them to
the background. Sending them to the background will set the text color to a more neutral
color like grey.polisher.send_to_background(fig)fig.show()Notice the difference between the default bar graph and our new version.Default Bar PlotNo Distractions Bar PlotNow you have a graph that you can easily add intentional attention grabbing
information so that your user is guided through the information you are trying
to present.Deploying pip libraryShortcut for commands below:poetryruntaskpublishBuild the pip library package to deploy to pip:python3setup.pysdistbdist_wheelPublish to pip. You can follow stepshereNote that you will need to install twine and register your pypi. Usually in the file~/.pypircpython3-mtwineupload--repositorypypidist/*InstallationpipinstallpolisherTestingTo test this project run:poetryruntasktestNotebook Example (with unnotebook)Prerequisite:https://www.docker.com/You can use this to see how the library modifies the plots. We are usingunnotebookto plot the examples.Build and pushnotebookimage:dockerbuild.-tpolisherRun notebookdocker-composeupnotebookordockerrun--rm-it\-v/Users/rigo/Documents/Projects/notebooks/stock-predictions:/notebooks\-p8899:8899uncluttererOpenhttp://localhost:8899/and open the notebook you want to run.
Package: polish-genbank
polish_genbank1 Introductionseehttps://github.com/linzhi2013/polish_genbank.This package is to check for the internal stop codon in Genbank or FASTA file (CDS), then
substitute the internal stop codon with NNN.2 Installationpip3 install polish_genbankThere will be a commandpolish_genbankcreated under the same directory as yourpip3command.3 Usagerunpolish_genbankusage: polish_genbank.py [-h] --in <file> [--format {gb,fa}] [--table <int>]
                         [--ntNs <str>] [--aaNs <str>] --out <file>

Check for the internal stop codon, then substitute the internal stop codon
with NNN. By mengguanliang [] genomics.cn, where [] == @. See
https://github.com/linzhi2013/polish_genbank

optional arguments:
  -h, --help        show this help message and exit
  --in <file>       input genbank file or CDS file (fasta format)
  --format {gb,fa}  the input file format. For fasta file, all sequences are
                    assumed to be forward strand, coding from +1 position [gb]
  --table <int>     The genetic code table used for translation, for fasta
                    input only [2]
  --ntNs <str>      the chars used for substituting an internal stop codon in
                    CDS sequence. [NNN]
  --aaNs <str>      the chars used for substituting an internal stop codon in
                    protein sequence. [X]
  --out <file>      output filename4 Used in scriptsIn [1]: from polish_genbank import polish_gb, polish_fasta

In [2]: polish_gb?
Signature: polish_gb(ingb=None, NewInternalStopCodonNT='NNN', NewInternalStopCodonAA='X', logger=None)
Docstring:
Replace the internal stop codon with NNNs on Genbank nt sequence,
and replace the '*' in 'translation' tag (protein sequence) with 'X'

Return:
    An generator.

Usage:

>>> records = polish_gb(ingb='in.gb', NewInternalStopCodonNT='NNN',
        NewInternalStopCodonAA='X')
>>> for rec in records:
>>>     print(rec.id, rec.seq)


In [3]: polish_fasta?
Signature: polish_fasta(infasta=None, NewInternalStopCodonNT='NNN', table=2, logger=None)
Docstring:
Replace the internal stop codon with NNNs.

The infasta file is assumed to be CDS sequences, and coding from +1
position.

Return:
    An generator.

Usage:

>>> records = polish_fasta(infasta='myfile', NewInternalStopCodonNT='NNN', table=2)
>>> for rec in records:
>>>     print(rec.id, rec.seq)5 CitationCurrently I have no plan to publishpolish_genbank.However, sincepolish_genbankmakes use ofBiopython, you should also cite it if you usebreakSeqInNs_then_translatein your work:Peter J. A. Cock, Tiago Antao, Jeffrey T. Chang, Brad A. Chapman, Cymon J. Cox, Andrew Dalke, Iddo Friedberg, Thomas Hamelryck, Frank Kauff, Bartek Wilczynski, Michiel J. L. de Hoon: “Biopython: freely available Python tools for computational molecular biology and bioinformatics”. Bioinformatics 25 (11), 1422–1423 (2009). https://doi.org/10.1093/bioinformatics/btp163Please go tohttp://www.biopython.org/for more details.
Package: polishify
polishifySetupSimplypipinstallpolishifyUsageIf you have some text that is in Polish but characters look weird it might not be encoded withwindows-1250oriso-8859-2encoding. If your file issometext.txtyou maypolishifysometext.txtand it will show you something likedetected encoding is:  windows-1250If you wish to get this file converted toutf-8just dopolishifysometext.txtproperly-encoded.txtIf you do it in bash script you might not want to see any outputs, the script supports silent mode as followspolishifysometext.txtproperly-encoded.txt--silentThis package contains words with polish letters, you might want to use your own datasetdataset.jsonfile.polishifysometext.txtproperly-encoded.txt--silent--datasetdataset.jsonWe also provide a tool that generates it from a textpolishify-extractsometext.txtdataset.json--encodingwindows-1250AuthorMade byMarek Narożniak, for the world and especially people who have people in the family who needs subtitles in Polish and want to bulk convert their encodings. No warranty provided. Licensed under GPL-3.
Package: polish-py-payments
polish-py-paymentsDokumentacja nie jest skończona.Instalacjapip install polish-py-paymentsOperator lvlupfrompolish_py_paymentsimportLvluplvlup=Lvlup("secret")payment_url=lvlup.create_payment(5.00,"https://successpage.com","https://webhook.com")Operator HotPayPrzelewyfrompolish_py_paymentsimportHotpayTransferPSCfrompolish_py_paymentsimportHotpayTransferSMSfrompolish_py_paymentsimportHotpaySmsOperator MicroSmsfrompolish_py_paymentsimportMicrosms
Package: polishstring
How to import ?import polishstringMethods Includedinf_prf(st)-->converts infix equation to prefixinf_pof(st)-->converts infix equation to postfixpof_prf(st)-->converts postfix equation to prefixpof_inf(st)-->converts postfix equation to infixprf_pof(st)-->converts prefix equation to postfixprf_inf(st)-->converts prefix equation to infixRememberIt only supports one character as an operand
Package: polish-tax-calculator
Użycieptc--helpprzykład 1. opcje domyślne: pełen zus, podatek liniowy, bez składki chorobowejptc5000przykład 2: obniżony zus, ryczałt 5%, składka chorobowa, więcej szczegółów (-v)ptc-tincome-zreduced-si-itr5-v5500
Package: polist
polist, partially ordered list=========.. sourcecode:: python>>> from polist import PartialOrderedList>>> p = PartialOrderedList()>>> p.append(0, 'A')>>> p.append(1, 'B')>>> p.append(2, 'A')>>> p[0, 1, 2]>>> assert [0, 1, 2] == p>>> assert [2, 1, 0] == p>>> assert [0, 2, 1] != p>>> assert [1, 0, 2] != p>>> assert [1, 2, 0] != p>>> assert [2, 0, 1] != p>>> p = PartialOrderedList()>>> p.append(0, 'A')>>> p.append(1, 'A')>>> p.append(2, 'B')>>> p.append(3, 'B')>>> p.append(4, 'C')>>> p.append(5, 'C')>>> p[0, 1, 2, 3, 4, 5]>>> assert [0, 1, 2, 3, 4, 5] == p>>> assert [0, 1, 3, 2, 4, 5] == p>>> assert [1, 0, 2, 3, 4, 5] == p>>> assert [1, 0, 3, 2, 4, 5] == p>>> assert [0, 1, 2, 3, 5, 4] == p>>> assert [0, 1, 3, 2, 5, 4] == p>>> assert [1, 0, 2, 3, 5, 4] == p>>> assert [1, 0, 3, 2, 5, 4] == p