Saravanan666/pypi-org huggingface dataset:
Package: pysj
PysjThis package contains utils, classes and helper functions I find myself reimplementing in several projects. As of now all functions are importable from the top level module.The name is a commonly used shortened version of the Norwegian word "pysjamas" (in english: pajamas/pyjamas).
Coding in your pysjamas/pajamas/pyjamas is comfortable. This package is an attempt to make Python development a bit more comfortable as well.This is an ongoing project and so far just a few functions are implemented. Most time  have been spent on project structure, tests and packaging.InstallationpipinstallpysjUsageImporting# We import everything here for all of the examplesfrompysjimport(md5,sha256,ExtendedJSONDecoder,ExtendedJSONEncoder,Timer,chunk,first,flatten,isotime,moving_average,n_wise,paginate,seconds,take,transpose)Extended JSON encoding / decoding# Serializing to json with datetime objectsjson.dumps({"timestamp":datetime.datetime.fromisoformat("2021-12-01T04:50:00.123456")},cls=ExtendedJSONEncoder,)# and back againjson.loads('{"timestamp": "2021-12-01T04:50:00"}',cls=ExtendedJSONDecoder,)Some functional stuffFlattenFlattens an iterable, depth first.>>>flatten([range(10),(1,2,3),"HELLO",[[["42"]],[]],["y0l0"]])[0,1,2,3,4,5,6,7,8,9,1,2,3,'HELLO','42','y0l0']FirstGet first element of an iterable>>>first([1,2,3])1TakeGet firstnelements from an iterabledata=range(100)>>>list(take(4,))[0,1,2,3]ChunkChunks an iterable into an iterable yield a list withnitems at a time.Takes an optionalfillvalue, defaults toNone,data=range(10)>>>list(chunk(take(4,data,fillvalue=":D")))[[0,1,2,3],[4,5,6,7],[9,10,":D",":D"],]Transpose>>>transpose([[1,2,3],[1,2,3],[1,2,3],])[[1,1,1],[2,2,2],[3,3,3]]N wiseYieldsnitems from data like a gliding window, as long as there is enough elements in data to yield the full window.Like itertools.pairwise, but generalized tonitems. (New in Python 3.10)>>>list(n_wise(3,[1,2,3,4,5]))[(1,2,3),(2,3,4),(3,4,5)]Moving average>>>list(moving_average(3,(1,2,3,4,5)))[2.0,3.0,4.0]OtherIsotimeReturns an isoformated string of the current time (or supplied datetimedt) to the givenprecision, defaults to 'd' (day).>>>isotime()'2023-01-01'>>>isotime('s')'2023-01-01T00:00:00'>>>isotime('m',datetime(2022,2,2,2,2))'2022-02-02T02:02'# Only the first character of *precision* is used, so for readability you can write it out fully.>>>isotime('minutes',datetime(2022,2,2,2,2))'2022-02-02T02:02'Stopwatch>>>withTimer():>>># Do stuff>>>sleep(1)StartingtimerElapsedtime1.0007134879997466s.Simple hashing>>>print(sha256("test"))9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08>>>print(md5("test"))098f6bcd4621d373cade4e832627b4f6
Package: pysjobs
A framework for running tasks defined in a config file. You can also install
thein-development versionof pysjobs witheasy_installpysjobs==dev.The home page is currently thebitbucket repository.Questions & CommentsPlease visit:http://groups.google.com/group/pyslibsConfig File ExampleUsageThanksTo thepip project <http://pypi.python.org/pypi/pip>for a lot of the boiler
plate code to get the package up and running and for testing ideas.
Package: pysjtu
PySJTU- The Python iSJTU client for Humans.>>>importpysjtu>>>c=pysjtu.create_client(username="FeiLin",password="WHISPERS")>>>chemistry=c.schedule(year=2019,term=0).filter("大学化学")>>>chemistry[0].teacher_name['麦亦勇']>>>calculus_exam=c.exam(year=2019,term=0).filter(course_id="MA248")>>>calculus_exam[0].datedatetime.date(2019,11,6)And, to persist your session...>>>importpysjtu>>>session=pysjtu.Session()>>>session.login("FeiLin","WHISPERS")>>>session.dump("lin_fei.session")>>>session=pysjtu.Session()>>>session.load("lin_fei.session")>>>pysjtu.Client(session).student_id519027910001FeaturesPySJTU allows you to manipulateiSJTUAPIs easily.You don't need to construct queries on your own, or guessing the meaning of poorly named variables (to name a few,kch_id,rwzxs) any more.
Nowcourse.namecourse.hour_totalis enough!Main features of PySJTU:A friendly API with understandable attribute names.Easy session persistence.Robust captcha recognition using ResNet.80% iSJTU APIs covered. (Course selection APIs included.)Fully type annotated.99% test coverage.InstallationInstall with pip:$pipinstallpysjtu[ocr]PySJTU requires Python 3.8+.Built WithHTTPX- A next generation HTTP client for Python.marshmallow- An ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.ONNX Runtime- A performance-focused complete scoring engine for Open Neural Network Exchange (ONNX) models.NumPy- The fundamental package for scientific computing with Python.Pillow- The friendly PIL fork.LicenseThis project is licensed under GNU General Public License v3.0 - see theLICENSEfile for details.—💖—Built with love by LightQuantum
Package: pysk8
pysk8 is a Python package that provides a basic interface for interacting with
SK8 Bluetooth Low Energy sensor packs produced by SAMH Engineering.Currently the package requires the use of a specific BLE USB dongle, namely theSilicon Labs BLED112. The reason for this is that most development is currently being done on Windows 10, and the native Bluetooth Low Energy APIs (plural) on that platform have been and probably still are unreliable, arbitrarily limited, badly documented, and difficult to work with. As a final touch, forced OS updates have been known to break previously working functionality.In contrast, the BLED112 has an independent onboard BLE stack with a straightforward, documented and stable serial-over-USB interface, and works well with the SK8.As the dongle presents itself to the OS as a simple serial device, the package should work equally well under OSX and Linux as well as any modern version of Windows, but those platforms have been rarely tested to date.
Package: pyske
PySke : Library of skeletons on distributed data structure in PythonVersion 0.1alpha[INSTALLATION][DEVELOPERS][COPYRIGHT]INSTALLATIONThis installation have been tested on Ubuntu 18.04.1 and macOS 10.14.01
Python version: 3.7.0Install MPIOn Linux:sudo apt-get install libcr-dev mpich2 mpich2-docOn macOS:curl https://www.open-mpi.org/software/ompi/v3.0/downloads/openmpi-3.0.1.tar.gz -o openmpi-3.0.1.tar.gz
tar zxvf openmpi-13.0.1.tar.gz
cd openmpi-13.0.1
./configure --prefix=/usr/local
make all
sudo make installInstall packagesDownload get-pip.py:https://bootstrap.pypa.io/get-pip.pyOn Linux:wget https://bootstrap.pypa.io/get-pip.pyOn macOS:curl https://bootstrap.pypa.io/get-pip.py -o get-pip.pyExecute the python script get-pip.pypython3 get-pip.pyThe installation ofpipfor python 3 needs to have the packagelaunchpadlib. It can be installed by:pip install launchpadlibTo use thepipcommand,pipfor python 2 must be installed.python get-pip.pyInstall the necessary packagespip3 install mpi4py/!/ mpi4py necessists to get mpi (for C).DEVELOPERSDEVELOPED BYJolan Philippe (Northern Arizona University, Flagstaff, AZ, USA)Frédéric Loulergue (Northern Arizona University, Flagstaff, AZ, USA)COPYRIGHTPySke is released into the public domain by the copyright holders.This README file was originally written byJolan Philippeand is likewise released into the public domain.
Package: pyskein
PySkein is an extension module for Python, implementing theSkein hash algorithm, one of the five finalists of the
NIST SHA-3 Competition. While ultimately not selected
as the winner of that competition, Skein may still be
useful as an alternative hash algorithm, offering flexible
hashing modes with various parameters. PySkein provides all
features of Skein through a Pythonic interface and is released
as free software under the GNU General Public License.
Its highlights are:Simple interface following the hash algorithms in the
Python standard library (like hashlib.sha1 or
hashlib.sha256)All features of the Skein specification
(flexible digest sizes, MAC generation, tree hashing, and
various others)High performance through optimized C implementation
(7.1 cycles/byte for sequential hashing and 4.2 cycles/byte
for tree hashing on two cores, measured on an Athlon 64 X2)Threefish, the tweakable block cipher used in Skein,
available for encryption and decryption on its own
Package: pyskeleton
pyskeleton更新说明1.0.0移除c语言扩展，本项目保持这样一个快速生成中小型python模块项目的功能的样子，不会再更新了。0.4.0updated to new structure and add a simple ctest submodule writed in c.按照setuptools最新建议更新了新的结构写法，并加入了一个ctest小子模块用于测试c语言写的扩展。0.3.6小优化，还是加入了setup.cfg，某些情况下用户自行决定是否使用python setup.py test这样的测试方法。0.3.5现在pypi支持markdown了，做了一些调整。然后移除setup.cfg了。然后试着用twine来完善整个制作过程，和上传wheel包。0.3.3移除pyosreplace依赖，之前是为了解决python2的兼容性引入的，现在移除了，这样本模块现在不依赖任何模块了，
因为pyosreplace模块还需要调用c编译工具，所以决定移除了。0.3.2移除python2支持移除pytest强制安装依赖，使用者如果有使用pytest需求，请自行安装之。推荐安装的有：pytestpytest-runner不过setup.cfg这个文件还在，如果您有使用pytest需求，那么可以简单在tests文件夹下编写一些test文件，然后：python setup.py test这样做的好处是，其是直接利用本地修改的源码，也就是一边修改源码一边实时测试。一般pypi包依赖都推荐在requirements.txt文件中管理，这更加简便，通过setup.py 有的时候会出一些问题，使用者根据requirements 自行决定pypi包安装方式，这样更灵活一些。程序逻辑优化。description:a small tool make you creat new python project quickly.installpython setup.py installorpip install pyskeletonusagepyskeleton newprojectnametestuse pytest do the test thing, with a little tweak, you can directly test the module like that, even do not need to build the module.python setup.py test
Package: py-skeleton
py-skeletonAre you:Starting new projects by copying old ones?Wishing you could use someone else’s project as a starter template?Confused at how to start “Project FooBar”?I’m always starting a new python projects by cutting and pasting an old one.
py-skeleton helps you fix that.  Usesjinja2andpy-configurator.basic usagepy-skeleton.py--source../py-skeleton-templates/python/--ext.tmpl--destination./build--config./python.ini–source is the directory path to your templates–ext is the extension path for your templates–destination is the directory path to where everything will end up–config is the file path to where your configuration file livestemplatesTo find an example project templates, please take a look atpy-skeleton-templates.todologgingadd other project templates I useremove py-configurator dependency
Package: pyskell
Stuck with Python but you actually want to use Haskell?This is a silly package that (ab)uses Python operator overloading to reproduce beloved features from functional programming.You can do:Currying@currydeff(a,b,c):returna+b+cf(1,2,3)Out[0]:6g=f<<1g<<2<<3Out[1]:6f<<1<<2<<<3Out[2]:6Infix Notation@infixdefplus(a,b):returna+b1|plus|2Out[0]:3Functional Programming!@currydeffoldl(fn,x,xs):returnxifnotxselsefold<<fn<<(x|fn|xs[0])<<xs[1:]sum=foldl<<plus<<0sum([1,2,3])Out[0]:6Bigcreditgoes to these guys:http://tomerfiliba.com/blog/Infix-Operators/https://sagnibak.github.io/blog/python-is-haskell-currying/
Package: pysketch
BasicsThis tool can be used to “take notes” in the form of graphical scribbles, as you would paint them on a small
piece of paper with a pencil, pen, Sharpie (tm), or similar. It doesn’t offer any special options by design.
You get a canvas and can draw on it, with a fix-sized black pen…that’s it.If you’re looking for the more fancy stuff, there are a ton of good drawing applications out
there (gimp, inkscape, …).
Go pick one of them, e.g. if you need special brush shapes with dynamics attached.I try to keep pysketch as minimalistic as possible, such that I can concentrate onwhatI draw, instead ofhowI draw it.IdeaBasic influences for the design and implementation of pysketch were: gsumi/xink and the “scribblesimple” example
from the pygtk distribution.InstallingFor installingpysketch, you have to get root and then run the commandpython setup.py installStartingAfter a successful installation, you can callpysketchfrom the command-linepysketchIt supports a few parameters, that get listed with the-hoption (or--help).Draw with the left mouse button held down, the right button erases with a larger pen size. The
two push buttons at the bottom of the main widget should be pretty self-explanatory. ;)RequirementsPysketch should run under any Python2.x, with having one of theTkinterGTK2pygobjectPyQt4bindings installed.TODOs and known problemsTkinter mode: making the canvas larger, drawing, and then shrinking the window again, will
lead to inconsistencies. The canvas items that are off-screen don’t get removed (no clipping),
but the PIL image in the background won’t have those lines anymore.
Package: pysketcher
This is alpha software - the interface is likely to change with every release prior to 0.1.0.PySketcher is a modern Python library designed to make creating geometric, mathematical and physical diagrams very
easy.This library is continues the legacy of Hans Petter Langtangen. Work done since he sadly passed in 2016 includes:The MatlibplotDraw object is no longer global and is no longer tightly coupled to the shape object. There is now a DrawingTool interface which this class implements.Code is organised into multiple files and published on pypi.Shapes are immutable. This means functions such asrotatereturn modified copies of the original shape, rather than altering the shape on which they are called.Angles are in radians not degrees.The Composition object is used more consistently. Previously objects such as Beam were direct children of Shape which led to code repetition.Please see the documentation for more information.
Package: pyskim
pyskimQuickly create summary statistics for a given dataframe.This package aspires to be as awesome asskimr.Installation$pipinstallpyskimUsageCommandline toolpyskimcan be used from the commandline:$pyskimiris.csv
──DataSummary────────────────────────────────────────────────────────────────────────────────────typevalue
------------------------
Numberofrows150Numberofcolumns5──────────────────────────────────────────────────
Columntypefrequency:Count
--------------
Float644string1──Variabletype:number───────────────────────────────────────────────────────────────────────────namena_countmeansdp0p25p50p75p100hist
----------------------------------------------------------------------0sepal_length05.840.8284.35.15.86.47.9▂▆▃▇▄▇▅▁▁▁1sepal_width03.060.43622.833.34.4▁▁▄▅▇▆▂▂▁▁2petal_length03.761.7711.64.355.16.9▇▃▁▁▂▅▆▄▃▁3petal_width01.20.7620.10.31.31.82.5▇▂▁▂▂▆▁▄▂▃

