Saravanan666/pypi-org huggingface dataset:
Package: positional-lsb
Positional LSBPositional LSB is a steganographic algorithm based on LSB. The algorithm is designed to overcome the lack of ease extracting data when LSB usage is detected. This implementation uses sequential writing of data into pseudo-random pixels of the image.ContentRequirementsInstallationExampleEncodeDecodeTestingLicenseRequirementsPython 3.10+The package has 2 required dependencies:OpenCVfor image manipulation.PyCryptodomefor encryption.Installationpipinstallpositional-lsbExampleThis package implements three options for using the algorithm:Without encryptionWith3DESWithAESThere are differences only in the called class methodencode()for encode without encryptionencode_with_3des()for encode with 3DESencode_with_aes()for encode with AESAnd similarly fordecodemethodsWhen creating aPositionalLSBImageclass object, as the first argument you need to specify the path to the image that will be used as a container, and the second argument (optional) is the password in the string format.The use of an algorithm without a password does not reduce the cryptographic strength to the level of the classical LSB, but it makes it easy to extract data if, like you use the packageEncodeYou need to create an instance of the PositionalLSBImage class and call the one kind ofencodemethod and pass the data as the first argument and the name of the output image.The output image must be with.pngextension, otherwise nothing will workfrompositional_lsb.stegoimportPositionalLSBImage# get data in bytesdata=b'Positional LSB is cool!'lsb_encode=PositionalLSBImage('empty_image.[jpg, png, bpm, ...]','Passw0rd')lsb_encode.encode_with_3des(data,'image_with_data.png')DecodeYou need to create an instance of the PositionalLSBImage class and call the one kind ofdecodemethod, which returns the data in bytes.frompositional_lsb.stegoimportPositionalLSBImagelsb_decode=PositionalLSBImage('image_with_data.png','Passw0rd')data=lsb_decode.decode_with_3des()# do something with data# ...TestingToxis used to test this package.For run tests python 3.10 and 3.11 must be installedTo run tests, install and run tox with the following commands:# install toxpipinstalltox# run toxtoxLicenseThis project is licensed under the MIT License. See theLICENSEfile for details.
Package: positionalonly
positionnal only arguments/parametersModule to fake positional only arguments (pep 497, Draft).Let’s take the following function as example:defdiff(left,right,context=3):'''print the diff between `left` and `right` with `context`
'''...rightandleftare now part of the API, and users may decide to
usediff(left=str1, right=str1), blocking api changes, so you can’t
change the names of the parameters, to for exampledef diff(old, new, context=3)without using the C-api.This module provide a decorator @positionalonly to make all the
default-less parameters of your function positional only, so you can
write:@positionalonly
def diff(left, right, context=3):
...Usingit like will raise a TypeError, and the function signature will use
the positional only argument syntax with the/of pep 497.>>> diff(right="bar", left="foo")
TypeError: The following parameters of `diff` are positional only.
They were used as keywords arguments:
- 'right' ('bar') should be in 2nd position
- 'left' ('foo') should be in 1st position

>>> help(diff)
Help on function diff in module __main__:

diff(left, right, /, context=3)Advanced usageBy defaultpositionalonlywill make the limit between
positional-only and the rest of the arguments just before the first
argument with default. You can tweek this behavior by passing an integer
as parameter indicating the number of argument to make positional-only:>>> @positionalonly(3)
... def diff(old, new, context=3)
... pass

>>> signature(diff)
diff(left, right, context=3, /)


>>> @positionalonly(1)
... def diff(old, new, context=3)
... pass

>>> signature(diff)
diff(left, /, right, context=3)If you are too lazy to count, or are afraid of misscounting,positionalonlywill also decide to put the limit to the first
argument which default value ispositionalonlyitself.>>> @positionalonly
... def diff(old, new, end=positionalonly, context=3)
... pass

>>> signature(diff)
diff(left, right, /, context=3)

>>> pos_or_kw
>>> @positionalonly
... def diff(old, start=pos_or_kw, context=3)
... pass

