Saravanan666/pypi-org huggingface dataset:
Package: pyprimer
PyPrimerA simple collection of prime number related functions.Install$pipinstallpyprimerFor bleeding edge$pipinstallgit+https://github.com/mentix02/pyprimerDocsis_prime(int) -> boolChecks if given number n is prime.>>> from pyprimer import is_prime
>>> is_prime(3)
Trueprimes_till(int) -> List[int]Returns a list of all primes numbers up until n.>>> from pyprimer import primes_till
>>> primes_till(6)
[2, 3, 5, 7]n_primes(int) -> List[int]Returns a list of first n natural primes numbers.>>> from pyprimer import n_primes
>>> n_primes(6)
[2, 3, 5, 7, 11, 13]n_prime(int) -> intReturns the nth prime number.>>> from pyprimer import n_prime
>>> n_prime(13)
41prime_generator() -> Iterator[int]Returns an iterable of ints with each next element being the next prime number.>>> from pyprimer import prime_generator
>>> total = 0
>>> g = prime_generator()
>>> for n in g:
...   if n == 13:
...     break
...   total += n
>>> print(total)
28
Package: pyprimos
Este es un ejemplo simple de un paquete Python con integraciÃ³n de R. Este paquete contiene una funciÃ³n que recibe un nÃºmero n y calcula del 1 a n todos los nÃºmeros primos.This program is free software: You can redistribute it and/or modify it under the terms of license by the Free Software Foundation, either version 3 of the License(at your option) any other version.
Package: pyprinter
Printing everything for everyone!Project page:https://github.com/ofir123/py-printerUsageThe perfect printer for Python 3!Just create a printer instance, pick your favorite colors and get to work!py-printer supports all ANSI colors, and crazy encodings!It also calculates the console width in order to wrap words properly.importpyprinterprinter=pyprinter.get_printer()# Write a simple line.printer.write_line(printer.YELLOW+'Hello World!')# Or use the color functions (nested coloring is also supported).printer.write_line(printer.yellow('Hello World!'))# Use indentations.withprinter.group(indent=4):printer.write_line(printer.GREEN+'Hello Again!')# Write aligned values.printer.write_aligned('Awesomeness','Check!')# Write titles.printer.write_title('Wow!')# Print human-readable file sizes.frompyprinterimportFileSizeFileSize(42352352).pretty_print()# Use tables.frompyprinterimportTableTable('Test',[{'1':'a','2':'b','3':'c'}]).pretty_print()# Integrate friendly progress bars.importtimefrompyprinterimportProgressBarprogress=ProgressBar(10)foriinrange(10):time.sleep(1)progress.eval(i)progress.finish()# Use word-wrapping or colors only.printer=pyprinter.get_printer(colors=False,width_limit=True)printer.write_line(printer.YELLOW+'Hello World!')Installpip install pyprinterDevelopmentIn order to build a new version, do the following:Update version string insetup.py(in bothversionanddownload_urlfields)Update version in__init__.pyfile.Runpython setup.py sdist bdist_wheelto create the buildRuntwine upload dist/*to upload everything to PyPiCreate a release (and tag) for the new version in GitHub (and delete the old one)Delete old version from PyPi as well
Package: pyprintflow2
This is the PrintFlow 2 Service application.
This application provides tools to integrate Noosh Online with Canto Cumulus, along with maintaining a JSON based data store of integration objects.In general, integration calls are made using using REST-like web service calls. The ‘requests’ python package is used to do all HTTP requests.The application needs to run with “sudo” to ensure permissions required for file system manipulation apply.In order to make use of this code for production use, you need various authenticated access tokens and serial numbers to use the various applications.
Use of the software on with commercial versions of Noosh Online and/or Canto Cumulus and/or Canto Cumulus basis is considered commercial use.
However, the source code can be explored and used on a free basis, and if useful, can be re-factored as required for any development purpose.To deploy run: python3 setup.py bdist_egg upload - if any issues, first run python3 setup.py register
To update runtime on server: sudo /usr/local/bin/easy_install-3.3 -U pyprintflow2
Package: pyprintplus
A better way of printing logs in Python.Want to support the development and stay updated?Installationpip install pyprintplusFunctionsprint()Print a message together with the current file and time (or runtime).Example:from pyprintplus import Log