──Variabletype:string───────────────────────────────────────────────────────────────────────────namena_countn_uniquetop_counts
----------------------------------------------------------------------0species03setosa:50,versicolor:50,virginica:50Full overview:$pyskim--help
Usage:pyskim[OPTIONS]<file>Quicklycreatesummarystatisticsforagivendataframe.

Options:-d,--delimiterTEXTDelimiteroffile.-i,--interactiveOpenpromptwithdataframeas`df`afterdisplayingsummary.--no-dtype-conversionSkipautomaticdtypeconversion.--groupbyTEXTGroupdataframebythis/thesevariable(s).--helpShowthismessageandexit.Python APIAlternatively, it is possible to use it in code:>>>frompyskimimportskim>>>fromseabornimportload_dataset>>>iris=load_dataset('iris')>>>skim(iris)# ── Data Summary ────────────────────────────────────────────────────────────────────────────────────# type                 value# -----------------  -------# Number of rows         150# Number of columns        5# ──────────────────────────────────────────────────# Column type frequency:#            Count# -------  -------# float64        4# string         1## ── Variable type: number ───────────────────────────────────────────────────────────────────────────#     name            na_count    mean     sd    p0    p25    p50    p75    p100  hist# --  ------------  ----------  ------  -----  ----  -----  -----  -----  ------  ----------#  0  sepal_length           0    5.84  0.828   4.3    5.1   5.8     6.4     7.9  ▂▆▃▇▄▇▅▁▁▁#  1  sepal_width            0    3.06  0.436   2      2.8   3       3.3     4.4  ▁▁▄▅▇▆▂▂▁▁#  2  petal_length           0    3.76  1.77    1      1.6   4.35    5.1     6.9  ▇▃▁▁▂▅▆▄▃▁#  3  petal_width            0    1.2   0.762   0.1    0.3   1.3     1.8     2.5  ▇▂▁▂▂▆▁▄▂▃## ── Variable type: string ───────────────────────────────────────────────────────────────────────────#     name               na_count    n_unique  top_counts# --  ---------------  ----------  ----------  -----------------------------------------#  0          species           0           3  versicolor: 50, setosa: 50, virginica: 50
Package: pyskindose
pyskindoseauthor: Max HellströmA python program for calculating 3D skin dose maps based on DICOM X-ray Radiation Dose Structured Reports.Requires Python 3.8 or above. NB! Will soon be upgraded to require Python 3.10 or above.The documentation is under construction and can be found athttps://pyskindose/readthedocs.ioStay tuned!
Package: pyskip
A pure Python skiplist implementation.A skiplist provides a quickly searchable structure (like a balanced binary
tree) that also updates fairly cheaply (no nasty rebalancing acts).
In other words, it’sawesome.Seehttp://en.wikipedia.org/wiki/Skip_listfor more information.Written mostly an exercise for myself, it turns out skiplists are really useful.
It also comes with a (mostly-underdocumented) linked-list implementation
(+ a sorted variant), if that’s useful.RequirementsPython 3.3+ (should work on Python 2.6+ as well, as well as PyPy 2.0+)nose>=1.30for running unittestsUsageUsing it looks like:>>> import skiplist
>>> skip = skiplist.Skiplist()
>>> len(skip)
0
>>> 6 in skip
False
>>> skip.insert(0)
>>> skip.insert(7)
>>> skip.insert(3)
>>> skip.insert(6)
>>> skip.insert(245)
>>> len(skip)
5
>>> 6 in skip
True
>>> skip.remove(245)
>>> len(skip)
4
>>> skip.find(3)
<Skiplist: 3>PerformancePerformance is alright, though I’m sure there’s room for improvement. See thebench.pyscript for more information.Running TestsRunpip install nose(preferrably within a virtualenv) to install nose.Then runnosetests-s-vtests.pyto exercise the full suite.TODOA more performant implementation ofremove(still O(N))More performance testingLoading data seems slowMetaauthor:Daniel Lindsleylicense:BSDversion:0.9.0
Package: pyskiplist
PySkipList is a fast, pure Python implementation of an indexable skiplist. It
implements aSkipListdata structure that provides an always sorted,
list-like data structure for (key, value) pairs. It efficiently supports the
following operations:Insert a pair in the list, maintaining sorted order.Find the value of a given key.Remove a given pair based on a key.Iterate over all pairs in sorted order.Find the position of a given key.Access a pair at a certain position.Delete a pair at a certain position.Since PySkipList is a pure Python implementation, it should work well on
alternative Python implementations such as PyPy and Jython.ExampleThe following provides a few examples on how to use theSkipListAPI:>>> from pyskiplist import SkipList
>>> sl = SkipList()
>>> sl.insert('foo', 'bar')
>>> sl.insert('baz', 'qux')
>>> sl
SkipList((('baz', 'qux'), ('foo', 'bar')))
>>> sl.search('foo')
'bar'
>>> sl[0]
('baz', 'qux')
>>> sl.remove('foo')  # remove by key
>>> del sl[0]  # remove by positionAsymptotic ComplexityBelow are the Big-O complexities of the various operations implemented by
pyskiplist:OperationComplexityinsertionO(log N)search by keyO(log N)removal by keyO(log N)forward iterationO(1)find by positionO(log N)access by positionO(log N)delete by positionO(log N)PerformanceBelow are the results of some performance tests. These are for Python 3.4.2 on
my Linux laptop:TestOperations / secondInsert @ 1k nodes45,056Insert @ 10k nodes42,137Insert @ 100k nodes28,086Remove @ 1k nodes54,316Remove @ 10k nodes46,240Remove @ 100k nodes35,114Search @ 1k nodes137,248Search @ 10k nodes109,480Search @ 100k nodes77,939Memory usagePySkipList tries to be efficient with regards to memory usage. The numbers
below are for Python 3.4.2 on my Linux laptop. This specific test stores pairs
of integer keys and an integer values in a skiplist. The total size of the two
integers on this Python version is 56 bytes.NodesBytes / nodeOverhead (fixed)1k16410810k162106100k162106Implementation notesReference papers on skiplists:ftp://ftp.cs.umd.edu/pub/skipLists/skiplists.pdf(original paper)http://drum.lib.umd.edu/bitstream/1903/544/2/CS-TR-2286.1.pdf(cookbook)This implementation uses a novel (as far as I know) technique where it stores
just a single link width per node, and only in nodes with level > 0. The link
corresponds to the number of nodes skipped by the highest incoming link. Other
implementations that I’ve seen all store a width for every link. This approach
saves a lot of memory. The overhead should just be 1/e (0.37) integers per
node. It makes an indexable skiplist almost as memory efficient as its
non-indexable cousin.Duplicate keys are allowed in this implementation, and insertion order is
maintained.Skiplist nodes are implemented as plain lists instead of objects. This saves
memory. Kudos tohttp://pythonsweetness.tumblr.com/post/45227295342for the
idea.The built-in Mersenne Twister is used as the random source. This is preferable
over SystemRandom since it doesn’t require a system call and there is no need
for cryptographically secure numbers.
Package: pyskool
In 1984, Microsphere publishedSkool Daze, a game for theSinclair ZX Spectrum. In 1985, the sequelBack to Skoolwas published.Each game is based in a boys’ school (though Back to Skool adds a playground
and a girls’ school) and revolves around the antics of Eric, the hero. In Skool
Daze, Eric must steal his report card from the school safe - the combination of
which must be extracted from the teachers’ brains using flashing shields or, in
the case of the history teacher, post-hypnotic suggestion. In Back to Skool,
Eric must get his report card back into the school safe, this time with the
extra help provided by a water pistol, stinkbombs, a bike, mice, a frog and a
girlfriend.Pyskool is a re-implementation of these classic games in Pygame, with the aim
of making them easy to customise by editing configuration files or - for more
advanced customisation - writing some Python code.RequirementsPyskool requires Python 2.7 andPygame(version 1.8+).On Linux/*BSD, Pygame is available via the package management system: thepython-pygamepackage on Debian-based distros and openSUSE, thepygamepackage on Fedora, thedevel/py-gameport on FreeBSD and NetBSD, and thedevel/pygameport on OpenBSD.Windows and Mac OS X users should take care to select the Pygame installer that
matches the version of Python that is installed.Running PyskoolPyskool is actually five separate games:Skool Daze (skool_daze.py)Back to Skool (back_to_skool.py)Skool Daze Take Too (skool_daze_take_too.py)Ezad Looks (ezad_looks.py)Back to Skool Daze (back_to_skool_daze.py)Before playing any of these games for the first time, the required images, ini
files and sound files will need to be created. This can be done by using the--setupoption; for example:$ skool_daze.py --setupThis will:download TZX files from the sources listed inimages.iniand use them to
create the required images in~/.pyskool/imageswrite the required ini files in~/.pyskool/iniwrite the required sound files in~/.pyskool/soundsAfter that, Pyskool can be run in Skool Daze mode:$ skool_daze.pyPlaying PyskoolThe keys to move Eric around are:‘q’ or up arrow - go up stairs, or continue walking in the same direction‘a’ or down arrow - go down stairs, or continue walking in the same direction‘o’ or left arrow - left‘p’ or right arrow - right‘f’ - fire catapult‘h’ - hit‘j’ - jump‘s’ - sit/stand‘w’ - write on a blackboard (press Enter/Return to finish)Other useful keys are:Escape - quit the gameEnd - pause/resumeInsert - take a screenshotF2 - save the gameF6 - load the most recently saved gameF11 - switch between full-screen and windowed modeF12 - show/hide the menuFor full instructions, see thedocumentation.