>>> signature(diff)
diff(left, /, right, context=3)Reasons to use positional onlyNaming of argument, and in particular the function signature can be
helfull for tab completion, and static analysis to understand the code.
While posistional only is usable using*argsit hides all this
information both from the human and the computer.The default behavior of Python, is to make agument by dafult, positional
an keyword.This fact often prevent the developer from changing the name without
breaking the API.This also prevent arbitrary**kwargskeys as they are be taken by
“positionaly or keyword” arguments.
Package: positionkey
Position Key: Relax your fingersPositionKey is a multi-platform python package for mapping key strokes to mouse clicks.InstallationInstall with pipPositionKey is available on PyPI aspositionkey.Install PositionKey:pip install positionkeyFor positionkey for function properly, the dependencies will automatically be installed.Local InstallationPositionKey is compatible with Linux and Windows systems. To install a local version:Run installation command from the root directory:pip install .Why use PositionKey?UsageCurrently, there are four keys mapped:D, V, L and Cwhich stands for Dismiss, Verify, Long and Cancel respectively. These four keystrokes can store and hit four positions on the GUI screen.Say if we need to alternately click on two buttons on the computer's screen, just map the click to any two of the mentioned keys and hit the keys alternately on the keyboard as per need.We can record the pixel positions of keys D, V, L, C via the numeric keys 1, 2, 3, 4 respectively. The current position of the mouse pointer will be recorded whenever the above numeric keys are pressed while the script is running.The four (x, y) positions will be stored in a CSV file named 'click_positions.csv' in the current directory for resuming the same positions on succesive runs.The four positions defaults to (700, 0) pixel of the screen where 700 is the X-coordinate and 0 is the Y-coordinate.There is a partition function which will virtually divide the computer screen into two halves: Left and Right. The script will only run when the mouse pointer is on the left of the partition line(vertical) while won't work if the mouse pointer is on the right side of the partition line(Vertical). The partition line can be recorded by hitting the key "P" on the keyboard.LicenceMIT Licence
Package: positions-backtester
Table of ContentsShort Overview.Installation via pip:How to backtest your dataframe with positionsInput example:df_positions_shortOutput: df_backtest_resHow to create execution pricesInputs:FormulasLinksProject local LinksContactsLicenseShort Overview.positions_backtester is a python package (py>=3.7) to backtest trading strategies (dataframe with positions) with execution costs modelingThis package is trying to solve a problem of slow trading with fast data.Let’s say that you want to update your trading position once in a hour, day, week, …But you have data with much higher time resolution - minutes, seconds, milisecondsThen you can give the wanted positions dataframe with the tick with which you want to tradeAnd higher resolution will be used to calculate approximate execution prices(Which are just the mean price over the choosen execution time period)Installation via pip:pipinstallpositions_backtesterHow to backtest your dataframe with positionsfrompositions_backtesterimportrun_backtestdf_backtest_res=run_backtest(df_positions,df_real_exec_prices,is_to_neutralize=True,const_trading_fees_percent=0.01,)!!!df_real_exec_prices should have the same indices as df_positionsArguments:df_positions:pd.DataFramePositions we want to take with the frequency with which we want to change our positionsdf_real_exec_prices:pd.DataFramePrices by which we can buy assets at the given momentis_to_neutralize=True,:boolFlag if to have long-short equal positionstd_trading_delay=None:datetime.timedeltaDelay needed to calculate the wanted positionstd_execution_duration:datetime.timedeltaHow long should the execution takeExecution price will be the mean price over execution time periodconst_trading_fees_percent:floatBroker trading feesInput example:df_positions_shortOutput: df_backtest_resHow to create execution pricesfrompositions_backtesterimportcreate_df_simple_execution_pricesdf_real_exec_prices=create_df_simple_execution_prices(df_prices_full,data_frequency="30min",# 30min, 1h, 3h, 6h, 1doffset="-3min",# "-3min"td_trading_delay=datetime.timedelta(minutes=3),td_execution_duration=datetime.timedelta(minutes=2),)Arguments:df_prices_full:pd.DataFramePrices of assets in higher resolutionHigher resolution needed for more pricise execution evaluationtd_trading_delay=None:datetime.timedeltaDelay (Time) needed to calculate the wanted positionstd_execution_duration:datetime.timedeltaHow long should the execution takeExecution price will be the mean price over execution time periodInputs:df_prices_fullFormulasPNL before_costs = (previous_position) * (price_change_%)trading_volume = abs(new_wanted_position - previous_position)PNL const_trading_fee = trading_volume * broker_commisionPNL after_costs = PNL before_costs - PNL const_trading_feePNL half_costs = PNL before_costs - PNL const_trading_fee/2.0LinksPYPIGitHubProject local LinksCHANGELOG.CONTRIBUTING.ContactsEmail:stas.prokopiev@gmail.comvk.comFacebookLicenseThis project is licensed under the MIT License.
Package: posit-playground
posit-playgroundGoals:output nice bit representationsbuild positfrom_doubleandfrom_bitsimplement basic math operationsadd/submuldivInstallstablepipinstallposit-playgroundUsagefromposit_playgroundimportfrom_bits,from_doublep1=from_bits(bits=0b000110111011101,size=16,es=3,)p2=from_double(x=2.312,size=6,es=1,)p1*p1# implements posit multiplicationor better yet, launch a notebook on binderor visitnotebooks/1_posit_playground_demo.ipynbChangelogSeeCHANGELOG.md.DemoScreenshot of posit-playground in action, with a corner case example in which the exponent is chopped off the bit fields
Package: positron-cross-section
Positron Cross Section AnalysisThis is a python application that assists with the analysis and plotting of positron cross sectionsInstallationTo install the positron cross section application, ensure that you have python version 3.7 or greaterpython--versionand then install withpython-mpipinstall--upgradepippython-mpipinstallpositron-cross-sectionYou can then run the application using the commandpositron-cross-sectioncross_section_data.csvwhich will produce total cross section plots in theoutputfolder.Development environment installation instructionsSetting up Python EnvironmentThe python code in this application requires a development environment with
python 3.9 or greater. To maintain the integrity of other python applications on your system, it
is highly recommended to use a separate python environment for the
positron cross section application, however it can also be installed directly if
your python version meets the requirements.Installing a python environmentTo set up a separate python environment (recommended), we will usepyenvwhich allows us to isolate
the positron cross section development environment and python
version. To install pyenv, please follow the instructions detailedhere. During this
installation, you will get the warningWARNING:seemsyoustillhavenotadded'pyenv'totheloadpath.# Load pyenv automatically by adding
# the following to ~/.bashrc:To add this text to ~./bashrc, run the commandecho'export PATH="$HOME/.pyenv/bin:$PATH"
export PATH="$HOME/.pyenv/shims:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"'>>~/.bashrcYou now need to reload your shell which can be done by restarting your terminal
or running the commandexec$SHELLTo create a pyenv environment called positrons for this application with
python version 3.9.5, run the commandspyenv install 3.9.5pyenv virtualenv 3.9.5 positronsThen, prior to following the installation steps below and before each
time using thepositron-cross-sectionapplication, you will need
to enter the positrons python environment using the commandpyenv activate positronsDownloading and installing the positron cross section applicationTo download the source code and install the application, please open a
terminal, navigate to the folder in which you would like to perform the
installation and run the commandsgit clonehttps://github.com/ryanstocks00/positron-cross-sectioncdpositron-cross-sectionsourcetools/install-dev-envCongratulations! The poistron cross section application is now
(hopefully) successfully installed and can be run using the commandpositron-cross-section--helpin a new terminal window.
Package: positronic-brain
Positronic Brain================<img align="right" src="logo.png" width="200" height="200"/>> *Opinionated BuildBot workflow.*[![Build Status](https://travis-ci.org/develersrl/positronic-brain.svg?branch=master)](https://travis-ci.org/develersrl/positronic-brain)[![Coverage Status](http://img.shields.io/coveralls/develersrl/positronic-brain.svg)](https://coveralls.io/r/develersrl/positronic-brain)[![Stories in Ready](https://badge.waffle.io/develersrl/positronic-brain.png?label=ready&title=Ready)](https://waffle.io/develersrl/positronic-brain)Positronic Brain makes it extremely easy to get up and running with your BuildBot server by droppingfew lines in your `master.cfg` file. Gone are the days of having to figure out how to wire allpieces together.Adding a positronic brain to your BuildBot brings you:* Sensible defaults for your BuildBot master.* Notification emails sent to _developers_ after a build failure.* Notification emails sent to _administrators_ for all builds on all projects.* No need to mess with Change Sources or Schedulers.* Archiving of artifacts on the master after each successful build.* Automatic deletion of old artifacts on the master.Installation------------This package is not being published to PyPI, so for the time being you have to install it byrunning:pip install https://github.com/develersrl/positronic-brain/archive/master.zip#egg=positronic-brainPlease note that this package depends on a very specific version of the BuildBot master and you haveto make sure to have it installed first (see [requirements.txt](requirements.txt) for more details).Usage-----In your BuildBot master configuration file (`master.cfg`) import everything from the"positronic.brain" package and perform some basic initialization:```pythonfrom positronic.brain import *#      basedir=basedir looks weird, but we need it.master(basedir=basedir, url='https://buildbot.example.com/')worker('my-first-worker', 'secretpassword')worker('my-second-worker', 'anothersecretpassword')with FreestyleJob('my-project', workers=['my-first-worker', 'my-second-worker']) as j:j.checkout('project', 'svn+ssh://svn.example.com/svn/project', 'trunk')j.command('make')j.command('make', 'check')j.command('make', 'packages')j.notify('dev1@example.com')```
Package: posixath
Install instructionsTo install the Posix Atomic Test Harness simply runpipenvinstallposixathorpipinstallposixaththen follow the instructions below for how to run the testsRunning the tests (simple)Theposixathpackage contains all the code necessary to run myriad attack techniques for both Linux and macOS. Below are a few examples of how to run the various tests. For more information run. If you want more examples of how to run very specific tests please refer to the documentation for that specific technique.python-mposixath--helpViewing available testsTo view the available tests runpython-mposixath[linux|macos]--listRunning a specific attack techniqueTo run a specific attack technique you need to specify the platform and the technique as followspython-mposixathlinux-tT1018or for macOSpython-mposixathmacos-tT1059DocumentationWe use a variation onmkdocsfor our documentation. All of the documentation is housed in the docs folder of the repo. They are markdown files and so can be easily viewed in github or in any standard markdown viewer. You can also use the python librarymkdocs-materialto generate a more friendly local web view of the documentation. To do so make sure you have the dev dependencies listed in the Pipfile installed. Then runmkdocs servefrom the root directly. This will create a web server that listens on localhost and provides a nice web UI for viewing the documenation.DependenciesLinuxSome test require that the user berootin order to run.Below is a list of packages required for being able to run the posix testsUbuntu$sudoapt-getinstalllibcap-devFedora$sudodnfinstalllibcap-develAdvanced UsageYou can use the Posix Atomic Test Harnesses directly from the code base as well. The following instructions will walk you through
how to setup your environment so that you can run the tests directly from the source. Running tests this way allows you to use any
tools that operate withpytestitself.pytest runnerPytest is used as our test runner to execute various Atomic Test Harness tests. In order to prepare your environment please run:pipenvinstallpipenvshellpytest-k[linux|macos]-vNOTE: If you don't havepipenvinstalled please see the guidehereRunning the testsThe tests can be run two different ways. The first is by cloning the repo and calling directly into pytest. The second is by installing the code base from PyPi.Enumerate the different types of tests that can be runpytest --coEnumerate the various command line parameterspytest --helpand look for the custom options sectionorpytest --fixturesEnumerate the different types of linux testspytest -v -m linux --coEnumerate the different types of macOS testspytest -v -m macos --coEnumerate attack variations for a given techniquepytest -v -m linux -k T1548_001 --coRun all linux testspytest -v tests/linuxorpytest -v -m linuxRun all macOS testspytest -v tests/macosorpytest -v -m macosRun a specific attack type for linuxpytest -v -m linux -k T1548_001Run a specific attack type variation for linuxpytest -v -m linux -k T1548_001 -k chmodRun a specific attack type for macOSpytest -v -m macos -k T1018
Package: posixfs
posixfsposixfs provides context managers and functions to manipulate files on a POSIX file system with atomicity and
durability. The module is intended to be simple and straightforward to use.The module is written in Python 3 with types annotated and usingpathlib.Path.Related ProjectsThere are many modules and projects which already provide this functionality. We give below a non-exhaustive list:https://github.com/abarnert/fatomichttps://github.com/untitaker/python-atomicwriteshttps://github.com/mitsuhiko/python-atomicfilehttps://github.com/sashka/atomicfilehttps://boltons.readthedocs.io/en/latest/fileutils.html#boltons.fileutils.atomic_saveUnfortunately, none of them provides durable writes (only atomic ones), they lack type annotations and they all usestrinstead ofpathlib.Pathto deal with file paths.We particularly found type annotations to be crucial for a
module which is widely used, such as for writing and reading files, in a large code base that requires static checks and
good readability. Moreover, we do not want to give away the manipulation capabilities ofpathliband be forced to
sprinkle.as_posix()all over the code.For more information on atomic and durable writes on POSIX file systems, seehttp://blog.httrack.com/blog/2013/11/15/everything-you-always-wanted-to-know-about-fsyncUsageimportpathlibimportposixfs# write bytes to a file atomically and durablypth=pathlib.Path("/some/file.txt")posixfs.atomic_write_bytes(path=pth,data=b"hello",durable=True)# write text to a file atomically and durablyposixfs.atomic_write_bytes(path=pth,text="hello",durable=True)# use context managerwithposixfs.AtomicWritingText(path=pth,durable=True)asfile:file.write('hello\n')file.write('how do you do?\n')InstallationCreate a virtual environment:python3-mvenvvenv3Activate it:sourcevenv3/bin/activateInstall posixfs with pip:pip3installposixfsDevelopmentCheck out the repository.In the repository root, create the virtual environment:python3-mvenvvenv3Activate the virtual environment:sourcevenv3/bin/activateInstall the development dependencies:pip3install-e.[dev]We use tox for testing and packaging the distribution. Assuming that the virtual environment has been activated and
the development dependencies have been installed, run:toxWe also provide a set of pre-commit checks that lint and check code for formatting. Run them locally from an activated
virtual environment with development dependencies:./precommit.pyThe pre-commit script can also automatically format the code:./precommit.py--overwriteVersioningWe followSemantic Versioning. The version X.Y.Z indicates:X is the major version (backward-incompatible),Y is the minor version (backward-compatible), andZ is the patch version (backward-compatible bug fix).
Package: posix-ipc
# POSIX IPCposix_ipcis a Python module (written in C) that permits creation and manipulation of POSIX inter-process semaphores, shared memory and message queues on platforms supporting the POSIX Realtime Extensions a.k.a. POSIX 1003.1b-1993. This includes nearly all Unices and Windows + Cygwin ≥ 1.7.posix_ipcis compatible with all supported versions of Python 3.For complete documentation, see [the usage notes](USAGE.md).## Python 2.7 SupportVersion 1.0.5 was the last version ofposix_ipcto support both Python 2.7 and Python 3.x. Starting with version 1.1.0, only Python ≥ 3.6 is supported. No changes (neither fixes nor features) will be backported to 1.0.5.## Installationposix_ipcis available on PyPI:pip install posix-ipcOr you can clone the project and install it usingsetup.py:python setup.py install## Licenseposix_ipcis free software (free as in speech and free as in beer) released under a 3-clause BSD license. Complete licensing information is available in [the LICENSE file](LICENSE).## RelatedYou might also be interested in the similar System V IPC module:https://github.com/osvenskan/sysv_ipc
Package: posLDA
posLDAOverviewThis is a package to perform Linear Discriminant Analysis (LDA) on particle positions taking into account the rotational invariance of these positions.DependenciesThis package is dependent on the following packages:Python>=3.6numpytorch>=1.11 (==1.11 if option 4 is used)sklearnshapeGMMTorchInstallationAfter the dependencies have been installed, the package can be installed from pippip install posLDAor by downloading from github and then runningpython setup.py installUsageThis package is designed to mimic the usage of the sklearn package.  You first initiliaze the object and then you can transform additional data.Initialize:from posLDA import pLDAplda = pLDA.pLDA(training_set_positions, cluster_ids)During initialization, the following options are availble:- rot_type                - string defining the type of rotational alignment to use.  Options are 'kronecker' and 'uniform'.  Defualt is 'uniform'.
- kabsch_thresh           - float dictating convergence criteria for each alignment step.  Default value is 1e-1.
- dtype                   - Torch data type to be used.  Default is torch.float32.
- device                  - Torch device to be used.  Default is torch.device('cuda:0') device.Fit:plda.fit(training_set_positions, cluster_ids)Transform:transformed_positions = plda.transform(full_trajectory_positions)AttributesAfter being properly fit, a pLDA object will have the following attributes:- n_clusters		- integer of how many clusters were in tranining cluster_id array
- n_atoms           	- integer of how many atoms were in the training data
- n_training_frames    	- integer of how many frames were in the training data
- lda 			- sklearn LDA object fit using training data
- lda_vecs              - (n_atoms x 3, n_clusters-1) float array of LD vectors
- lda_projection        - (n_training_frames, n_clusters-1) float array of LD projections for training data
- center	      	- (n_atoms, 3) float array of global center/averageUniform covariance specific attributes- var		       	- (n_clusters) float of global varianceKronecker covariance specific attributes- precision	   	- (n_atoms, n_atoms) float array of global precision (inverse covariance)