Saravanan666/pypi-org huggingface dataset:
Package: pysnake
Score: 0000 | Speed: 002
####################################################################
####################################################################
####                                                            ####
####                                                            ####
####                                                            ####
####                                                            ####
####                     ┌───────────────┐      OOOO            ####
####                     │     Pause     │      OOOO            ####
####                     │ press any key │                      ####
####                     └───────────────┘                      ####
####                                                            ####
####                                                            ####
####                        @@@@                                ####
####                        @@@@                                ####
####                                                            ####
####                                                            ####
####################################################################
####################################################################
q: Quit, n: New Game, p: Pause, +/-/a: Zoom in/out/auto, r: RewindA curses-based cross-python version of SnakeSupports Python 2.x/3.x versionsStunning features:zoom-mode/auto-zoomrewind-modeInstallpip install pysnakeand run in consolepysnakeChanges1.0.0 (27.09.2015)Initial version
Package: py-snake
SnakeAn interactive CLI Snake game, tested on Python 2.7 and 3.6 Posix environments.InstallationInstall from PyPi usingpip, a package manager for
Python.pip install py-snakeOr clone the repo and install using setuptools.cd path/to/repo
 python setup.py developUsageStart a new game by runningsnakefrom from command line. Optionally pass--helpflag for more info.$ snake --help
usage: snake [-h] [--width WIDTH] [--height HEIGHT] [--speed SPEED]
             [--food FOOD]

Snake game for CLI

optional arguments:
  -h, --help       show this help message and exit
  --width WIDTH    Frame width
  --height HEIGHT  Frame height
  --speed SPEED    Snake speed (fps)
  --food FOOD      Number of food pieces availableUninstallationUninstall Snake completely using pip.pip uninstall py-snake
