Saravanan666/pypi-org huggingface dataset:
Package: pmag-kds-py
These routines are written by Kurt Schwehr for variouspaleomagnetic processing and visualization jobs.  It is
completely SEPARATE from Lisa’s python routines.  It does
depend on pmag >= 1.9 by Lisa Tauxe, which is her fortran
packages that you can get fromhttp://sorcerer.ucsd.edu/WARNING: this code is just for my thesis.  Use at your own risk!
Please test and verify anything you might want to use on your own (and
then contribute those tests and documentation additions back to me).
I am sure there are errors in here.
Package: pmag-tilt
This code package contains functions to perform the analysis needed for continental marginal tilt and as supplementary material to Mirzaei et al. (2023). However, it can also be used for the following applications: converting unit vectors from XYZ to polar coordinates and vice versa, finding the angle between vectors (directions), APWP interpolation, and wherever the goal is to find the amount of tilt (or folding) by comparing paleomagnetic directions.For more details about each function please refer to description part of each function.
Package: pmakefile
pmakefileBackgroundMakefile is a fundamental tool when it comes to building software. As a simple way to organize code compilation,
it's been part of Unix world for over 40 years. However, it's not a perfect tool. Its cross-platform support is not native yet, and learning curves can be steep. This project aims to provide a practical alternative to Makefile subset for most common use cases.Software can be reproducible, protable, and maintainable, for regular users and developers, with a simple "P-makefile".UsageSee theexample/directory where we write a singlemakein Python usingpmakefileandzig ccto cross-compile the QuickJS project for Windows, Linux, and macOS (x86_64 and aarch64), which is a huge task and so far not achieved by any other known makefile written for QuickJS. Withpmakefile, writingmakepromises us excellent portability, static type checking, and simplicity, while depending on only a standard Python distribution.ThepmakefilePython module exports some useful functions, seebuiltin functionsThe pmakefile structure can be given as follows:frompmakefileimport*phony(['all','clean',...# phony targets])ROOT=Path(__file__).parent.relative_to(os.getcwd())@recipe('dep1','dep2')defmy_recipe():"""documentation for my_recipe"""# some python statementsThen you can use it in your favorite shell:pmkhelp# pmk all# pmk cleanUseful Helper Functionsget_os() -> 'windows' | 'linux' | 'macos'log(msg: str, level: 'ok' | 'error' | 'info' | 'debug' | 'warn' | 'normal' = 'normal')shell(command: str | list[str], *, env: dict | None = None, noprint: bool = False)get_deps(): get direct dependencies of current targetwith proft(title: str): ...: profile the execution time of the code block and report with the giventitle(when the environment variablePMAKEFILE_PROFis set)get_dlext() -> str: get platform-specific dynamic library file extensionLicenseMIT License is used for this project. SeeLICENSEfor more details.
Package: pmaker
pmakerpmaker is a toolkit for creating programming contests.Dependencies:(Or skip and it will be installed from pypi)` apt installpython3-setuptools{,-scm}python3-jinja2`Install the package:Clone the repo and then` ./setup.py install `You may also use “–user” option for non-privilged install.
Note that this way you will probably need to copy runnable file from ~/.local/bin to your PATH.Install the sandbox` git clonehttp://github.com/ioi/isolatemake [sudo] make install `For more information please refer to the isolate’s official documentationUser guide (short)Following commands are provided` pmaker tests                      # generates all the tests for the problem in current directory pmaker invoke <list of solutions> # invokes the specified solutions, use localhost:8128 to see the results pmaker invoke @all                # convenience macro pmakerview-tests# shows all the tests, in browser pmakerinvokation-list# to view previous invokations `
Package: pmap
# PMAP`pmap` is a multithreaded `map` functional operator that, differently from other implementations, _keeps the ordering_ of the input list.Usage examples:In [1]: from pmap import pmapIn [2]: pmap (lambda x:x*x, range(10))Out[2]: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
Package: pma-python
pma_python is a Python wrapper library for PMA.start (http://free.pathomation.com),
a universal viewer by Pathomation for whole slide imaging and microscopy.YOU NEED TO HAVE PMA.START (OR PMA.CORE) RUNNING IN ORDER TO USE THIS
LIBRARY. PMA_PYTHON IS NOT A STAND-ALONE LIBRARY FOR WSI.If you’re working withmicroscopy data and are you tired of having to use a different library for each vendor specific digital slide formatimage analysis software and are you looking for a way to have complete control over your algorithms (and not just be able to select those provided for you)novel evaluation methods for histology / pathology and do you just wish there was a way to now automatically evaluate it on 100s of slides (batch processing)and you’re doing all of this in Python, then PMA.start and
pma_python are for you!PMA.start can be downloaded free of charge fromhttp://free.pathomation.comWith pma_python, you can inspect and navigate any type of
microscopic imaging file format available. Whether you have
macroscopic observations, whole slide imaging data, or fluorescent
snapshot observations, we can bring it all into Python now.The following vendor formats are currently supported:TIFF (.tif, .tiff) with JPEG, JPEG2000, LZW, Deflate, Raw, RLEJPEG (.jpeg, .jpg)JPEG 2000 (.jp2)PNG (.png)Olympus VSI (.vsi) with lossless JPEG, JPEG, RawVentana / Roche BIF (.bif)Hamamatsu (.vms, .ndpi, .dcm) with JPEG, JPEG2000Huron Technologies (.tif)3DHistech (.mrxs) with JPEG, PNG, BMPAperio / Leica (.svs, .cws, .scn, .lif, DICOMDIR) with JPEG, JPEG2000Carl Zeiss (.zvi, .czi, .lsm) with Raw, PNG, JPEG, LZW, Deflate, JPEG2000Open Microscopy Environment OME-TIFF (.tf2, .tf8, .btf, .ome.tif)Nikon (.nd2, .tiff) with Deflate, JPEG, JPEG2000, LZW, Deflate, Raw, RLEPhilips (.tif) with JPEG, JPEG2000, LZW, Deflate, Raw, RLESakura (.svslide) with JPEG(sqlite2, sqlite3, mssql)Menarini (.ini) with RawMotic (.mds)Zoomify (.zif) with JPEG, JPEG2000, LZW, Deflate, Raw, RLESmartZoom     (.szi) with JPEG, BMPObjective Imaging / Glissano (.sws)Perkin Elmer (.qptiff)The most up to date list with supported file formats can be found athttp://free.pathomation.com/formats
Package: pmark
python benchmarking utilityRequirementsOS:macOS Maverics+ or Ubuntu 14.04+Python:v3.6.0+Tensorflow:v1.4.0+What is pmark?Pmark - “Python Benchmark” is a simple yet intutive process monitoring
tool, which can monitor, 1. CPU Usage 2. RAM Usage 3. GPU Usage
(Supports only NVidia for now)Architecture:ArchitectureA function with required arguments is sent to the utility.The function is sent as a target for a python Process, which shares
statistics using a BaseManager.Required Monitors (CPU/GPU/RAM) are attached to the current process
as threads.The attached monitors are given the main processpidwhich helps
us in extracting consumption of resources by the process, thereby
increasing the accuracy of monitoring process.Each of the monitors supports interval configuration which can be
overridden by benchmark interval.The threads for each monitor continues to run, untill main process is
completed, once done, all the threads, including the main process are
closed.
Package: pmarker
pmarker is a Python package for marking PDF files. It allows users to add notes and annotations to PDF documents, making it a useful tool for reviewing, commenting, and collaborating on PDF files.pmarker is built on top of the pymupdf package, which provides a range of PDF manipulation capabilities. pmarker is designed to be easy to use and integrate with existing workflows. It can be installed via pip and is compatible with Python 3.pmarker support both text and image marking based on the content of the notes, it provide a convenient way to mark up and annotate images in conjunction with notes and other textual content. The package provides four basic marker types: PAR, CTH, Claim, and Example, which can be used to mark different sections of a document.One of the major advantages of pmarker is its ability to automatically convert note content into the corresponding positions in a PDF file, without requiring the user to manually specify the exact location of the notes. To use pmarker, you simply need to provide the PDF file you want to mark and a file containing the note content in the required format. The package will then automatically generate a new PDF file with the notes and annotations added. This saves time and effort and makes the process of marking up a PDF file much more efficient and convenient.Overall, pmarker is a powerful and versatile tool for anyone who needs to mark up and annotate PDF documents, from researchers and academics to business professionals and students.
Package: pmast
Pattern Matcher for Python ASTThis tool is about finding patterns in AST structures. As such, it may
be useful for static analysis and linting.importpmastpm=pmast.PatternDispatch()@pm('FunctionDef.Return')defon_return(data,fd,ret):# Store return statement (an ast node) for each functiondata[fd.name]=retclassFoo(object):defx(self):return3defy(self,foo,bar):return4data=pm.dispatch(Foo)assertdata['x'].value.n==3assertdata['y'].value.n==4The intent here is to be a little bit like XPath for the Python AST module.
Package: pmatcher
(monadic) Precinct MatcherMatching election data to shapefiles is hard.
It is usually context-dependent and implemented on a project-by-project basis.
It also sometimes involves some manual labor.
This attempts to make life easier for everyone who has to deal with precinct matching.InstallpipinstallpmatcherBenchmarks (on real data)VEST releases its precincts with VTD codes and county FIPS codes.
To validate this approach, I ran the matcher on known, good data.Results (in % accuracy):Exact match 0.9444831591173054
Insensitive match 0.9444831591173054
Insensitive normalized match 0.9932636469221835
Aggressive insensitive normalized match 0.9983739837398374Implemented Methodsmatcher.default()Applies exact, insensitive, normalized, and weighted_manual in that order.
All batteries included!matcher.exact()Matches exact strings.matcher.insensitive()Matches strings (case-insensitive).matcher.insensitive_normalized()Matches strings with special characters removed (e.g.(),#,-).matcher.weighted_manual()Uses a weighted levenshtein algorithm.
First looks for token-distance, followed by token word distance for tiebreaking.Saving and loading progressmatcher.save_progress("progress.json")Saves progress/mapping to a json file.matcher.load_progress("progress.json")Loads progress/mapping from a json file.Example usagefrompmatcherimportPrecinctMatchermatcher=PrecinctMatcher(list_1,list_2)mapping=matcher.default()frompmatcherimportPrecinctMatchermatcher=PrecinctMatcher(list_1,list_2)matcher.exact()matcher.insensitive()matcher.insensitive_normalized()matcher.insensitive_normalized(aggressive=True)mapping=matcher.weighted_manual()
Package: pmath
Bringing the math tools of Python to the command-lineDoing math on the command-line is hard. Integer math can be done with BASH, but the only utility around for floating-point math isbc, and that can be confusing with itsscaleandprecision. What if you want the power of Python’s math, perhaps programmatically? Enter:pmath.ExamplesBasic input:$ pmath '3 + 4'
7
$ echo '3+4' | pmath
7
$ pmath <<< 3+4
7
$ pmath 'x=3;x+2'
5You can set the output format with a-fswitch:$ pmath -f .4f <<< pow(2000, 1/3)
12.5992
$ pmath -f .4f <<< sin(pi/2)
1.0000Enabling complex math operations is straightforward with-c:$ pmath -c <<< exp(1j*pi).real
-1.0
$ pmath -f.2f -c 'ang=3*pi/4; exp(1j*ang)'
-0.71+0.71jInstallationRunningpip install pmathwill install the command-line utility.
Package: pm-attacher
Прикрепление файлов к МКАБУтилита предназначена для поиска и прикрепления файлов к медицинским картам амбулаторных больных (МКАБ), основываясь на имени файла, в котором должен быть номер МКАБ.Установкаpipinstallpm-attacherНастройкаУправление параметрами утилиты производится либо через переменные окружения, либо через ключи запуска, причём приоритет имеют последние. Обязательные параметры обозначены значком :exclamation:Ключ запускаПеременнаяокруженияЗначение поумолчаниюОписание--file-type-code:exclamation:Код типа файла--file-type-name:exclamation:Наименование типа файла--file-info-nameПротокол осмотраНаименование файла--create-user-id1Идентификатор пользователя,прикрепившего файл--create-user-nameАдминистраторФИО пользователя,прикрепившего файл--prefixПрефикс имени файла--suffixСуффикс имени файла--recursiveРекурсивный поиск--dry-runТестовый запуск,изменения не сохраняются--mis-db-serverMIS_DB_SERVER:exclamation:Адрес сервера МИС--mis-db-portMIS_DB_PORT1433Порт сервера МИС--mis-db-nameMIS_DB_NAME:exclamation:Наименование базы данных--mis-db-usernameMIS_DB_USERNAMEsaИмя пользователя дляподключения к БД МИС--mis-db-passwordMIS_DB_PASSWORD:exclamation:Пароль пользователя дляподключения к БД МИС--mis-file-pathMIS_FILE_PATH:exclamation:Путь до хранилищаприкреплённых файлов МИС--log-pathPMA_LOG_PATHПуть для храненияжурнала приложенияКлючи--create-user-idи--create-user-nameдолжны соответствовать полямUserIDиFIOтаблицыx_User.Ключи--file-type-codeи--file-type-nameдолжны соответствовать полямCodeиNameтаблицыatf_FileType. Если совпадение по коду не будет найдено, то программа создаст тип прикрепляемого файла с указанными параметрами.Внимание!Поиск типа производится по полюCodeи используется
первое найденное вхождение.Ключи--recursiveи--dry-runявляются флагами и имне передаютсязначения.При использовании ключа--log-pathв указанной директории будет формироваться журналdebug.logс ротацией каждые 1 Мб и очисткой данных через 3 месяца.Получить справку по описанным выше параметрам из командной строки можно запустив утилиту с ключом--help:pm-attacher--helpЗапускПри запуске необходимо определить обязательные параметры (таблица выше) и указать путь, по которому будет производиться обработка файлов:pm-attacher[OPTIONS]WATCH_DIRДля получения информации о названии и версии утилиты необходимо выполнить команду с ключом--version:pm-attacher--version
Package: pmaxform3
pyxform is a Python library that makes writing XForms for ODK Collect and enketo
easy by converting XLS(X) spreadsheets into XForms. It is used as a library in a number of tools includingthe ODK online converterandOna.XLS(X) documents used as input must follow to theXLSForm standardand the resulting output follows theODK XFormsstandard.formhub.org uses the repo here:https://github.com/modilabs/pyxformpyxform is a major rewrite ofxls2xform.Running the latest release of pyxformFor those who want to convert forms at the command line, the latest official release of pyxform can be installed usingpip:pip install pyxformThexls2xformcommand can then be used:xls2xform path_to_XLSForm [output_path]pyxformcan be run with either Python 2 or Python 3. Continuous integration runs tests on both Python generations to ensure continued compatibility.Running pyxform from local sourceNote that you must uninstall any globally installedpyxforminstance in order to use local modules.
Please install java 8 or newer version.From the command line:python setup.py develop
python pyxform/xls2xform.py path_to_XLSForm [output_path]Consider using avirtualenvandvirtualenvwrapperto make dependency management easier and keep your global site-packages directory clean:pip install virtualenv
pip install virtualenvwrapper
mkvirtualenv local_pyxform                     # or whatever you want to name it
(local_pyxform)$ python setup.py develop       # install the local files
(local_pyxform)$ python pyxform/xls2xform.py --help
(local_pyxform)$ xls2xform --help              # same effect as previous line
(local_pyxform)$ which xls2xform.              # ~/.virtualenvs/local_pyxform/bin/xls2xformTo leave and return to the virtual environment:(local_pyxform)$ deactivate                    # leave the virtualenv
$ xls2xform --help
# -bash: xls2xform: command not found
$ workon local_pyxform                         # reactivate the virtualenv
(local_pyxform)$ which xls2xform               # & we can access the scripts once again
~/.virtualenvs/local_pyxform/bin/xls2xformInstalling pyxform from remote sourcepipcan install from any GitHub repository:pip install git+https://github.com/XLSForm/pyxform.git@master#egg=pyxformYou can then run xls2xform from the commandline:xls2xform path_to_XLSForm [output_path]TestingTo make sure the install worked out, you can do the following:pip install nose==1.0.0

cd your-virtual-env-dir/src/pyxform

nosetestsDocumentationTo check out the documentation for pyxform do the following:pip install Sphinx==1.0.7

cd your-virtual-env-dir/src/pyxform/docs

make htmlChange LogChangelog
Package: pmb
A sample project that exists as an aid to thePython Packaging User Guide’sTutorial on Packaging and Distributing
Projects.This projects does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.This is the README file for the project.The file should use UTF-8 encoding and be written usingreStructuredText. It
will be used to generate the project webpage on PyPI and will be displayed as
the project homepage on common code-hosting services, and should be written for
that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not
a good idea, although a simple “What’s New” section for the most recent version
may be appropriate.
Package: pmbec
pmbec (Peptide to MHC binding energy covariance matrices)Author: Jacob Doering-Powellgenerate pmbec matrices from peptide to mhc combinatorial binding assay data that can be used as scoring matrices in the training of peptide to MHC binding algorithms. The matrices can also be used to quantify how different experimental conditions contribute to overall binding from different residues.Requirements:Python 3.7+Installation:Download through pypipip install pmbecUsage:example where raw data file has alleles treated with 2ME. 2ME keeps peptides that have cysteines within them in a reduced form, therefore the filtering function consolidates the impact of 2ME on cysteine residues. This shows how experimental data can be captured in a PMBEC matrix, and the general flow of how the package should be used. Order of calling should be:get_raw_data()filter_raw_data()calculate_energy_contribution()covariance()cluster_matrix() - clusters the covariance matrix to see pockets of similar/dissimilar residuesfrom pmbec.pmbec_generator import pmbec_generator

pm = pmbec_generator(job_id='pmbec_matrix', threshold=.05)
raw_data = pm.get_raw_data("raw_data_file",
            'Residue',
            'Position',
            nrows=49,
            sep=',')
pm.filter_raw_data(raw_data,
                    consolidate=True,
                    consolidate_on='2ME',
                    positions={2,9},
                    residues_to_consolidate=set(['C']),
                    skip_alleles='2ME')
energy_contribution = pm.calculate_energy_contribution()
cov_matrix = pm.covariance()
clustered = pm.cluster_matrix(cov_matrix)
pm.write_excel(clustered)Input:The initial input starts with loading binding data from a combinatorial binding assay between peptides and different alleles of MHC molecules. The data can be in a comma, tab, or space seperated file, but it must be specified with the sep parameter. The function also assumes that only binding data comes after the position column in the file, so if your raw data file is ordered differently, it is recommended to order the columns as such : ['column 1' , column 2', ... 'Residue column', 'Position column', all alleles binding data].Output:calling covariance, and cluster_matrix, will return pandas dataframes. Any dataframe can be written with the cells colored according to the threshold set in construction as an excel file with the write_excel function.
Package: pmb-py
就是個簡單的 Pmb Restful Api Wrap需要二個環境變數AUTH_URL用來指定公司統一登入(ad)的 api 網址PMB_API_URL用來指定 pmb 服務的網址除錯專用可以追加設定 DEBUG 環境變數有設定 DEBUG 的話就可以用 PMB_API_URL_DEBUG 來指定 Pmb 服務的網址例DEBUG=True
PMB_API_URL_DEBUG=http://127.0.0.1:5000使用範例importpmb_pyaspmbfrompmb_pyimportlog_in,log_outlog_in(YOUR_USERNAME,YOUR_PASSWORD)# log_in(YOUR_USERNAME, YOUR_PASSWORD, mode='pmb')# mode 指定為 'pmb' 時會切換成 pmb 自己的登錄方式, 'ad' 為預設值quert_result=pmb.api.Projects.list()print(quert_result.result)# list 會回傳 QueryResult 物件project=pmb.api.Projects.get(id=100)print(project)# 未找到的話會引發 PmbError 例外log_out()# 記得登出目前未對權限部份做太多著墨，所以想用的同事，請記得問一下專用的登入帳號密碼不然可能會因為權限的問題使得功能無法操作查詢list()list() 接受以 keyword 引數的方式查詢，可以接受limit引數，預設為 1000，最大為 4000使用範例importpmb_pyaspmbfrompmb_pyimportlog_in,log_outq_result=pmb.api.GanttItem.list(project_id=1311)print(q_result.results)q_result=pmb.api.Blocks.list(project_id=1311,type_id=2)print(q_result.results)get()get() 固定接收 id 做為查詢依據，查無物件會引發異常QueryResult 物件屬性說明limit = limit本次查詢的數量限制next = next查詢的下一頁previous = previous查詢的上一頁results = results查詢的結果start = start查詢的啟始數total_count = total_count全部的數量query_params():
把查詢參數字典化此外還有一個 first() 函式方便取得第一個元素，取不到時回傳 None建立可接受所有可用欄位當做 keyword 建立物件，不要給 id例gantt_item=pmb_py.api.GanttItems.create(name='test',task_type=4,project_id=5,sg_task_id=15000,read_only=True,status='',)更新可接受所有可用欄位當做 keyword 更新物件，固定以 id 為第一位引數pmb_py.api.GanttItems.update(5,legend='test update')刪除固定以 id 為第一位引數, 回傳True或False,pmb_py.api.GanttItems.remove(5)Projectslist當給予member_id引數時其他引數將會無效，會回傳指定的member_id所有專案歷史更新紀錄V 0.4.3.0
增加對應 Project 的 total extra cost 欄位V 0.4.2.1
修正 cookie 的更名, 修正 headerV 0.4.2
修正對 pmb 2.6.0 之後的登入機制支援(只剩 pmb 自己的 login api 登錄)V 0.4.1
增加對 pmb 的新登入機制支援(ad 跟 pmb 自己的登錄)V 0.4.0
增加對 pmb session 支援v 0.3.4
增加對 gantt task api (api.anttTasks) 的支援v 0.3.3
增加欄位 (對應 pmb 0.2.0 版的 api)V 0.3.2
add Project new column "hour_type"V 0.3.1
add query_params method for QueryResultV 0.3.0
add blocks_between_date function
Package: pmccc
pmcccpython minecraft launcher library[
en_us
|zh_cn]importpmcccmain=pmccc.main("./.minecraft","Demo","0.1")player=pmccc.player("Dev")# main.use_url = "mcbbs"version="1.20.1"# version = "1.12.2"# version = "rd-132211"main.install_version(version,version)main.run(player,version)
Package: pm-cedp-qdp
IntroductionThis project implements the quantification of privacy leakage for differential privacy mechanisms in continuous event data publishing.Python packageThe implementation has been published as a standard Python package. Use the following command to install the corresponding Python package:pipinstallpm-cedp-qdpUsagefrompm_cedp_qdp.qdpimportQDPif__name__=='__main__':log_name="Sepsis Cases.xes"max_num_release=5state_window=200# A large number will consider the entire prefix/suffix of tracesstate_direction="backward"# Backward (prefix) or forward (suffix)event_percentage=0.5# The percentage of events included in the first releaserecursive=True# This will continue quantifying releases until there is no incomplete trace or reaching max_num_release. Otherwise, only one release is quantified.only_complete_traces=False# If one wants to only consider the complete traces for generating temporal correlations.epsilon=0.01# The privacy parameter of DP mechanismwindow_size=2# How many new events per trace are released at each publish.certain_release=True# If this is true, the number of new events per variant in each new release is equal to window_size, otherwise it is a random number range from 0 to window_sizeexplore_depth=window_size# The depth of exploring the transitions system.export_csv=log_name[:-4]+"_"+str(state_window)+"_"+state_direction+"_"+str(certain_release)+str(window_size)+".csv"qdp=QDP()release_index,BPL_list,FPL_list,TPL_list=qdp.apply(log_name,epsilon,export_csv,recursive=recursive,only_complete_traces=only_complete_traces,state_window=state_window,state_direction=state_direction,explore_depth=explore_depth,window_size=window_size,certain_release=certain_release,event_percentage=event_percentage,max_num_release=max_num_release)