Saravanan666/pypi-org huggingface dataset:
Package: phk-logger
PHK-LoggerAn uncomplicated way to use logger inside python applicationsCreated at: 01/05/2020Updated at:Author: Ben Mz (bmz)Maintainer: Ben Mz (bmz)Client: ProHacktive (https://prohacktive.io)InstallThe easy way is by using pippipinstallphk-loggerThe harder way is from sourcesgitclonehttps://github.com/proh4cktive/phk-logger.gitcdphk-logger
pythoninstallsetup.pyUsagePHK-Logger is a lib so you just have to import it when needed#!/usr/bin/env python# -*- coding: utf-8 -*-fromphk_loggerimportPHKLoggerasLoggerThen in your code you can instantiate it directlylogger=Logger(name='mytest',cli=True)And use it when neededlogger.info('This is an info message')# Will not be printed as default level is Warninglogger.write('A blue warning',level='warning',color='blue')OptionsPHK-Logger is configred by default to output log event to your SysLog sub-system (Only supports Linux/MacOS). Some additional options can be set in order to change this behaviour.nameSet a specific name to your logger stream, by default will use the__name__var.levelSet the log level, must be a level from logging packagefilenameIf set phk-logger will output events to a specific filename usingTimedRotatingFileHandlerconfigured with a file rotating every midnight, and 3 backup filesbackupOnly used iffilenameis configured, specifiy the number of backup to keepwhenOnly used iffilenameis configured, specify when to execute the file rotationcliIf set to True this will also output log event to command line interface (CLI). Only useful for debugging app.patternDefine the log pattern to use for event output. Default is%(name)s %(asctime)s %(levelname)-8s %(message)sMethodsSeveral methods can be used to generate event logs, they all support the same options (only usefuls when usingcliflag):msg: the message to outputcolor: override the default colorlight: override the light modedebug(msg, color='blue', light=True) output event with prefix:[*]info(msg, color='green', light=False) output event with prefix:[+]warning(msg, color='yellow', light=False) output event with prefix:[-]error(msg, color='red', light=False) output event with prefix:[!]critical(msg, color='red', light=True) output event with prefix:[!]An additional method is accessible which support a level parameterwrite(message, level=None, color=None, light=None)ColorsMultiple colors are supported (case insensitive)BLACKBLUEGREENCYANREDPURPLEYELLOWWHITEno-color (default)LevelsMultiple levels are supported (case insensitive)DEBUGINFOINFOSWARNINGERRORCRITICALTestsRun tests easily using pytestpytest-vvTODODoc
Package: phlab
Package for calculating phonon contribution in RIXSThis package aims to create a convenient set of tools for fitting experimental data and obtaining electron-phonon coupling values from phonon contribution in resonant inelastic X-ray scattering cross-section.It currently includes:Model for 1D harmonic oscillator interacting with a single electronic level.Model for 2D harmonic oscillator (two modes active).Model for 1D harmonic oscillator, distorted and displaced in the excited state (excited-state potential energy surface (PES), differs from the ground state one).InstallationIt is a python based package and to install it you can simply run in terminal:$pip install phlabDownload examples folder from this page and use it as a template for your projects. You may want to use Jupyter Notebooks, which comes with the examples. If you don't haveJupyterinstall it  viapipas well:$pip install jupyterlab
Package: phlearn
# phlearn
Package for modelling pseudo-Hamiltonian systems with neural networks as described in [(Eidnes et al., 2022)](https://arxiv.org/pdf/2206.02660.pdf) for ODEs and [(Eidnes and Lye, 2023)](https://arxiv.org/pdf/2304.14374.pdf) for PDEs.[Documentation available here](https://pseudo-Hamiltonian-neural-networks.readthedocs.io/en/latest/)phlearnphsystemsphnnsutilsphsystems implements classes and functionality for simulating pseudo-Hamiltonian systems.
phnns implements classes and functionality for learning and inference with pseudo-Hamiltonian neural networks.
Package: phlib
This is a simple library that scrapes PornHub for content, and provides
a simple, elegant API for interacting with the website.Only Python 3 is supported.Example Usage>>> from phlib import PornHub
>>> ph = PornHub()

>>> ph.categories
...

>>> ph['example category']
<Category title='example category'>

>>> cat = _
>>> cat.videos(max=25)
...

>>> ph.search('some search term')
...Videos have adownload()method, which will download the
video to your current directory.A CLI utility is provided,ph:Ph — empowering porn users everywhere.

Usage:
  ph <search>... [--max=<n>] [--meta] [--download]
  ph (-h | --help)
  ph --version

Options:
  -h --help     Show this screen.
  --version     Show version.
  --max=<n>     Maximum number of videos to list [default: 25].
  --meta        Display video meta-data.
  --list        List categories.
  --download    Downloads videos.Enjoy!
Package: phloemfinder
phloemfinderFind plant metabolites related to whitefly pest resistanceInstallation$pipinstallphloemfinderUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensephloemfinderwas created by Lissy-Anne Denkers and Marc Galland. It is licensed under the terms of the Apache License 2.0 license.Creditsphloemfinderwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.Useful readingAutosklearn talksNumpy docstring examples
Package: phlorest
phlorestAcldfbenchplugin to curate language phylogenies.InstallpipinstallphlorestUsageBootstrapping aphlorest-curated datasetphlorestprovides acldfbenchdataset template to create the skeleton of files and directories for aphlorest-curated dataset, to be run withcldfbench new.Runningcldfbenchnew--templatephlorestwill create a dataset skeleton looking as follows$treetesttree/
testtree/
├──cldf
│└──README.md
├──cldfbench_testtree.py
├──etc
│├──characters.csv
│└──taxa.csv
├──metadata.json
├──raw
│└──README.md
├──setup.cfg
├──setup.py
└──test.pyImplementing CLDF creationImplementing CLDF creation means - as for any othercldfbench-curated dataset - filling in thecmd_makecldfmethod of theDatasetsubclass incldfbench_<id>.py.The CLDF writer which can be accessed asargs.writerwithincmd_makecldfis an instance ofphlorest.CLDFWriter, which has convenience methods to add summary- or posterior trees to the CLDF
dataset. At least a summary is needed to make a dataset valid. Adding one looks as followsargs.writer.add_summary(self.raw_dir.read_tree(...),self.metadata,args.log)Running CLDF creationWithcmd_makecldfimplemented, CLDF creation can be triggered runningcldfbenchmakecldfcldfbench_<id>.pyThe resulting CLDF dataset can be validated runningpytestRelease workflowcldfbenchmakecldf--glottolog-versionv4.8--with-cldfreadmecldfbench_<id>.py
pytest
cldfbenchzenodo--communitiesphlorestcldfbench_<id>.py
cldfbenchreadmecldfbench_<id>.py
phlorestcheck--with-Rcldfbench_<id>.py
gitcommit-a-m"release vX.Y"gitpushorigin
phlorestreleasecldfbench_<id>.pyvX.YDependenciesTherun_treeannotatormethod ofDatasetrequires thetreeannotatorcommand from BEAST to be
installed. For details on how to installtreeannotator(andBEAST), seehttps://beast.community/index.html
Package: phm-diagnosis
phm-diagnosis介绍故障诊断使用上海九章云极公司的开源工具包-ylearn，实现故障诊断任务
ylearn主要依托，华为诺亚的gCastle推理包，torch，networkx完成以上任务，
在传参数时，尽可能使用**kwargs，如有不便于理解之处，可以直接阅读ylearn源码及注释。包括:基于数据,生成故障树[x][x][x][x]软件架构软件架构说明|─ phm_diagnosis
   ├── causal
   │   ├── api.py
   │   ├── __init__.py
   ├── __init__.py
   ├── phm_dataio
   │   ├── __init__.py
   │   ├── base.py
   │   ├── hbase_client.py
   │   ├── redis_client.py
   │   └── utils.py
   ├── phm_feature
       ├── __init__.py安装教程使用pip进行安装pip install phm-feature使用说明获得振动信号的特征值import phm_feature
from phm_feature import *
enable_parallel(processnum=None) # 开启多线程模式
disable_parallel() # 开启单线程模式
feature_t(data) # 获取时间域特征
# feature_f # 获取频率域特征
fft(data, 50) # 快速离散傅里叶变换
power(data, 50) # 功率谱
ifft(data, 50) # 快速离散逆傅里叶变换
cepstrum(data, 50) # 倒谱
envelope(data) # 包络谱
window(data, 'hamming') # 加窗-汉明窗
divide(data, 50, 25) # 分帧参与贡献2022-07-04 v0.0.1pypi上传初版本
pypi上传phm-feature初版本2022-07-04 v0.0.2新增多线程模式特技使用 Readme_XXX.md 来支持不同的语言，例如 Readme_en.md, Readme_zh.mdGitee 官方博客blog.gitee.com你可以https://gitee.com/explore这个地址来了解 Gitee 上的优秀开源项目GVP全称是 Gitee 最有价值开源项目，是综合评定出的优秀开源项目Gitee 官方提供的使用手册https://gitee.com/helpGitee 封面人物是一档用来展示 Gitee 会员风采的栏目https://gitee.com/gitee-stars/
Package: phn
phnDeveloper GuideSetup# create conda environment$mambaenvcreate-fenv.yml# update conda environment$mambaenvupdate-nphn--fileenv.ymlInstallpipinstall-e.# install from pypipipinstallphnnbdev# activate conda environment$condaactivatephn# make sure the phn package is installed in development mode$pipinstall-e.# make changes under nbs/ directory# ...# compile to have changes apply to the phn package$nbdev_preparePublishing# publish to pypi$nbdev_pypi# publish to conda$nbdev_conda--build_args'-c conda-forge'$nbdev_conda--mambabuild--build_args'-c conda-forge -c dsm-72'UsageInstallationInstall latest from the GitHubrepository:$pipinstallgit+https://github.com/dsm-72/phn.gitor fromconda$condainstall-cdsm-72phnor frompypi$pipinstallphnDocumentationDocumentation can be found hosted on GitHubrepositorypages. Additionally you can find
package manager specific guidelines oncondaandpypirespectively.
Package: pho
pho is a library built on lxml, and implements the [Beautiful Soup](http://www.crummy.com/software/BeautifulSoup/) apis. It is meant to be a drop in replacement for BS.InstallationTo install requests, simply:$ pip install phoPho tries to pip install lxml, and for lxml you will need the following packages installed in your system.Usageimport pho
import requestsPho(requests.get(’http://google.com’).content).find(‘title’).get_text()
Package: phobos
A Utility Library that assists in Geospatial Machine Learning by:supporting creation of a project with boilerplate code for model trainingexporting annotations fromEuropapopulating template project with configurable components for modelfetching samples from dataset shards available atAIStoreorchestrating model training and validationdeploying project toArchefor efficient training in a node clusterFlowFeaturesPolyaxon auto-param captureConfiguration enforcement and management for translation into Dione environmentPrecomposed loss functions and metricsGet annotations from EuropaTODOETL datasets via CLI on AIStoreMulti Input and Multi Output modelsStatic analysis codeDataset abstractionStandard dataset loadersPretrained modelsBuild Detailspackages are managed using poetrypackages poetry maintains pyproject.tomlPRs and commits todevelopbranch trigger github actionsTests>>> make install
>>> make test-lightA GPU machine is requried for test-heavy>>> make install
>>> make test-heavyInstallation`pip install phobos`UsageGet all the annotation tasks available in Europa`phobos get--all--email<email>--passwd<password>`Download one particular annotation task from Europa`phobos get--task<task ID>--path<directory to save anntoations>--email<email>--passwd<password>`Create a project boilerplate code`phobos init--project_name<project name>--project_description<project description>`Run an experiment`phobos run`Run associated tensorboard`phobos tensorboard--uuid<project id>`LicenseGPLv3DocumentationView documentationhereImageUse gcr.io/granular-ai/phobos:latest
Package: phoebusgen
Python Module to Generate Phoebus Control ScreensPhoebus is the next generation of Control System Studio, a graphical platform for EPICS control systems.https://github.com/ControlSystemStudio/phoebusThis module aims to provide a way to generate Phoebus xml through Python. See exampleshere.API docs here:https://als-epics.github.io/phoebusgenSuggestions, comments, and pull requests are welcome.RequirementsPython >= 3.5InstallPip Package:phoebusgenpipinstallphoebusgenIntroPhoebus widgets and a Phoebus screen are all Python objects. Widgets can be added to a screen or even to other widgets (for things like Group or Tab widgets).>>>importphoebusgen>>>text_update_widget=phoebusgen.widget.TextUpdate('test widget','TEST:PV',10,20,20,50)>>>text_update_widget.predefined_foreground_color(phoebusgen.colors.OK)>>>text_update_widget.font_style_bold()>>>print(text_update_widget)<?xml version="1.0" ?><widget type="textupdate" version="2.0.0"><name>test widget</name><x>10</x><y>20</y><width>20</width><height>50</height><pv_name>TEST:PV</pv_name><foreground_color><color name="OK" red="0" green="255" blue="0" alpha="255"/></foreground_color><font><font family="Liberation Sans" size="14" style="BOLD"/></font></widget>Modulesphoebusgen.widgetPython API to directly create Phoebus widgets. All standard Phoebus widgets are available, but some (3) are not fully feature complete.Widgets DocsIncomplete WidgetsImageStrip ChartX/Y PlotExampletext_update_xml = phoebusgen.widget.TextUpdate(widget_name, pv_name, x, y, width, height)phoebusgen.screenPython object to represent a Phoebus screen. Widgets can be added to the screen object and the screen object can be written to a .bob file to be opened in Phoebus.Screen DocsExample>>>importphoebusgen.screen>>>importphoebusgen.widget>>>my_screen=phoebusgen.screen.Screen("my screen")>>>print(my_screen)<?xml version="1.0" ?><display version="2.0.0"><name>my screen</name></display>>>>my_widget=phoebusgen.widget.TextUpdate("test","test:PV",10,10,10,10)>>>my_screen.add_widget(my_widget)>>>print(my_screen)<?xml version="1.0" ?><display version="2.0.0"><name>my screen</name><widget type="textupdate" version="2.0.0"><name>test</name><x>10</x><y>10</y><width>10</width><height>10</height><pv_name>test:PV</pv_name></widget></display>Site specific color and font definitionsPlace a custon color.def or font.def in ~/.phoebusgen/ to force phoebusgen.colors or phoebusgen.fonts to reflect your site's custom definitions.my_widget.predefined_font(phoebusgen.fonts.Header1)my_widget.predefined_color(phoebusgen.colors.OK)
Package: phoenixc2
PhoenixC2An Open-Source C2-Framework written in pure Python3.DisclaimerThis project is still indevelopmentandnotready for professional use.
This framework is intended for educational and research purposes only. The author and its affiliates do not endorse or condone any illegal or malicious activity conducted with this framework. Users of this framework are solely responsible for ensuring that their use of this framework is in compliance with all applicable laws and regulations.FeaturesModern Web-InterfaceBuilt for Teams and Organizations (Multi-User)Customizable (Plugins, Modules, Kits)Easy to useEasy to extendSupports different languages (Python, Go, ...)Planned FeaturesFinished Web-InterfaceCLI-InterfaceMulti-Language LoadersMore standard modules/kits/pluginsBetter documentationMore testsInstallationInstallation from source.RequirementsPython3.11 =<Go 1.15 =<Command Linegitclonehttps://github.com/screamz2k/PhoenixC2.gitcdPhoenixC2
python3-mpipinstallpoetry
poetryinstallUsageLocalStart the serverpoetryrunphserverThe Web-Interface is available athttp://localhost:8080by default.Start the clientThe client isnotyet available.Docker# serverdockerrun--networkhostscreamz2k/phoenixc2phserverDocumentationThe documentation is availablehereContributingContributions are welcome! Please read thecontribution guidelinesfirst.LICENSEView licensehere
Package: phoenix-datasets
PHOENIX Datasets 🐦IntroductionPHOENIX-2014andPHOENIX-2014-Tare popular large scale German sign language datasets developed by Human Language Technology & Pattern Recognition Group from RWTH Aachen University, Germany. This package provides a PyTorch dataset wrapper for those two datasets to make the building of PyTorch model on these two datasets easier.Installationpipinstallgit+https://github.com/enhuiz/phoenix-datasetsExample Usagefromphoenix_datasetsimportPhoenixVideoTextDatasetfromtorch.utils.dataimportDataLoaderdtrain=PhoenixVideoTextDataset(# your path to this folder, download it from official website first.root="data/phoenix-2014-multisigner",split="train",p_drop=0.5,random_drop=True,)vocab=dtrain.vocabprint("Vocab",vocab)dl=DataLoader(dtrain,collate_fn=dtrain.collate_fn)forbatchindl:video=batch["video"]text=batch["text"]# Do per-frame augmentation (e.g. normalization, cropping) here if needed.# kornia will be a good tool for this# video = augment(video)assertlen(video)==len(text)print(len(video))print(video[0].shape)print(text[0].shape)breakSupported FeaturesLoad the automatic alignments for PHOENIX-2014Randomly/evenly frame dropping augmentationTODOsImplement Corpus for PHOENIX-2014-TEvaluation Wrappers
Package: phoenix-letter
Phoenix LetterBring your messages back fromDead Letter Queuewith this command line script that helps you moving messages from DLQ back to the main queue for reprocessingSQSqueues. It also can be used to move messages between queues in SQS.InstallManuallyMac/Linux:python3 setup.py installWindows:py setup.py installPyPipip install phoenix_letterUsageAfter installation you will have a command with the following params:$phoenix_letter--help
usage:phoenix_letter[-h]--srcSOURCE_QUEUE--dstDESTINATION_QUEUE[--aws-keys]--regionREGION[--empty-receiveEMPTY_RECEIVE][--maxN][--max-per-requestN]optionalarguments:-h,--helpshowthishelpmessageandexit--srcSOURCE_QUEUESourceSQSQueueName--dstDESTINATION_QUEUEDestinationSQSQueueName--aws-keysFlagthatindicatesyouwanttoentercustomAWSkeys.--regionREGIONAWSRegion--empty-receiveEMPTY_RECEIVEMaxnumberofemptyreceivesbeforegivingup--maxNMaxnumberofmessagestoprocessfromthesourcequeue.--max-per-requestNMaxnumberofmessagestoreceivedfromthesourcequeueperrequest(thiswillbepassintheMaxNumberOfMessagesparam).Default:10(AWSAPImaxlimit)--fifoFlagthatindicatesyouwanttointeractwithaFIFOqueue.--group-idMESSAGE_GROUP_IDValuefortheMessageGroupId(usedinFIFOqueues).Requiredif'--fifo'argumentispassed.Default:NULL.--src: Source Queue Name--dst: Destination Queue Name--aws-keys:[OPTIONAL]The CLI will prompt you to enter the AWS keys securely. Default: Fallback to Boto, more informationhere.--region: AWS Region.--empty-receive:[OPTIONAL][default value=10] Number of empty receives before the script gives up trying to get message from queue.*--empty-receive:[OPTIONAL][default value=10] Number of empty receives before the script gives up trying to get message from queue.*--max:[OPTIONAL][default value=0] Number of messages to process from the source queue.0means everything*--max-per-request:[OPTIONAL][default value=10] Max number of messages to received from the source queue per request (this will be pass in theMaxNumberOfMessages param). Default: 10 (AWS API max limit)--fifo:[OPTIONAL][default value=False] Argument that indicates that it will connect to a FIFO queue--group-id:[OPTIONAL][default value=None] If you pass--fifothis will be a required argument, otherwise, it will be ignored.* Sometimes the SQS returns false empty receives, where there is messages on queue but for some reason AWS decided not
return anything on that requests. To understand morehere a link from AWS docs.
Package: phoenixpegasus
PEGASUS: PHOENIX EUV Grid and Stellar UV SpectraClick here to access the website!Welcome to the PEGASUS webtool, an easy way to gain access to generalized EUV spectra.EUV BackgroundThe ImportanceExtreme ultraviolet (EUV) radiation from stars affects planetary atmospheres and can lead to water loss and atmospheric escape—both very important factors in determining habitability.The ProblemWe face an issue today in which we are unable to observe and measure EUV wavelengths (124 - 10 nm). Earth's atmosphere absorbs EUV radiation, making it difficult to observe from our planet's surface. There are currently no missions or observatories beyond our planet that have the tools to observe these wavelengths either. Even if we did have the tools in space, interstellar hydrogen and helium easily absorb EUV radiation, once again making it difficult to observe.The SolutionWe can build synthetic models with atmospheric code—in this case, the PHOENIX code—to predict the EUV radiation coming from a star. Instead of building a painstakingly long list of simulated atmospheres for specific target stars, we built a generalized grid of stellar subtypes. Each subtype has a unique combination of stellar effective temperature, surface gravity, and mass, shown in the image below.Each subtype has its own subgrid of 72 data points, each with unique values of FUV, NUV, and EUV flux densities in ergs/cm2/s/Å.The Webtoolphoenixpegasusgrid.comworks in a few steps.First, the user searches by a star name or a position (which hopefully points towards a stellar object).A search is run on the star using Astroquery's Nasa Exoplanet Archive, MAST, and SIMBAD packages. The user is returned data from their star including:Effective temperatureSurface GravityMassDistanceRadiusGALEX NUV Flux Density & NUV ErrorGALEX FUV Flux Density & FUV ErrorThe user can choose to submit this data or input their own. This data is used to match the star to a model in the PEGASUS grid. First, a stellar subtype match is found using stellar parameters (temp, gravity, & mass). Then the stellar subtype's subgrid is searched and a match in found using the GALEX flux densities.Each matching model's FITS file (which includes wavelength and flux density of the model's EUV spectrum) is pulled and an interactive graph of wavelength vs. flux density is displayed to the user. The user can also download the FITS file for their own use.AcknowledgmentsWe wish to thank and recognize the following for their contribution to this projectAffiliations:University of Maryland, Baltimore CountyNASA Goddard Space Flight CenterUniversity of Arizona, Lunar and Planetary LabHigh Performance Computing Centers:NASA Center for Climate SimulationUniversity of Arizona HPCUniversity of Arizona PACMANArchives:NASA Exoplanet ArchiveMASTGALEXAnd I wish to thank my mentor, the lead in the PEGASUS project, Dr. Sarah Peacock.ContactsIf there are any questions regarding access, use, errors, or more, please email me at maliabarker[at]icloud.com
Package: phoenixSM4
phoenixSM4: a tool to perform differential fault analysis attacks (DFA) against SM4Currently phoenixSM4 contains the following combined attacks:Simple DFA at round 32 as explained in section 4.3 ofhttps://eprint.iacr.org/2010/063.DFA at round 31 to recover 4 round key bytes. Reference:https://ieeexplore.ieee.org/document/4402669Automatically rewinds a round when a full round key is found.InstallationThere is no dependencies, it requires only Python 3.python3 -m pip install phoenixSM4UsageIt takes a file of recorded outputs, optionally preceded by inputs (which will be ignored).
First record must be with the correct output, to be used as reference.#!/usr/bin/env pythonimportphoenixSM4withopen('tracefile','wb')ast:t.write("""09325c4853832dcb9337a5984f671b9ac8141f5697ac1e7021f567e84f671b92dcfa486ad93d750d4950c2254f671b1a05f91951f692aee2bca07947d3e1aeecab3854a661620285448b8ccd0fda1609""".encode('utf8'))phoenixSM4.crack_file('tracefile')Round key 32 found:
12A02491
Round key 31 found:
E572CF01
Round key 30 found:
96342962
Round key 29 found:
54368D42
[2435096594, 30372581, 1646867606, 1116550740]
Package: phoenix-trade
phoenixpyInstallationpipinstallphoenix-tradeUsageHere is an example of how to get the L2 book for the SOL/USDC market.fromphoenix.marketimportMarketfromphoenix.clientimportPhoenixClientimportasynciofromsolders.pubkeyimportPubkeyasyncdefmain():client=PhoenixClient()solusdc_market_pubkey=Pubkey.from_string("4DoNfFBfF7UokCC2FQzriy7yHK6DY6NVdYpuekQ5pRgg")print(awaitclient.get_l2_book(solusdc_market_pubkey))awaitclient.close()asyncio.run(main())ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.