Package: pysnakegym
1. pysnakegymThepysnakegymproject provides a gym environment for developing reinforcementlearning algorithms for the game of snake.2. InstallationTo get started, you need to have Python 3.6+ installed. Thepysnakegympackagecan simply be installed withpip.pipinstallpysnakegym3. How to useBelow is an example of how to use the gym. To interface with the game of snake, theSnakeMDPobject representinga Markov Decision Process (MDP) is used.frompysnakegym.mdpimportSnakeMDPmdp=SnakeMDP()state,reward,done=mdp.reset()whilenotdone:state_,reward,done=mdp.step(action=choose_action(state))state=state_Theresetmethod of themdpreturns a triplet consisting of the following:state(numpy array): the start state of the MDP. Depending on the state representationthe shape and size will vary.reward(float): the initial reward of the MDP.done(bool): whether the game is finished or not. Always returnsfalsefor theresetmethod.Thestepmethod of themdptakes an action and returns a triplet consisting of the following:state(numpy array): the state of the MDP that was observed after the stepwas taken. Depending on the state representation the shape and size will vary.reward(float): the reward observed after the step has been taken.done(bool): whether the game is finished or not. Returnstrueifstateis afinal state,falseif it is not.Thestepmethod is a representation of theagent-environmentinteraction thatconstitutes an MDP. The agent chooses an action to be taken in the environment and in return observesa new state and a reward.4. State RepresentationThe state that the snake receives as input can be represented in many different ways. When choosinga state representation, one must make a tradeoff between keeping the state lightweight so thatthe neural network is not too complex and encoding enough information so that the snake is ableto make the right decisions for the right state. Abstracting away information means thatthe set of possible states the snake can find itself in becomes smaller, however it also meansthat some granularity is lost. Likewise, encoding unnecessary information blows up the set ofpossible states that the snake will have to learn the correct output for.4.1 Choosing Necessary InformationWhen selecting the information that should be included in the state representation it is helpful to thinkhow you as a human would play the game. Things you would want to know are the direction the snakeis currently moving in, where the obstacles are relative to the head of the snake, and where thefood is relative to the snake's head.4.2 Available StatesThere are a number of state representations available to choose from:boolean state representationgrid state representation
Package: py-snappy
A pure python implementation of the Snappy compression algorithmRead more in thedocumentation on
ReadTheDocs.View the change
log.Quickstartpipinstallpy-snappyDeveloper SetupIf you would like to hack on py-snappy, please check out theEthereum
Development Tactical
Manualfor information on how we do:TestingPull RequestsCode StyleDocumentationDevelopment Environment SetupYou can set up your dev environment with:gitclonegit@github.com:ethereum/py-snappy.gitcdpy-snappyvirtualenv-ppython3venv.venv/bin/activatepipinstall-e.[dev]Testing SetupDuring development, you might like to have tests run on every file save.Show flake8 errors on file change:# Test flake8when-changed-v-s-r-1py_snappy/tests/-c"clear; flake8 py_snappy tests && echo 'flake8 success' || echo 'error'"Run multi-process tests in one command, but without color:# in the project root:pytest--numprocesses=4--looponfail--maxfail=1# the same thing, succinctly:pytest-n4-f--maxfail=1Run in one thread, with color and desktop notifications:cdvenvptw--onfail"notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on py-snappy failed'"../tests../py_snappyRelease setupFor Debian-like systems:apt install pandocTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for
stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable
(stagecan be alpha or beta).To issue the next version in line, specify which part to bump, likemake release bump=minorormake release bump=devnum. This is
typically done from the master branch, except when releasing a beta (in
which case the beta is released from master, and the previous stable
branch is released from said branch). To include changes made with each
release, update “docs/releases.rst” with the changes, and apply commit
directly to master before release.If you are in a beta version,make release bump=stagewill switch to
a stable.To issue an unstable version when the current version is stable, specify
the new version explicitly, likemake releasebump="--new-version4.0.0-alpha.1devnum"
Package: pysnapshot
PySnapShotThis is a tiny helper package for saving code associated with
an experiment, and reloading it at a later time. There are two main functions:pysnapshot.capture: Captures the code associated with a module into a snapshot at a given path.pysnapshot.load: Loads the code from the snapshot into a module of a specified name. If no name is given, then the module name is whatever the folder
name is for the snapshot.UsageLet's say I'm working on the code inexamples/hello_world.py. Let's save the current version
(working in theexamples/directory):importpysnapshotimporthello_world# First let's take a snapshot of the# hello_world package.path=pysnapshot.capture(hello_world,'/tmp/hello_world_snap/',overwrite=True)hello_world_snap=pysnapshot.load(path)print(hello_world_snap.__file__)# The snapshot is loaded from the specified directory. The code was all copied to# and is under the snapshot:print("From original package code",hello_world.func1())print("From snapshot",hello_world_snap.hello_world.func1())# You can import from the snapshot as if it were a regular packagefromhello_world_snapimporthello_worldprint("From snapshot, overwriting the original package code",hello_world.func1())This has the output:❯cdexamples/
❯pythondemo.py
/private/tmp/hello_world_snap/__init__.py
/Users/prem/research/snapshot/examples/hello_world/hello.pyTEST
FromoriginalpackagecodeTEST
/private/tmp/hello_world_snap/hello_world/hello.pyTEST
FromsnapshotTEST
/private/tmp/hello_world_snap/hello_world/hello.pyTEST
Fromsnapshot,overwritingtheoriginalpackagecodeTESTAnd it created a Python module with this directory structure:❯ tree '/tmp/hello_world_snap/'
/tmp/hello_world_snap/
├── __init__.py
└── hello_world
    ├── __init__.py
    ├── hello.py
    └── nested
        └── __init__.pyReleasingDo the following steps:python setup.py sdistUpload it to test PyPI:pip install twine