Log().print(text='Email sent',filename='send_email.py')Input options:text = str
filename = str (default: None)
script_started_time = int (UNIXtime, default: None)show_message()Show a message in a speech bubble, making it more engaging for real humans.Example:from pyprintplus import Log

Log().show_message(text='Hello! Lets setup your new website!')Input options:text = strshow_messages()Show one or multiple messages automatically in a speech bubble, one after the other, after a few seconds delay.Example:from pyprintplus import Log

Log().show_messages(list_messages=['Email was sent.','What do you want to do next?'])Input options:list_messages = list
Package: pyprintr
Python-printr (or PyPrintr) is a recursive printing objects module that allows
to emulate the print_r() function of PHP  by printing the objects properties of
a class instance and its internal structure.NOTICE:
If you need to use printr() function for list, tuples and dicts,
please, don’t use printr() function. You can choose pprint module.
printr() function is only for objects of your own class instances.
Read more about Python-printr athttps://pypi.python.org/pypi/pyprintrDeveloped by:Eugenia Bahithttp://www.eugeniabahit.com/Contributors:Alejandro Ramirezhttp://www.ramirezalejandro.com.ar/Licence:GPL v3.0Basic UsageFirst, you must get an object of a class instance and then, you can call
to the printr function by passing the object like an argument function.from printr import printr

my_object = MyClass()
printr(my_object)CustomizationChange this value by modifying the IDENTATION_CHAR constant:import printr
printr.IDENTATION_CHAR = "."  # use point to identation
myobject = MyClass()
printr.printr(myobject)Also, you can set the identation width, by modifying the TAB_WIDTH constant
(by default is 4):import printr
printr.TAB_WIDTH = 2
myobject = MyClass()
printr.printr(myobject)
Package: pyprint-special
Pretty PrintRules :-list should be 2 dimensionalevery list inside the list should be equal length
for example:[["item1","item2"],
["item3","item4"],
["item5","item6"]]For Example :-from prettyprint import prettyprint
p = prettyprint([[1,2,3],[2,3,23]])
print(p.prettyprint())output :---------------------
|  1  |  2  |   3  |
--------------------
|  2  |  3  |  23  |
--------------------githubyoutube
Package: pyPRISMClimate
pyPRISMClimateAn interface to the PRISM Climate data with functions similar
to the R packageprismInstallationRequires python 3. No other packages needed.Install via pippip install pyPRISMClimateInstall the latest version directly from GitHub:pip install git+git://github.com/sdtaylor/pyPRISMClimateDocumentationhttps://sdtaylor.github.io/pyPRISMClimateAcknowledgmentsDevelopment of this software was funded bythe Gordon and Betty Moore Foundation's Data-Driven Discovery InitiativethroughGrant GBMF4563to Ethan P. White.
Package: pyprismic
pyprismic: a simple python Prismic clientThis is a very simple Prismic python client.It uses the REST API from prismic.Right now it only supports public Prismic repositories.Installingpip install pyprismicUsing itfrom pyprismic import Client, as_html

c = Client("your-repo")

res = c.query(predicate="""[[at(document.type, "faq")]]""")

