Saravanan666/pypi-org huggingface dataset:
Package: polars-xdt
polars-xdteXtra stuff for DateTimeseXtra stuff for DateTimes inPolars.✅ blazingly fast, written in Rust✅ custom business-day arithmetic✅ convert to and from multiple time zones✅ format datetime in different locales✅ convert to Julian DatesInstallationFirst, you need toinstall Polars.Then, you'll need to installpolars-xdt:pip install polars-xdtRead thedocumentationfor a little tutorial and API reference.Basic ExampleSay we start withfromdatetimeimportdateimportpolarsasplimportpolars_xdtasxdtdf=pl.DataFrame({"date":[date(2023,4,3),date(2023,9,1),date(2024,1,4)]})Let's shiftDateforwards by 5 days, excluding Saturday and Sunday:result=df.with_columns(date_shifted=xdt.offset_by('date','5bd',weekend=('Sat','Sun'),))print(result)shape: (3, 2)
┌────────────┬──────────────┐
│ date       ┆ date_shifted │
│ ---        ┆ ---          │
│ date       ┆ date         │
╞════════════╪══════════════╡
│ 2023-04-03 ┆ 2023-04-10   │
│ 2023-09-01 ┆ 2023-09-08   │
│ 2024-01-04 ┆ 2024-01-11   │
└────────────┴──────────────┘Note thatpolars-xdtalso registers axdtnamespace in theExpressionclass, so you
could equivalently write the above usingpl.col('date').xdt.offset_by('5bd')(but note
that then type-checking would not recognise thexdtattribute).Read thedocumentationfor more examples!LogoThanks toOlha Urdeichukfor the illustration.
Package: polartoolkit
PolarToolkitHelpful tools for polar researchersDocumentation LinkDisclaimer🚨 **Ready for daily use but still changing.** 🚨This means that we are still adding a lot of new features and sometimes we make
changes to the ones we already have while we try to improve the software based
on users' experience, test new ideas, make better design decisions, etc. Some of
these changes could bebackwards incompatible. Keep that in mind before you
update PolarToolkit to a new major version (i.e. fromv1.0.0tov2.0.0).I welcome any feedback, ideas, or contributions! Please contact us on theGitHub discussions pageor submit anissue on GitHubfor problems or feature ideas.ThePolarToolkitpython package provides some basic tools to help in
conducting polar research. You can use it to download common datasets (i.e.
BedMachine, Bedmap2, MODIA MoA), create maps and plots specific to Antarctica
(soon Greenland and the Arctic as well), and visualize data with multiple
methods.Feel free to use, share, modify, andcontributeto
this project. I've mostly made this for personal usage so expect significant
changes. Hopefully, I'll implement more tests and Gallery examples soon.Project goalsBelow is a list of some features I hope to eventually include. Feel free to make
a feature request throughGitHub Issues.Create 3D interactive models to help visualize data.Include more datasets to aid in downloading and storage.Additional projections and possible support for the Arctic region as well.How to contributeI really welcome all forms of contribution! If you have any questions, comments
or suggestions, please open adiscussionorissue (feature request)on
theGitHub page!Also, please feel free to share how you're using PolarToolkit, I'd love to know.Please, read ourContributor Guideto learn how you can contribute to the project.
Package: polarTransform
IntroductionpolarTransform is a Python package for converting images between the polar and Cartesian domain. It contains many
features such as specifying the start/stop radius and angle, interpolation order (bicubic, linear, nearest, etc), and
much more.InstallingPrerequisitesPython 3Dependencies:numpyscipyscikit-imageInstalling polarTransformpolarTransform is currently available onPyPi. The simplest way to
install alone is usingpipat a command line:pip install polarTransformwhich installs the latest release.  To install the latest code from the repository (usually stable, but may have
undocumented changes or bugs):pip install git+https://github.com/addisonElliott/polarTransform.gitFor developers, you can clone the polarTransform repository and run thesetup.pyfile. Use the following commands to get
a copy from GitHub and install all dependencies:git clone pip install git+https://github.com/addisonElliott/polarTransform.git
cd polarTransform
pip install .or, for the last line, instead use:pip install -e .to install in ‘develop’ or ‘editable’ mode, where changes can be made to the local working code and Python will use
the updated polarTransform code.Test and coverageRun the following command in the base directory to run the tests:python-munittestdiscover-vpolarTransform/testsExampleInput image:importpolarTransformimportmatplotlib.pyplotaspltimportimageioverticalLinesImage=imageio.imread('IMAGE_PATH_HERE')polarImage,ptSettings=polarTransform.convertToPolarImage(verticalLinesImage,initialRadius=30,finalRadius=100,initialAngle=2/4*np.pi,finalAngle=5/4*np.pi)cartesianImage=ptSettings.convertToCartesianImage(polarImage)plt.figure()plt.imshow(polarImage,origin='lower')plt.figure()plt.imshow(cartesianImage,origin='lower')The result is a polar domain image with a specified initial and final radius and angle:Converting back to the cartesian image results in only a slice of the original image to be shown because the initial and final radius and angle were specified:Next StepsTo learn more about polarTransform, see thedocumentation.LicensepolarTransform has an MIT-basedlicense.
Package: polar-vortex
Polar VortexPolar Vortex is column store database that uses Polars dataframes and either CSV or Parquet as the underlying storage.
It also provide a shelve interface to store KV pairs.
The database interface and ORM system is written in python and designed in way that
python can be thought of as the underlying query language.
When I say NoSql, I mean no sql(not really).
This is in fact a lie, as of the writing of this Polars has SQL interface
which is intended to for backwards compatibility, however the intended use is
to use the ORMs to interact with database.The column data will be saved in CSV/Parquet files stored across cloud storage buckets.
Query will be executed lazily, and will execute in parallel on every file across the buckets.
This repo will be where the interfaces and ORM system will be developed.
But if you would like to use the full database please contact me atdaniel.v.davee+pv@gmail.com,
to setup a meeting.
Since this in early alpha, a lot of the details have not been fleshed out.
But if you use it during this time, since you are help testing it,
you won't be charged while in the alpha or beta;
and when we go live you be given special rates,
and given access to professional support for at least 6 months.
Plus you will able to request features directly from me.
Package: polcart
[![Build Status](https://travis-ci.org/ericmjl/polcart.svg?branch=master)](https://travis-ci.org/ericmjl/polcart)# polcart
A small utility for converting between polar and cartesian units## Installation
Install viapip:`bash $ pip install polcart `Install viaconda:`bash $ conda install-cericmjl polcart `
Package: poledni-menu
This utility will scrap daily menues from nearby restaurants and
send them via e-mail. It is based on very simple modular architecture where
each extractor presents similar API.InstalationUse Python 3.6 virtual environment to install all necessary dependencies:$python3-mvenvvenv$sourcevenv/bin/activate(venv)$pipinstall-Upip(venv)$pipinstallgit+https://github.com/oskar456/poledni-menuAfter installation, you’ll get three new runables:poledni-menu-print <extractor>Call given extractor and print its output to the standard output.poledni-menu-digest <config file>Read a list of extractors and their parameters from a YAML config file.
Print daily menu digest to the standard output.poledni-menu-email <config file>Read a list of extractors and their parameters from a YAML config file.
Send an e-mail with the digest to e-mail addresses configured in the
config file.Configuration file example---menu:-potrefena_husa-kulatak-budvarka-blox-extractor:agataplace_id:3-extractor:agataplace_id:5-bernard_pubemail:server:localhostsender:Foodmaster <foodmaster@example.com>recipients:-Root <root@localhost>-postmaster@example.com...
Package: polemarch
Polemarchis a service for infrastructure management based on ansible.
Simple WEB gui for infrastructure management using ansible playbooks or ansible modules.Official site:https://polemarch.orgFor any questions you could use issues tracker:https://gitlab.com/vstconsulting/polemarch/issuesFeaturesexecution templates;scheduled tasks execution;sharing of hosts, groups, inventories between projects;history of tasks execution with all details;easy configurable clustering for reliability and scalability:import of Ansible projects from Git repository (with submodules) or tar archive;import ofinventory file;support of quick project deployment;documentation:https://about.polemarch.org/en/latest/;support of hosts groups and groups hierarchy;support of multi user connection;support ofhooks;communityproject samples;CI support;user friendly interface.QuickstartDefault installationis suitable for most simple and common cases, but
Polemarch is highly configurable system. If you need something more advanced
(scalability, dedicated DB, custom cache, logging or directories) you can
always configure Polemarch like it is said indocumentation.How to contributeRefer to the documentation page aboutcontribution.
Package: polemarch-ansible
Wrapper for Ansible cli.Usagepm-execute [ansible command name] [args]- calls any ansible cli tool.pm-cli-reference [ansible command name,…] [–exclude key]-output cli keys for command. Default - all. Exclude keys by names (support many).
Now support output only ‘ansible’, ‘ansible-playbook’ and
‘ansible-galaxy’.pm-ansible [reference/ansible_command]- run as module.
For output reference use ‘reference’, or full ansible command.pm-ansible [–detail] [–get]-Output modules reference.ContributionWe usetoxfor tests and deploy. Just runtox -e py36-coverage,py37-install,flakefor full tests with coverage output.
Package: polen-donation-api
PolenDonationAPIA sua API de doações.A instalação da PolenAPI é feita de forma simples conforme os passos descritos a seguir.SobreA Polen é uma empresa especializada em intermediar doações corporativas entre empresas e instituições brasileiras do terceiro setor e em gerar transparência das doações.RequisitosVersão do Python: Deve ser igual a 2.7 ou superior (que pode ser verificado executandopython --version).InstalaçãoA maneira mais fácil de instalar a PolenAPI é usar a ferramenta de linha de comando. Você pode executar este comando em qualquer lugar em um novo repositório ou dentro de um repositório existente.
Você pode encontrar essa e várias outras bibliotecas em nossosrepositórios.pipinstallpolen_donation_apiComo usarApós a instalação você pode fazer a importação para o seu projeto através doimporte fazer uma instância da classePolenCharityDonationAPIpassando um token de acesso. Esse token pode ser encontrado nopainel do polinizador.frompolen_donation_apiimportPolenDonationAPIpolen=PolenDonationAPI("token")Como conseguir o seu TokenAcesse sua conta no nossopainelou crie uma novaconta. Após acessar vá no menu do canto superior direito, clique emAPIe depois é só copiar o conteúdo do campoToken.MétodosVocê pode consultar nossadocumentaçãoe verificar todos os métodos disponíveis.Causes: Métodos que permitem consultas de causas;Company: Métodos que listam empresas, criam empresas, atualizam dados da empresa e listam lojas associadas a uma empresa;Donation Direct: Método que cria uma doação direta;Finance: Método que retorna todas as suas faturas de pagamento;Donation Notify: Métodos que listam doações feitas, retornam detalhes de uma doação, atualizam status de uma doação e criam uma nova doação associada a uma loja;Platform:  Método que retorna todas as plataformas parceiras que o Polen já possui integração nativa;Store: Métodos que listam lojas, criam novas lojas, editam lojas existentes e adicionam/removem causas da loja;Transaction: Método para o informar o estado de uma compra;Transparency: Métodos que permitem a consulta de listas de conteúdos disponibilizados pelas ongs, detalhes de um conteúdo, recibos de doações e um considado do total doado;User: Métodos que permitem a consulta de detalhes de um usuário, lista de usuários de uma loja, criar usuários, deletar usuários, associar usuários a causas;AjudaAcesse nossadocumentaçãoe conheça melhor nossa lib.Ainda com dúvida? Entre em contato pelo nossocanal do discord, vamos ter o prazer de ajudar você!
Package: polf
polfSimple library written with the Python C API to calculate points on lines.
It does not perform any checks on the passed data, but rather follows the
GIGO processing pattern.I have written it with the main purpose of learning, but it may be useful in
some situation or it can serve as a reference to get you started in the
Python C API and building multiplatform wheels usingcibuildwheelusing TravisCI. If it has been useful to you,
do not hesitate to leave a star.Installpip install polfUseful linksDocumentation on ReadTheDocsIssue trackerContributing (Linux)First, create a virtual environment and initialize it with:python3 -m virtualenv venv
source venv/bin/activateDevelop commandsBuild documentation:make docsRun tests:make testsLint:make lint
Package: police-api-client
A Python client for thePolice API. Supports Python 2.6, 2.7, 3.2, 3.3 and
3.4.InstallationInstall the Police API client withpip:pip install police-api-clientUsageThe Police API doesn’t require authentication, so no setup is required:>>> from police_api import PoliceAPI
>>> api = PoliceAPI()Retrieving force & neighbourhood data:>>> api.get_forces()
[<Force> Avon and Somerset Constabulary, ..., <Force> Wiltshire Police]
>>> leicestershire = api.get_force('leicestershire')
>>> city_centre = api.get_neighbourhood(leicestershire, 'city-centre-neighbourhood')
>>> city_centre.description
The Castle neighbourhood is a diverse covering all of the City Centre. In addition it covers De Montfort University, the Univesity of Leicester, Leicester Royal Infirmary, the Leicester Tigers rugby ground and the Clarendon Park and Riverside communities.
...
>>> city_centre.contact_details
{u'email': u'central.lpu@leicestershire.pnn.police.uk', u'telephone': u'101', u'address': u'74 Belgrave Gate\n, Leicester, LE1 3GG'}Locating neighbourhoods:>>> n = api.locate_neighbourhood(52.63473, -1.137514)
>>> n
<Neighbourhood> C04
>>> n.force
<Force> Leicestershire PoliceCrime & outcomes data:>>> api.get_latest_date()
u'2013-09'
>>> api.get_crimes_area(city_centre.boundary)
[<Crime> 26926242, ..., <Crime> 26925710]
>>> len(api.get_crimes_area(city_centre.boundary, date='2013-08'))
810
>>> crime = api.get_crimes_area(city_centre.boundary, date='2013-06')[0]
>>> crime.outcomes
[<Crime.Outcome> Under investigation, <Crime.Outcome> Suspect charged, <Crime.Outcome> Awaiting court outcome]For more advanced usage, see thedocumentation.
Package: policyglass
Documentation:policyglass.cloudwanderer.ioGitHub:https://github.com/CloudWanderer-io/PolicyGlassPolicyGlass allows you to analyse one or more AWS policies’ effective permissions in aggregate, by restating them in the form of PolicyShards which are always Allow, never Deny.PolicyGlass willalwaysresult in only allowPolicyShardobjects, no matter how complex the policy. This makes understanding the effect of your policies programmatically a breeze.Try it outTry out custom policies quickly without installing anything with thePolicyGlass Sandbox.Installationpip install policyglassUsageLet’s take two policies,aandband pit them against each other.>>> from policyglass import Policy, policy_shards_effect
>>> policy_a = Policy(**{
...     "Version": "2012-10-17",
...     "Statement": [
...         {
...             "Effect": "Allow",
...             "Action": [
...                 "s3:*"
...             ],
...             "Resource": "*"
...         }
...     ]
... })
>>> policy_b = Policy(**{
...     "Version": "2012-10-17",
...     "Statement": [
...         {
...             "Effect": "Deny",
...             "Action": [
...                 "s3:*"
...             ],
...             "Resource": "arn:aws:s3:::examplebucket/*"
...         }
...     ]
... })
>>> policy_shards = [*policy_a.policy_shards, *policy_b.policy_shards]
>>> effect = policy_shards_effect(policy_shards)
>>> effect
[PolicyShard(effect='Allow',
   effective_action=EffectiveAction(inclusion=Action('s3:*'),
      exclusions=frozenset()),
   effective_resource=EffectiveResource(inclusion=Resource('*'),
      exclusions=frozenset({Resource('arn:aws:s3:::examplebucket/*')})),
   effective_principal=EffectivePrincipal(inclusion=Principal(type='AWS', value='*'),
      exclusions=frozenset()),
   effective_condition=EffectiveCondition(inclusions=frozenset(), exclusions=frozenset()))]Two policies, two statements, resulting in a single allowPolicyShard.
More complex policies will result in multiple shards, but they will always beallows, no matter how complex the policy.You can also make them human readable!>>> from policyglass import explain_policy_shards
>>> explain_policy_shards(effect)
['Allow action s3:* on resource * (except for arn:aws:s3:::examplebucket/*) with principal AWS *.']
Package: policykit
Policy KitA set of utilities and classes for working withOpen Policy Agentbased tools, includingGatekeeperandConftest.InstallationPolicy Kit can be installed from PyPI usingpipor similar tools:pip install policykitCLIThe module provides a CLI tool calledpkfor using some of the functionality.$pkbuild*.rego[SecurityControls] Generating a ConstraintTemplate from "SecurityControls.rego"[SecurityControls] Searching "lib" for additional rego files[SecurityControls] Adding library from "lib/kubernetes.rego"[SecurityControls] Saving to "SecurityControls.yaml"You can also use the tool via Docker:docker run --rm -it -v $(pwd):/app  garethr/policykit buildPythonThis module currently contains several classes, the first for working withConstraintTemplatesin Gatekeeper.frompolicykitimportConstraintTemplatewithopen(path_to_rego_source_file,"r")asrego:ct=ConstraintTemplate(name,rego.read())print(ct.yaml())TheConftestclass makes interacting withConftestfrom Python easy.
Note that this requires theconftestexecutable to be available on the path.>>>frompolicykitimportConftest>>>cli=Conftest("policy")>>>result=cli.test("deployment.yaml")>>>resultConftestRun(code=1,results=[ConftestResult(filename='/Users/garethr/Documents/conftest/examples/kubernetes/deployment.yaml',Warnings=[],Failures=['hello-kubernetes must include Kubernetes recommended labels: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels ','Containers must not run as root in Deployment hello-kubernetes','Deployment hello-kubernetes must provide app/release labels for pod selectors'],Successes=[])]>>>result.successFalsePassing in a dictionary tojson_inputis parsed as JSON then sent as stdin to theconfestexecutable.frompolicykitimportConftestresult=Conftest("policy").test(json_input={"foo":"bar"})print(result)ActionPolicy Kit can also be easily used in GitHub Actions, using the following Action. This example also demonstrates
committing the generated files back into the Git repository. Update the the values in<>as required.on:pushname:Gatekeeperjobs:build:runs-on:ubuntu-lateststeps:-uses:actions/checkout@master-name:Generate ConstraintTemplates for Gatekeeperuses:garethr/policykit/action@masterwith:args:<directory-of-rego-source-files>-name:Commit to repositoryenv:GITHUB_TOKEN:${{ secrets.github_token }}COMMIT_MSG:|Generated new ConstraintTemplates from Rego sourceskip-checks: truerun:|# Hard-code user configgit config user.email "<your-email-address>"git config user.name "<your-username>"git config --get-regexp "user\.(name|email)"# Update origin with tokengit remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git# Checkout the branch so we can push back to itgit checkout mastergit add .# Only commit and push if we have changesgit diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin masterNotesA few caveats for anyone trying to use this module.Loading libraries withlibis only supported in Gatekeeper HEAD today but should be in the next release.This module does not support parameterized ConstraintTemplates
Package: policy-scaffolding-python
Engine development scaffolding (Python)Scaffolding project to support engine development in Python.This subproject provides a Python library to facilitate test-driven development
of engines.Test cases generationIn order to develop an engine and to be able to check if the engine
works as expected, a test-driven development approach proved to be
valuable. Test cases might be very well understood by both the content
designer and engine developer.This project contains DSL (domain-specific language) written in Python
to help generate test cases.Before starting using Python it's recommended to create a virtual environment
to avoid conflicts.python3-mvenv.venv-localThis command will create a new virtual environment in the folder.venv-local.
Then in a new terminal it needs to be activated:source.venv-local/bin/activateTo generate test cases for ambulance:pythonambulance.py
Package: policyserver
policyserverPolicy Server is a policy engine is written in python inspired byOPAunlike OPA policy can be written in PythonUsage```bash
$> policyserver --help
positional arguments:
{server}         sub-commands
    server         run server.

optional arguments:
-h, --help       show this help message and exit
-v, --version    show program's version number and exit
-l, --log-level  log level.
```InstallationSteps to Install Policy ServerPip Install Policy Serverpip3installpolicyserverExample* To start a server
```bash
policyserver server -r examples/block_ssh/
```

* Check the result of the policy based on user input 
```bassh
cat << EOF > input.json
{
"user": "user1",
"network": "192.0.2.0/17"
}
EOF
>> curl -X POST  -d @input.json -H "Content-Type: application/json" http://localhost:8081/ps/v1/ssh/user_allow_network
{"status":false}
```Setting up development environmentClone  Policy Server repogitclonehttps://github.com/SheverNts/policyserver.gitSetup Virtual envvirtulaenv-p$(whichpython3)policyservercdpolicyserversourcebin/activate
pip3installrequirements_test.txt