twine upload --repository testpypi dist/*
pip install -U --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple -U pysnapshotMake sure you can install it and it works (e.g. run the examples). Now upload
to actual PyPI:twine upload dist/*
Package: pysnc
ServiceNow Python APIWhat:PySnc is a python interface for the ServiceNow and the Table API. It is designed to mimic the familiar GlideRecord interface you know with pythonic support where applicable.Why:Spawned from the desire to interact with ServiceNow data in a familiar and consistent mannerInstallpip install pysncQuick StartfrompysncimportServiceNowClientclient=ServiceNowClient('https://dev0000.service-now.com',('integration.user',password))gr=client.GlideRecord('sys_user')gr.add_query('user_name','admin')gr.query()forringr:print(r.sys_id)DocumentationFull documentation currently available athttps://servicenow.github.io/PySNC/Or build them yourself:cd docs && make htmlDevelopment NotesThe following functions are not (yet?) supported:choose_window(first_row, last_row, force_count=True)TODOget_class_display_value()get_record_class_name()is_valid()TODOis_valid_record()new_record()_next()_query()The following will not be implemented:get_attribute(field_name)Not Applicableget_ED()Not Applicableget_label()Not Applicableget_last_error_message()Not Applicableset_workflow(enable)Not Possibleoperation()Not Applicableset_abort_action()Not Applicableis_valid_field()Not Possibleis_action_aborted()Not ApplicableFeature Wants and TODOGlideAggregate support (/api/now/stats/{tableName})And we want to:Improve documentation
Package: pysndfx
pysndfxApply audio effects such as reverb and EQ directly to audio files or NumPy ndarrays.This is a lightweight Python wrapper for SoX, the Swiss Army knife of sound processing programs. Supported effects range from EQ and compression to phasers, reverb and pitch shifters.InstallInstall with pip as:pipinstallpysndfxThe system must also haveSoXinstalled (for Debian-based operating systems:apt install sox, or with Anaconda asconda install -c conda-forge sox)UsageFirst create an audio effects chain.# Import the package and create an audio effects chain function.frompysndfximportAudioEffectsChainfx=(AudioEffectsChain().highshelf().reverb().phaser().delay().lowshelf())Then we can call the effects chain object with paths to audio files, or directly with NumPy ndarrays.infile='my_audio_file.wav'outfile='my_processed_audio_file.ogg'# Apply phaser and reverb directly to an audio file.fx(infile,outfile)# Or, apply the effects directly to a ndarray.fromlibrosaimportloady,sr=load(infile,sr=None)y=fx(y)# Apply the effects and return the results as a ndarray.y=fx(infile)# Apply the effects to a ndarray but store the resulting audio to disk.fx(x,outfile)There's also experimental streaming support. Try applying reverb to a microphone input and listening to the results live like this:python-c"from pysndfx import AudioEffectsChain; AudioEffectsChain().reverb()(None, None)"
Package: py-sneakers
py-sneakersPort to python of thelibnmsC libraryTo recreate the famous data decryption effect shown in the 1992 film Sneakers.Installpip install py-sneakersgit clone https://github.com/aenima-x/py-sneakers
cd py-sneakers
pip install .UsageAs a commandecho "Text" | py-sneakers

echo "Text" |python -m py_sneakersAs a libfrompy_sneakers.py_sneakersimportSneakersSneakers("Some text").decrypt()LicenseThis program is free software; you can redistribute it and/or modify it under the terms of the the
MIT License (MIT). SeeLICENSEfor more details.
Package: pysnic
PySNICPython-only implementation of the SNIC superpixels algorithm (https://www.epfl.ch/labs/ivrl/research/snic-superpixels/).frompysnic.algorithms.snicimportsnicfrompysnic.algorithms.polygonizeimportpolygonizefrompysnic.algorithms.ramerDouglasPeuckerimportRamerDouglasPeucker# compute segmentation from imagesegmentation,distance_map,centroids=snic(lab_image,500,0.01,update_func=lambdaprocessed_pixels:print("processed%05.2f%%"%(processed_pixels*100/number_of_pixels)))# compute polygonization from segmentationrdp=RamerDouglasPeucker(10)graphs=polygonize(segmentation,seeds,rdp)See theexamplesfolder for a minimal and more advanced example of the SNIC algorithm, as well as a
graph extraction and polygonization.Installing PySNICInstall PySNIC usingpip:pip install pysnicTechnical detailsThe algorithm in this repository differs from the originally described algorithm to improve performance:Adding elements to the candidate queue is a costly operation. We therefore try to reduce the number queue insertions.Introducing a distance map: The algorithm maintains a distance map which stores the closest candidate distance. This allows prechecking, if another candidate is already registered with a smaller distance, before adding it to the queue.Removed normalization factors from metric calculation, as they do not change the item ordering.PerformanceThis repository contains apython onlyimplementation. Due to large numbers of single-pixel image accesses the python
internal bounds-checking is likely to slow down the runtime compared to a C/C++ implementation.Since the algorithm performs large amounts of single pixel accesses, the runtime is greatly reduced bypassing
'normal' python arrays(in contrast to usingnumpy.ndarrays orPIL.images) to thesnic-method.DataformatsPixel positions are expected to be [x,y] integer coordinates. The coordinate frame for edge positions is offset by 0.5.
(Convert edge positions to image coordinates by adding 0.5). Images are expected to be 3d row-major raw python
arrays (image[row][column][features]).PublicationsThe SNIC algorithm implemented in this package is based on the following publication:@inproceedings{snic_cvpr17,
  author = {Achanta, Radhakrishna and Susstrunk, Sabine},
  title = {Superpixels and Polygons using Simple Non-Iterative Clustering},
  booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year = {2017}
}RepositoryThis package is maintained underhttps://github.com/MoritzWillig/pysnicLicenseMIT License seeLICENSE.md
Package: pysnip
# pysnip
Python snippets, easily accessable.# upload a filepython -m pysnip main.py –name my_package –author me# upload codefrom pysnip import clientclient.publish(“my_package”, “password”, “test = ‘here’nprint(‘hello world’)”, “me”)# importfrom pysnip import hello_world # finds closest match from serverhello_world.hello()
Package: pySnippetManager
DependenciespygmentspillowWhat is Workingbare minimumWhat is not Working/MissingDocumentationtagsadd DirectoriesInstallationpip3 install pysnippetmanagerUsagepysnippetmanagerContributeIssue Tracker:https://github.com/trombastic/pySnippetManager/issuesSource Code:https://github.com/trombastic/pySnippetManagerLicenseThe project is licensed under the _GNU General Public License v3 (GPLv3)_.
Package: pysnippets
Python SnippetsInstallationpip install pysnippetsUsagedict:In [1]: from pysnippets import dictsnippets as dsn

In [2]: dsn.filter({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4'])
Out[2]: {'c': 3, 'd': 4}

In [3]: dsn.filter({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4'], exec_eval=False)
Out[3]: {'c': 3, 'd': '4'}

In [4]: dsn.gets({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4'])
Out[4]: [3, 4]

In [5]: dsn.gets({'a': 1, 'b': 2, 'c': 3}, ['c', 'd:4'], exec_eval=False)
Out[5]: [3, '4']list:In [1]: from pysnippets import listsnippets as lsn

In [2]: lsn.all([1, 2, 3], [1, 2])
Out[2]: True

In [3]: lsn.any([1, 2, 3], [1, 5])
Out[3]: Truestr:In [1]: from pysnippets import strsnippets as ssn

In [2]: ssn.strip(None)

In [3]: ssn.strip(' xyz ')
Out[3]: 'xyz'
Package: pysnmpcrypto
The pysnmpcrypto package is an optional extension to SNMP library
for Python – pysnmp 5.0+. The pysnmpcrypto library provides
stronger authentication and encryption features to the SNMP
library by way of invoking stronger crypto algorithms.The pysnmpcrypto library runs on Python 2.4 through 3.7 and has a
dependency on either PyCryptodomex (for Python versions 2.4-2.6
and 3.2-3.3) or Cryptography (for Python versions 2.7 and 3.4+).
Package: pysnmp-mibs
A collection of IETF & IANA MIBs compiled into PySNMP classes.
Note that there is also PySMI package (https://pypi.python.org/pypi/pysmi/) that converts ASN.1 MIBs into PySNMP form.
Latest PySNMP (4.3+) invokes PySMI automatically to handle ASN.1 MIBs.
Seehttp://pysnmp.sf.net&http://pysmi.sf.net
Package: pysnmp-pyasn1-modules
ASN.1 modules for PythonThepyasn1-modulespackage contains a collection ofASN.1data structures expressed as Python classes based onpyasn1data model.If ASN.1 module you need is not present in this collection, try usingAsn1atetool that compiles ASN.1 documents
into pyasn1 code.FeedbackIf something does not work as expected,open an issueat GitHub
or post your questionon Stack OverflowNew modules contributions are welcome via GitHub pull requests.Copyright (c) 2005-2020,Ilya Etingof.
All rights reserved.
Package: pysnmp-se
Patched PySNMP 3.4.x with speed enhancementsThis is the PySNMP 3.4.x branch of code with various speed
enhancements, the most important being the replacement of
string-based OIDs with tuple-based OIDs.  This makes PySNMP-SE
slightly incompatible with PySNMP, hence the 3.5.x numbering
scheme.
Package: pysnmptui-K0HAX
pysnmptuiPython SNMP TUI (Terminal User Interface)ConfigurationYou can use a configuration file instead of command line flags.Invoke pysnmptui withpysnmptui -c config.yamlif your config file is named "config.yaml" and in the current directory.Below is an example config.yaml.Host: 127.0.0.1
Username: v3user
AuthProto: SHA
AuthPassword: password
PrivProto: AES
PrivPassword: password
Version: 3
ExtraMibs:
  - IF-MIB
  - ENTITY-MIB
  - ./mibs/CISCO-SMI
  - ./mibs/CISCO-TC
  - ./mibs/CISCO-IF-EXTENSION-MIB
  - ./mibs/CISCO-VTP-MIB
  - ./mibs/CISCO-CDP-MIB
Package: pysnoonotes
PySnooNotesPython wrapper for the Snoonotes APISupported Features:Fetch notes for a particular userFetch Subreddit Notes - Caching implementedAdd notes for a userRemoving usernotes for a userDepends On:requests==2.23.0Usage:ImportsTo use in your python project, use:frompysnoonotes.coreimportSnooNotesSample UsageAuthenticate using a Reddit account that can add usernotes and a user_key for that account that can be generated from "https://snoonotes.com/#!/userkey". The generated key is sent via PM to your reddit account.sn=SnooNotes("username","user_key")Returns a dictionary with usernames and their associated usernotes:notes_for_username=sn.get_notes_for_user("username")notes_for_usernames12=sn.get_notes_for_user(["username1","username2"])Returns notes supported in that particular subreddit:subreddit_notes=sn.get_notes_for_subreddit("subreddit")NOTE: This function caches queries using a pickle file to./cachesdirectory to prevent repeated API requests. By default it automatically updates caches once a day. However, usinguse_cache=False, you can manually trigger a call that bypasses cache (this call will also update the cache)Add a new usernote for the user under a subreddit with a custom note and a link to the comment/post:sn.add_note_for_user("username","note_type_id","subreddit","Reason for note","www.reddit.com/r/subreddit/123abc/.../123abc")Delete a usernote for a given username, given a note_id.sn.delete_note_for_user("username","note_id")The above is also summarized in thesample.pyscript
Package: pysnooper-click-able
1. pip install pysnooper_click_able神级别黑科技装饰器。自动显示代码运行轨迹并在pycharm控制台点击可以紧缺跳转到文件的代码行。基于pysnooper的改版
举要功能是调试debu代码用的，基础用法 百度 pysnooper 就可以。

对比pysnooper
1.增加代码运行轨迹可点击精确跳转
2.根据各种运行状态变彩色
3.增加了代码执行总行数的统计，让程序员心里有谱到底遗憾代码真正背后执行了多少行python代码# -*- coding: utf-8 -*-# @Author  : ydf# @Time    : 2019/12/4 0004 17:01"""举个例子，统计requests.get运行轨迹，requests和urllib发http请求各执行了多少行代码。requests请求http百度，会花费18635行代码urllib 请求百度http ，会花费11902行代码普通3Ghz以下的电脑，单进程运行python，选一个或者自己做一个流量消耗非常少的http接口进行请求测试，平均每秒不可能运行超过300次请求。所以大规模发requests不是简单的io密集型，也是消耗性能的，包括最牛的英特尔5Ghz的频率，如果每秒能运行1000次requests请求，我愿意把电脑cpu吃了。"""importrequestsimporturllib3fromurllibimportrequestfrompysnooper_click_ableimportsnoop## ss = requests.session()@snoop(depth=100,dont_effect_on_linux=False)deff():# requests.get('http://www.baidu.com')# requests.get('http://www.sina.com')response=request.urlopen('http://www.baidu.com')# ss.get('http://www.baidu.com')f()追踪代码的运行的分支frompysnooper_click_ableimportsnoopdeff1(x):ifx==1:a=2else:a=3deff2(x):ifx==7:b=8foriinrange(1000):b+=ielse:b=9@snoop(depth=9)deff3(x,test=True):iftest:f1(x)else:f2(x)f3(5,False)如果传f(5,False) ,则会显示执行了f2函数，并运行了b=9 的else分支，并显示执行的时间代码行数是8。如果传f(7,False) ,则会显示执行了f2函数，并运行了b=8 的if分支，并显示运行了2009行，因为  for i in range(1000): 和 b += i 这两行各执行了1000次。
Package: pysnooz
PySnoozControl SNOOZ white noise machines with Bluetooth.InstallationInstall this via pip (or your favourite package manager):pip install pysnoozSupported devicesSNOOZ OriginalSNOOZ ProBreezUsageimportasynciofromdatetimeimporttimedeltafromhome_assistant_bluetoothimportBluetoothServiceInfofrompysnooz.deviceimport(SnoozAdvertisementData,SnoozDevice,SnoozCommandResultStatus,disable_night_mode,enable_night_mode,get_device_info,set_auto_temp_enabled,set_fan_speed,set_light_brightness,set_temp_target,set_volume,turn_fan_off,turn_fan_on,turn_light_off,turn_light_on,turn_off,turn_on,)# found with discoverydevice_info=BluetoothServiceInfo(...)advertisement=parse_snooz_advertisement(device_info)device=SnoozDevice(device_info,advertisement)# optionally specify a volume to set before turning onawaitdevice.async_execute_command(turn_on(volume=100))# you can transition volume by specifying a durationawaitdevice.async_execute_command(turn_off(duration=timedelta(seconds=10)))other_commands=[set_volume(50,duration=timedelta(seconds=10)),set_light_brightness(75),turn_light_on(),turn_light_off(),enable_night_mode(),disable_night_mode(),# the following commands are only supported by Breezset_fan_speed(33,duration=timedelta(seconds=10)),set_auto_temp_enabled(True),set_temp_target(71)]forcommandinother_commands:awaitdevice.async_execute_command(command)# view the result of a command executionresult=awaitdevice.async_execute_command(turn_on())assertresult.status==SnoozCommandResultStatus.SUCCESSresult.duration# how long the command took to completeContributors ✨Thanks goes to these wonderful people (emoji key):bradleysryder💻Martin Weinelt💻epenet💻This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package was created withCookiecutterand thebrowniebroke/cookiecutter-pypackageproject template.
Package: pysnow
______   __  __    ______    __   __    ______    __     __
/\  == \ /\ \_\ \  /\  ___\  /\ "-.\ \  /\  __ \  /\ \  _ \ \
\ \  _-/ \ \____ \ \ \___  \ \ \ \-.  \ \ \ \/\ \ \ \ \/ ".\ \
 \ \_\    \/\_____\ \/\_____\ \ \_\\"\_\ \ \_____\ \ \__/".~\_\
  \/_/     \/_____/  \/_____/  \/_/ \/_/  \/_____/  \/_/   \/_/
		- Python library for ServiceNowDocumentationThe documentation is available athttps://pysnow.readthedocs.ioDevelopment statusThe development status of pysnow is stable; maintenence will be performed, but no new features added.New features goes intorbw/aiosnow: a modern, asynchronous library for interacting with ServiceNow.AuthorRobert Wikman <rbw@vault13.org>CreditsThank you@contributors, andJetbrainsfor IDE licenses.