document = res['results][0]

rich_text = document['data']['rich_text_field']

html = as_html(rich_text)Querying PrismicFor querying prismic, you only need to follow the predicates system that they have in place.Check theofficial documentation.NOTE: it is important to use the triple quote so you can properly use the " for the strings.
Package: pyPrivnote
# pyPrivnoteA Python Interface to Privnote service#### [privnote.com](https://privnote.com): Send notes that will self-destruct after being read.Privnote allows you to create one-time-pad encrypted, burn-after-reading notes over the internet. It's a great way to share passwords or other sensitive peices of information.### Installation```shellpip install pyPrivnote```### UsageFunctions **create_note** and **read_note** thats all you need to use full functionality of Privnote#### To make a simple note call function create_note.```pythonimport pyPrivnote as pnnote_link = pn.create_note("Private message")# "https://privnote.com/hl5R6EqM#UFgVC2UHD"```#### To read note call read_note with note link.```pythonnote_text = pn.read_note(note_link)# "Private message"```##### Making/reading notes with manual password.```pythonimport pyPrivnote as pnnote_link = pn.create_note("Super secret message", manual_pass="12345")# "https://privnote.com/w0q6kGlR"note_text = pn.read_note(note_link, password="12345")# "Super secret message"```#### Full functionality of privnote**Manual password** <br>**E-mail notification** with _reference name_ <br>Note **self-destructs** after reading or _expire lifetime_ <br>**Asking confirmation** before reading _(only for web reading)_```pythonimport pyPrivnote as pnnote_link = pn.create_note("Super secret message",manual_pass="12345",duration_hours=5,ask_confirm=False,notify_email="address@domain.com",email_ref_name="Note sent to Bob")```#### Release Historyv0.0.1 - First release
Package: pyprland
Extending Hyprland's featuresPyprland is a host process for multipleHyprlandextensions,
aiming at simplicity and efficiency.It provides a variety ofpluginsyou can enable to your liking.New users need to read thegetting startedpage.→Documentation→Discussions→Contact (Community discord)(nick:fab31)Share your thoughts and setup bits ondiscuss anythingAbout Pyprland🎉"It just works very very well" - The Linux Cast (video)- February 2024🎉You NEED This in your Hyprland Config - LibrePhoenix- October 2023 (warning:nowTOMLformat is preferred overJSON)DependenciesHyprland>= 0.30 (versions < 1.8 can run on Hyprland 0.25)Python>= 3.11aiofilespython package (since Pyprland >= 2.0)Latest major changesCheck theReleases change logfor more information2.0New dependency:aiofilesfully asynchronous plugins, including file operationsAddedhysteresissupport forscratchpadsin 2.0.1, only active ifunfocus="hide"is set.If it feels too slow for you, set a lower value orhysteresis=0to completely disable it.1.10Newfetch_client_menuplugin (shows a menu to bring a window to the active desktop)Dynamic menus can be achieved byshortcuts_menu1.9Newshortcuts_menuplugin1.8toggle_minimizedcommand renamed totoggle_specialand moved to a separate plugin for clarityadd thetoggle_specialplugin to your config and rename the command in yourhyprland.conf& scripts!was provided byexposemonitorsplugin improved a lot. If you were disappointed with a previous experience, give another chance to the latest1.8version.Newlayout_centerpluginAutomated testing have improved a lot1.7BREAKING CHANGEmonitorsplugin uses now a new syntax - full rewrite (expect a behavior change)DevelopersIf you feel like contributing, you are welcome. It can be done in many different ways:bug reportingor proposing solid feature requestsImproving thewiki(catching/fixing mistakes, helping with the formal structure, additional content, better wording, etc...)Writingnew pluginsImproving existingpluginsImprovingtest coverageCheck thecreating a pull requestdocument if you are not familiar with itStar History
Package: pyProbabilityDistributionFit
pyProbabilityDistributionFitProbabilty Distribution FitMotivation: Stackoverflow questionsDistribution Fitting with Sum of Square ErrorWhat do all the distributions available in scipy.stats look like?DocumentationIssue #1WikiAuthorsSaullo G. P. Castro2013 AnswerTimothy Davenport2016 AnswerWolfgang Fahl2022 Answer
Package: pyprobar
PyprobarA beautiful , fast, easy-to-use  progress bar for python.Installationpipinstallpyprobarnightlybuild:pythonsetup.pyinstallSynopsis28.71%|████████>>>>>>>>>>>>>>>>>|0:00:22|0:00:31ETC:05-2018:08:15PerformanceFor 10000000 loops:probar:# this repo100.00%|█████████████████████████████|0:00:00|0:00:02ETC:06-0712:08:03

bar:# this repo100.00%|█████████████████████████████|0:00:00|0:00:03ETC:06-0712:11:15

tqdm:100%|██████████|10000000/10000000[00:03<00:00,2634907.84it/s]progressbar:100%(10000000of10000000)|############| Elapsed Time: 0:00:46 Time:  0:00:46UsageUseprobarorbarfor different situations:probar:frompyprobarimportbar,probarimporttimeforidx,xinprobar(range(1234),enum=True):time.sleep(0.02)>>>18.31%|█████>>>>>|0:00:20|0:00:25ETC:05-2019:00:39Or  used in  List comprehension:res=[iforiinprobar(range(10))]print(res)>>>100.00%|███████████████████████████|0:00:00|0:00:00ETC:05-2012:14:33
>>>[0,1,2,3,4,5,6,7,8,9]bar:importnumpyasnpN=1024a=np.linspace(2,5,N)foridx,iinenumerate(a):time.sleep(0.01)bar(idx,N)>>>100.00%|███████████████████████████|0:00:00|0:00:10ETC:05-2020:33:34You can set your own progress bar by using the parameterssymbol_1andsymbol_2:foriinprobar(range(1234),symbol_2="o"):time.sleep(0.01)>>>23.10%|██████ooooooooooooooooooo|0:00:10|0:00:14ETC:05-2017:29:57Tip: Searchcharmapin win10 start menu, you can find a lot of interesting characters.Supports progress bars in different colors:foridx,iinenumerate(a):bar(idx,N,color='1')# `color` options: '1','2','3','4','5','0','update_random'time.sleep(0.01)Of course, you can also add text or variables to the progress bar:foridx,iinenumerate(a):text=f"what you want see is{x}"bar(idx,N,text=text)multi-line text :foridx,iinenumerate(a):text=f"{v1}, frame:{idx}\n"bar(idx,N,text=text)Specify the time zone:foriinenumerate(a):bar(idx,N,time_zone="Asia/Shanghai")print RGB color string:frompyprobar.styleStringimportrgb_strtext=rgb_str("I'm green!",RGB_fore=[0,255,0])print(text)TODOThread problem with probar()  in jupyter notebookThread  problem withbar()in jupyter notebookSpeed of informationMultithreading
Package: pyprob-distributions
pyprob-distributionsGaussian and Binominal distributionsGuassian distribution:>>> from pyprob_distributions import Gaussian
>>> Gaussian(25, 2)
mean 25, standard deviation 2Guassian distribution:>>> from pyprob_distributions import Binomial
>>> Binomial(0.4, 20)
mean 8.0, standard deviation 2.1908902300206643, p 0.4, n 20DescribtionYou can useGaussianandBinominalclasses.Gaussiansupports distribution addition,Binominalsupports distribution addition when both distribution have same probability.Installationpip install pyprob-distributionsSee the source for this project here:https://github.com/AdithyaYelloju/pyprob-distributions.
Package: pyprobound
pyProBoundPython package for scoring sequences by a ProBound modelThis is an interface package to score sequences by models of transcription factor affinity produced by ProBound (Rube, H.T., Rastogi, C., Feng, S. et al. Prediction of protein–ligand binding affinity from sequencing data with interpretable machine learning. Nat Biotechnol 40, 1520–1527 (2022).https://doi.org/10.1038/s41587-022-01307-0).This is only an interface. The functional part of the scoring is provided by a (sligthly modified) ProBoundTools Java program available fromhttps://github.com/Caeph/ProBoundTools.git. The original program can be found athttps://github.com/BussemakerLab/ProBoundTools.RequirementsPython>=3.9 with numpy, pyjnius and pandas. Installed Java in your path.UsagePackage contains two classes:MotifCentral: a class representing already available models fromhttps://motifcentral.org/.
You can get thefit_idof a model you need, using filters as a taxon, source study or a transcription molecule.It is currently based on v1.0.0 of the database.The commandfrom pyProBound import MotifCentral

database = MotifCentral()
database.filter(taxa=["Drosophila melanogaster"], 
                publications=["Isakova2017", "Jolma2013"])returns a Pandas DataFrame containing rows that comply with filters.ProBoundModel: a class representing a binding model.You can get a model from the MotifCentral database, if you know its fit ID.from pyProBound import ProBoundModel
model = ProBoundModel(1000, motifcentral=True)You can use the ProBound webserver (http://pbdemo.x3dna.org) and fit your own model.
You can then load it from the model json.model = ProBoundModel("fit.sox2.json", fitjson=True)where"fit.sox2.json"is a path to the file.Finally, you can load a prepared model from json.model = ProBoundModel("model.json")where"model.json"is a path to the file.Using the loaded model, you can manipulate it (selecting and removing binding modes, ...).
You can also score sequences by the following methods:model.score_affinity_sum(sequences)
model.score_binding_mode_scores(seqs, score_format=...)See the example jupyter notebooks in the github repository for more details.
Package: pyprobs
What is PyProbs?PyProbs is a module that has useful functionality that returns True or False output based on the given probability.InstallationYou can install it fromPyPIby running the following command:pip install pyprobsOr you can install it fromsource:pip install .ExamplesSimple Usage:>>>frompyprobsimportProbabilityaspr>>># You can pass float (i.e. 0.5, 0.157), int (i.e. 1, 0) or str (i.e. '50%', '3/11')>>>pr.prob(50/100)False>>>pr.prob(50/100,num=5)[False,False,False,True,False]Suggested and More Advanced Usage:>>>frompyprobsimportProbabilityaspr>>>p=pr()>>>p.iprob('3/7',0.25,num=2)[[True,True],[False,False]]>>>p.history{'3/7':[True,True],0.25:[False,False]}>>>p.count_values('all'){True:2,False:2}>>>p.set_constant(1/1000,mutable=True)# If you set the mutable parameter to False, you won't be able to change the constant again.>>># You can get the constant and mutable value:>>>p.get(){'constant':0.001,'mutable':True}>>># Also you can use it like "p.get(how='constant')" or "p.get(how='mutable')", this only returns the desired value.>>>p._constant# You can more easily get the constant value.0.001Functions of The Probability Classprobiprobset_constantgetclearcount_valuesNote: All of them require creating an instance except theprobfunction.RequirementsPythonv3.6+Documentationhttps://pyprobs.readthedocs.io/
Package: pyproc2
Short intropyproc2is Python library for reading data from /proc/ directory.
Of course, it works only on Linux.Installationpip install pyproc2What can it do?Find processesThere is only one method for all filters (PID, process name, user name,etc.)
It is calledfind().
Here are few examples:1. By PID:importpyproc2pyproc2.find(1)2. By process name (can return multiple results)importpyproc2pyproc2.find("python")3. By user name (or UID or whatever)importpyproc2pyproc2.find(user="root")#Replace "user" to filter  by other propertiesDoing things with selected process(es)1.Sending signalsSimple kill:importpyproc2pr=pyproc2.find("python")pr.kill()For other signals, passkill()an argument.
Most common signals have defined own methods:importpyproc2pr=pyproc2.find("python")pr.term()#Or stop() or cont() or whatever2.Acessing attributesimportpyproc2pr=pyproc2.find("python")cpu=pr.cpuuid=pr.uid#etc.3.Accessing children and parent processesimportpyproc2pr=pyproc2.find(1)cdr=pr.children#get all childrenparent=pr.parent#get parent processp4=pr.parentLevel(4)#equivalent of pr.parent.parent.parent.parentkid=pr.child(3)#fourth children(sorted by PID)(negative indexes are working,too)4.Sending data to open fds(works only as root)import pyproc2
#simple write
pyproc2.find('bash').stdin.write('ls -la')
#simple stdout read
pyproc2.find('bash').stdout.read()
#simple stderr read
pyproc2.find('bash').stderr.read()
#write to fd
pyproc2.find('bash').fds.fd(39).write('hello')
#read from fs
pyproc2.find('bash').fds.fd(39).read()Duplicatingr=my_process.duplicate()This runsmy_process.commandusing subprocess and returns result PID.Acess predefined process sets1.All processesimportpyproc2rn=pyproc2.running2.All processes, sorted by CPU rateimportpyproc2t=pyproc2.top3.Current processimportpyproc2cur=pyproc2.currentLicensepyproc2is licensed underGPL LicenseChangelog1.0.2Initial1.0.3Improved documentation1.0.4Improved documentation1.0.5Bug fixes1.1.0Speed increased1.1.1Addedownerproperty as equivalent touser1.1.2Added changelog1.1.3FixedProcessSet.kill()NotImplementedError bug1.1.4AddedSTOPPEDstate1.1.5Addedcurrentproperty1.2.0Added reading from fds and duplicating1.2.1Added "strict" argument in fd.py; tests failed on Debian(kthreadd)1.2.2Fixed OSError: too many open files. Added sudoing on duplicate() and some warnings.
Package: pyprocdev
This package supplies a Python interface to the /proc/devices file.To use, instantiate the ProcDev class and invoke its methods.>>> from pyprocdev import *
>>> procdev = ProcDev()
>>> procdev.majors(DeviceTypes.BLOCK)
[8, 9, 11, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135, 253, 254, 259]
>>> procdev.majors(DeviceTypes.CHARACTER)
[1, 4, 5, 7, 10, 13, 14, 21, 29, 99, 116, 128, 136, 162, 166, 180, 188, 189, 202, 203, 226, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254]
>>> procdev.drivers(DeviceTypes.BLOCK)
frozenset(['md', 'sr', 'device-mapper', 'blkext', 'mdp', 'sd'])
>>> procdev.get_driver(DeviceTypes.BLOCK, 8)
'sd'
>>> procdev.get_majors(DeviceTypes.BLOCK, 'sd')
[8, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135]
Package: pyprocess
Package to create a single unique process based on changing its name using setproctitle.Installation using easy_install: $ sudo easy_install pyprocessusing pip: $ sudo pip install pyprocessfrom source: $ python setup.py install.(or for develop): $ python setup.py develop.Usage:from pyprocess.setProcess import setSingleProcesssetSingleProcess(“somename”)If all was ok, setSingleProcess will return True.license:http://www.opensource.org/licenses/bsd-license.php
Package: pyProcessAutom
Data Preprocessing Library - Aryan SakhalaThis library provides a set of functions for preprocessing data in pandas DataFrames.Installation
You can install this package using pip:pip install pyProcessAutomUsageTo use this library, simply import the DataPreprocessor class from the data_preprocess module and instantiate it with a pandas DataFrame. You can then call various methods of the DataPreprocessor class to preprocess the data.Here's an example of how to use this library:import pandas as pd
from auto_preprocess.data_preprocess import DataPreprocessor

# Load data into a pandas DataFrame
df = pd.read_csv("my_data.csv")

# Preprocess the data using the DataPreprocessor class
preprocessor = DataPreprocessor(df)
preprocessor.remove_outliers()
preprocessor.scale(scaler_type='standard')
preprocessor.label_encode()
preprocessor.impute(method='mean')
preprocessor.drop()
preprocessed_df = preprocessor.dfUse the preprocessed data as neededFunctions
This library provides the following functions for preprocessing data:remove_outliers(): Removes outliers from all numeric columns in the DataFrame.scale(scaler_type): Scales all numeric columns in the DataFrame using either a standard scaler or a min-max scaler. [Arguments = 'standard','minmax']label_encode(): Encodes all columns with binary categories using label encoding.impute(method): Fills all columns  with either the mean, median, or mode, as specified by the user.drop(): Drops all columns with more than 30% NaN values from the DataFrame.
LicenseThis project is licensed under the MIT License - see the LICENSE.txt file for details.
Package: py-process-hooker
原理讲解怎么写一个32位任意地址的Hookdetour的编译和封装keystone和beaengine的编译封装32位和64位hook框架功能将注入Python注入到任意进程后，实现hook和内部函数调用安装pip install py-process-hooker==0.1.2使用以微信进程为例, 使用Python运行以下代码就会监听并执行当前目录下的py文件。具体看WeChat-PyRobotfrompy_process_hookerimportinject_python_and_monitor_dirif__name__=="__main__":process_name="WeChat.exe"open_console=Trueinject_python_and_monitor_dir(process_name,__file__,open_console=open_console)案例在windows11上编译python将python注入到其他进程并运行注入Python并使用ctypes主动调用进程内的函数和读取内存结构体调用汇编引擎实战发送文本和图片消息(支持32位和64位微信)允许Python加载运行py脚本且支持热加载利用汇编和反汇编引擎写一个x86任意地址hook，实战Hook微信日志封装Detour为dll，用于Python中x64函数 hook，实战Hook微信日志实战32位和64位接收消息和消息防撤回实战读取内存链表结构体(好友列表)做一个僵尸粉检测工具根据bug反馈和建议进行细节上的优化其他功能看心情加