Saravanan666/pypi-org huggingface dataset:
Package: phospho
phospho Python ClientPhospho is a platform to help you monitor LLM apps.With phospho, monitor every user interaction with your LLM app to identify issues and improve performance. Understand how users use your app and which versions of your product are the most successful.Read the docs atdocs.phospho.ai.Warning: This project is still under active development!Installation of the phospho clientYou need Python>=3.8pipinstall--upgradephosphoQuickstartCreate an account onphospho. Create an API key and note down the project id. Set them as environment variables:exportPHOSPHO_API_KEY="your-api-key"exportPHOSPHO_PROJECT_ID="project-id"In the code of your LLM app, log interactions with your agent usingphospho.log().importphosphophospho.init()# This is how you log interactions to phospho as stringsphospho.log(input="The user input",output="Your LLM app output")You can also directly pass OpenAI API query and responses (or any object with same format) to phospho :importphosphoimportopenaiphospho.init()openai_client=openai.OpenAI()# This is your agent codequery={"messages":[{"role":"user","content":"The user input"}],"model":"gpt-3.5-turbo",}response=openai_client.chat.completions.create(**query)# Log the interactions to phosphophospho.log(input=query,output=response)Monitor and visualize your agent on thephospho dashboard.UsageRead the docs atdocs.phospho.aifor more information.
Use your phospho dashboard to monitor your agent, score interactions and detect events.
Package: phosphodisco
PhosphoDisco (PhDc)A python package for finding co-regulated phospho sites from phosphoproteomics and proteomics data.DescriptionPhDc uses optimized clustering to find co-regulated phosphosite modules. Then, PhDc uses protein and phosphoprotein abundance data from kinases and phosphatases to nominate module regulators. It can also use sample annotation data to identify modules significantly correlated with clinical variables.See the docs athttps://github.com/ruggleslab/phosphodisco
Package: phoss
PHOSSPHOSS is an open source Python hyperparameter search simulation platform for
distributed testing of scheduling algorithms.Installing from PyPITo install PHOSS, run$pipinstallphossUsageTo use PHOSS, just declare an ExperimentGroup with the arguments you want and
callExperimentGroup.run(). This method returns a results object, which can
then be passed in as part of a list to theExperimentAnalysis.plot_results()method.We have included two example usage scripts that use PHOSS:test_experiments.pycreates and runs multipleExperimentGroups and plots
their results usingExperimentAnalysis.test_landscaper.pyspecifies a normal loss decay landscape and plots the
landscape generated by our simulator.Architecture OverviewIn this section, we provide an overview of the core modules of PHOSS.Loss LandscapingLandscaperhandles the logic of generating a synthetic loss landscape based on
a user-specified distribution and workload configuration. These parameters can
be specified a JSON file that is passed into theLandscaperconstructor.We have provided a couple of sample configuration files inphoss/simulator_configs.Experiment RunnerExperimentRunnerdefines and runs a single experiment, which is performing a
hyperparameter search with a given scheduler and environment configurations. It
calls theRayRunnerclass which in turn calls Ray Tune to perform distributed
hyperparameter tuning.PHOSS exposes theExperimentRunner.call_simulator()method, which accepts a
list of configuration parameters. This method returns the results of the
specified experiment as aCheckpointobject and writes it to a JSON file too.Experiment GroupWe define an experiment group to be 1 or more experiments varying only in their
random seed values. This class contains methods and the high-level logic for
conducting experiments across the entire group and combining their results.At every epoch, PHOSS runs each individual experiment withExperimentRunnerand averages over their results. PHOSS calculates the mean and cumulative best
arm regrets along with the average moving loss at each epoch.All user-defined configurations for anExperimentGroupare passed in as
constructor arguments. To run all experiments, call theExperimentGroup.run()method on the created object.ExperimentGroup.run()returns anExperimentGroupResultsobject.Experiment AnalysisExperimentAnalysisprovides a set of methods that visualize the graphs of
different experiment groups within the same plot, completing the end-to-end
flow of providing users with an easy way to compare multiple different
schedulers across multiple different configurations.ExperimentAnalysis.plot_results()accepts a list ofExperimentGroupResultsas input.LicenseApache License 2.0
Package: phosx
Kinase activity inference from phosphosproteomics data based on substrate sequence specificityCurrent version:v0.4.7OverviewPhosX infers differential kinase activities from phosphoproteomics data without requiring any prior knowledge database of kinase-phosphosite associations. PhosX assigns the detected phosphopeptides to potential upstream kinases based on experimentally determined substrate sequence specificities, and it tests the enrichment of a kinase's potential substrates in the extremes of a ranked list of phosphopeptides using a Kolmogorov-Smirnov-like statistic. Apvalue for this statistic is extracted empirically by random permutations of the phosphosite ranks.InstallationFromPyPIpip install phosxFrom source (requiresPoetry)poetry build
pip install dist/*.whlUsagephosx [-h] [-p PSSM] [-q PSSM_QUANTILES] [-n N_PERMUTATIONS] [-k N_TOP_KINASES] [-c N_PROC] [--plot-figures] [-o OUTPUT_DIR] [-v] seqrnkpositional arguments:
  seqrnk                Path to the seqrnk file.

options:
  -h, --help            show this help message and exit
  -p PSSM, --pssm PSSM  Path to the h5 file storing custom PSSMs; defaults to built-in PSSMs
  -q PSSM_QUANTILES, --pssm-quantiles PSSM_QUANTILES
                        Path to the h5 file storing custom PSSM score quantile distributions under the key 'pssm_scores'; defaults to built-in PSSM scores quantiles
  -n N_PERMUTATIONS, --n-permutations N_PERMUTATIONS
                        Number of random permutations; defaults to 10000
  -k N_TOP_KINASES, --n-top-kinases N_TOP_KINASES
                        Number of top-scoring kinases potentially associatiated to a given phosphosite; default: 4
  -m MIN_N_HITS, --min-n-hits MIN_N_HITS
                        Minimum number of phosphosites associated with a kinase for the kinase to be considered in the analysis; default: 8
  -c N_PROC, --n-proc N_PROC
                        Number of cores used for multithreading; default: 1
  --plot-figures        Save figures in pdf format; see also --output_dir
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        Output files directory; only relevant if used with --plot_figures; defaults to 'phosx_output/'
  -v, --version         Print package version and exitTODOFilter temporary warnings- when plotting figures fromphosx.pssm_enrichments.ks_statisticandphosx.pssm_enrichments.compute_ks_pvalues, many warnings will be thrown (UserWarning: The figure layout has changed to tight). This is a Matplotlib known issue:https://github.com/matplotlib/matplotlib/issues/26290Output table- report kinases that didn't pass the MIN_N_HITS filterAdd docstqdm- Add optional progress bar for permutationsNull KS- Remove null KS mean in the output tableImprove FDR- consider kinase PSSM correlations when estimatingqvalue, framework fromkoneret al.(2024)
Package: phot2lc
phot2lcA pure-Python interactive tool for extracting light curves from time series photometric data.Much of the inspiration for this program came from theWQED light curve extraction software, but phot2lc includes several new features and the ease of installation that comes with pure-Python programs.FeaturesComparison star selectionAperture size selectionPolynomial detrendingSigma clippingManual data point removalBarycentric time correctionsRequirements:Python 3.6 (or later)matplotlib 3.1.3 (or later)Astropy 4.0 (or later)
Package: photcalib
PhotCalibCalibration tool for Prisitine CaHK data. For more details see Martin, Starkenburg & Yuan 2023InstallationBefore installation, make sure you have pytorch or install essential dependencies :pip install -r requirements.txtInstallation from PyPIpip install photcalibManual installationdownload the repository and run the setuppython setup.py installGetting startedcd examplesTo Calibrate CaHK data using the run model trained by the main survey:
.. code:python calib_raw.py 17Am05 combined_catalogue_17Am05_sel.fits -D cpuSubstitute 17Am05 to the run you need and make sure the input data for calibration has the same format as that in the examples/data/.fitsD (str) is the device (default:cpu, gpu) to run pytorch. If gpu is chosen, it will use the first graphic card cuda:0 by default.To train calibration run model:
.. code:python calib_mod.py 17Am05Substitute 17Am05 to the run for calibration with the input file as examples/data/inputs_run.npySpecify the device and training parameters (the followings are the default settings)
.. code:python calib_mod.py 17Am05 -D cpu -lr 1e-6 -n 400 -mom 0.9 -thr 1e-2D (str) is the device (default:cpu, mps, gpu) to run pytorch.n (int) is the number of training epochs.lr (float) is the initial learning rate, which will decrease using scheduler (see details athttps://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.ReduceLROnPlateau).thr (float) is the threshold of the scheduler.mom (float) is the momentum of gradient descent.Citing this workcoming soon
Package: photfdtd
PhotFDTDPhot FDTD 目前包含了基础器件和光器件的实现和测试用例，使用了fdtd库已经实现了的 Finite-difference time-domain method （时域有限差分）算法。基础器件waveguide - 直波导arc - 圆弧sbend - s波导ysplitter - y分支光器件光器件由基础器件组成，光器件与光器件之间也可以连接。directional coupler - 方向耦合器mmi - 多模耦合干涉仪ring - 微环安装在命令行界面输入以下命令即可pipinstallphotfdtdDemofromphotfdtdimportSbendif__name__=="__main__":# 设置器件参数sbend=Sbend(xlength=40,ylength=60,zlength=1,x=10,y=10,z=1,direction=-1,width=10,refractive_index=1.7,name="sbend")# 设置 grid 参数sbend.set_grid(grid_xlength=80,grid_ylength=80,grid_zlength=1,grid_spacing=155e-9,total_time=200,pml_width=10)# 设置光源sbend.set_source()# 保存画好的图，设置保存位置，以及从哪一个轴俯视画图sbend.savefig(filepath="SbendZ.png",axis="z")运行结果各种光器件使用示例在tests目录下，可以看到各种光器件的使用示例，例如waveguide_test.py代表着波导的使用示例。开发者文档开发者文档提供了对于开发者的指导。
Package: photinia
![Photinia](logo.png)Photinia is a package used to build deep learning models.
It is lightweight and designed for scientists who wish to implement models quickly with
high flexibility.Photinia is not a totally independent deep learning framework.
It can be regarded as some kind of “shortcut” to Tensorflow.
We build this project, since we wish to have an easy, powerful and free toolset to
do research on deep learning.# DependenciesPython 3.6+TensorFlow 1.2.0+numpyscipypymongoopencv-python# InstallationThe package can be installed directly from PyPI repository:`bash pip3 install photinia `Or you can just download the package from Github and copy the photinia/photinia directory
to you project’s class path.
Package: photoage
photoageCalculate the age of a photo.Install$ pip3 install photoageUsageLibraryimportdatetimeimportphotoage# returns the number of days since epochphotoage.calculate_days('/path/to/photo.jpg')# returns the number of days since 2017/06/06photoage.calculate_days('/path/to/photo.jpg',birthday=datetime.datetime(2017,6,6))# same, except that the cutting point is 03:00:00 everyday instead of 00:00:00photoage.calculate_days('/path/to/photo.jpg',birthday=datetime.datetime(2017,6,6),offset=datetime.timedelta(hours=3))# same, except that it specifies the methods to find out the date time of the photo# by the way, the default value of the argument `methods` is `('exif',)`# the current supported methods are "exif" and "stat"photoage.calculate_days('/path/to/photo.jpg',birthday=datetime.datetime(2017,6,6),methods=('exif','stat'))# get the date time from a photo# it will return a datetime.datetime objectphotoage.get_date_time('/path/to/photo.jpg')# get the date time from a photo with specified methodsphotoage.get_date_time('/path/to/photo.jpg',methods=('exif','stat'))Command-line ToolBasic usages are:$ photoage /path/to/photo.jpg
/path/to/photo.jpg: 17325 days since 1970/01/01
$ photoage --birthday=2017/06/06 /path/to/photo.jpg
/path/to/photo.jpg: 2 days since 2017/06/06
$ photoage --birthday=2017/06/06 --offset=03:00:00 /path/to/photo.jpg
/path/to/photo.jpg: 2 days since 2017/06/06
$ photoage --birthday=2017/06/06 /path/to/photos/*.jpg
/path/to/photos/1.jpg: 2 days since 2017/06/06
/path/to/photos/2.jpg: 5 days since 2017/06/06
/path/to/photos/3.jpg: 0 days since 2017/06/06
/path/to/photos/4.jpg: 2 days since 2017/06/06
/path/to/photos/5.jpg: unknown date of photo token
$ photoage --birthday=2017/06/06 --summary /path/to/photos/*.jpg
total number of photo(s): 3 photos
first photo: /path/to/photos/3.jpg, 0 days since 2017/06/06
latest photo: /path/to/photos/2.jpg, 5 days since 2017/06/06
3 missing photo(s): 1, 3, 4 days since 2017/06/06
1 set(s) of duplicate photos:
- 2 days since 2017/06/06: /path/to/photos/1.jpg, /path/to/photos/4.jpg
1 photo(s) with unknown date:
- /path/to/photos/5.jpg
$ photoage --auto-detect-birthday /path/to/photos/*.jpg
/path/to/photos/1.jpg: 2 days since 2017/06/06
/path/to/photos/2.jpg: 5 days since 2017/06/06
/path/to/photos/3.jpg: 0 days since 2017/06/06
/path/to/photos/4.jpg: 2 days since 2017/06/06
/path/to/photos/5.jpg: unknown date of photo tokenOther options can be found by typing:$ photoage --help
Package: photoarchive
photoarchiveA simple tool to copy all unique photos to an archiveBackgroundI often backup phones and cameras, but to different places, using no consistent naming conventions, and more importantly, with no check for duplicates.
This tool takes such a backup location and copies all image files to a better structured archive, excluding duplicates and renaming unique files with duplicate file names.UsageSelect a place where you will put your archive.
Make sure that your source files will have unique paths (i.e. if you have a bunch of usb sticks that would all be called "D:", copy the files to a hard drive first).pip install photoarchive
cd <archivefolder>
python -mphotoarchive <sourcefolder>Alternativegit clone https://github.com/roseeng/photoarchive
cd photoarchive
python __main__.py <sourcefolder>Notes of interestUniquenessFiles to be copied are checked against the files in the existing archive using the following logic:Are the file names similar? If they do, go to next check, if not, copy.Do they have the exact same size? If they do, go to next check, if not, copy.Do they have the same MD5 checksum? If they do, mark as duplicate, if not, copy.All treated files are added to a list, so you can run the command against the exact same folder and only working on new files.
This is saved intreatedfiles.txt.
All copied files are added to a dictionary, with file size and hash value, to avoid recomputation.
This is saved infiledict.json.Name comparisonThe logic for "similar names" are as follows:If file suffix is different, the files are different. Else remove suffix from comparison.Take the first 5 charsFrom the remainder, remove all digitsFrom the result, remove underscores and parenthesis.The aim is to make files like "DSC4711.jpg" and "DSC4711(1).jpg" similar, but "47122.jpg" and "47123.jpg" different.
In a future version, this should be tweakable.
It is not the end of the world if it's not perfect though, the result is just more fstat() calls and hash calculations.Archive structureWhen copying a file, we try to get the original date from the EXIF information. If that does not succeed, we take the creation date of the file.That is then used to build the folder structure in the archive as: Bilder/YYYY/MM/DD.
The files keep the old name in that folder, optionally with "-n" added if there already is a file with the same name in the folder.
Package: photoarchiver
Photo ArchiverSimple photo archiver to organize file dumps into a date based tree directory structure using file metadata. File
metadata is used to try and identify the creation date of the file. We also use an EXIF reader to find the GPS
coordinates of where the file was created and add some location metadata to the filenames when possible.User installationThe easiest way to installphotoarchiveris using pip:pip install photoarchiverUsageTo see all options:photoarchiver -hTo run on a source and output directory:photoarchiver --source-directory-list <source_directory_1> <source_directory_2> --destination-directory <destination_directory>If you want to move rather than copy the files, use the flag--move-files.
Package: photobackup_bottle
#  The Python PhotoBackup server implementationThe Python3 implementation of PhotoBackup server, made with
[bottle](http://bottlepy.org/). It follows the
[official API](https://github.com/PhotoBackup/api/blob/master/api.raml), currently in [version 2](https://github.com/PhotoBackup/api/releases/tag/v2).## InstallationInstall through [PyPI](https://pypi.python.org/pypi):pip install photobackup_bottleThen run the installer, which asks for the directory to save your pictures to
and the server password:photobackup initThe script looks for the directory to be writable by the usualwww-datauser.
It fails gracefully if it is not, just warning you to make it work properly.
This step creates a.photobackupfile in the user’s home directory,
containing:BindAddress, the IP address (default is127.0.0.1) ;MediaRoot, the directory where the pictures are written in ;Password, the SHA-512 hashed password ;PasswordBcrypt, a Bcrypt-ed version of your SHA-512 hashed password ;Port, the port (default is8420).## UsageLaunch the server with:photobackup runBy default, it runs on host127.0.0.1, port8420and reloads automatically.## ProductionTo put in production, use [Nginx](http://nginx.org/) to bind a sever name tohttp://127.0.0.1:8420.
Package: photobook-full-listener
Listener Model for PhotoBook GameThis repo houses the official PyTorch implementation for the following paperListener Model for the PhotoBook Referential Game with CLIPScores as Implicit Reference ChainShih-Lun Wu, Yi-Hui Chou, and Liangze LiAnnual Meeting of the Association of Computational Linguistics (ACL) 2023[ArXiv]Installationcondacreate-nphotobookpython=3.8.10
condaactivatephotobook
pipinstall-rrequirements.txt

python
>>>importnltk
>>>nltk.download('punkt')Data PreprocessingRead../data/data_splits.jsonand save processed log data to../data/{split}_sections.picklecdpreprocess
pythondialogue_segmentation.pyGenerate CLIP scoreRead../data/{split}_sections.pickleand save data to../data/{split}_clean_sections.picklepythonprocess_section.pyExtract image features with SegformerSave features at../data/image_feats.pickle, the saved data is a dictionary (key: image path, value: hidden features)pythonprocess_image.pyTraining and InferenceEdit hyperparams inmodel/variables.pyTraining (with the best-performing configuration)python3train.pyconfig_paper/EXPERIMENT_JSONexp/EXPERIMENT_NAMETo reproduce logged ablations, use differentEXPERIMENT_JSONfor each run.Ours -vlscore_all.jsonVisAttn -vlscore_visattn.jsonCLIPScore -base_deberta.jsonCLIPScore + VisAttn -visattn.jsonDense learning signals -vlscore_all.json(changeDLStoFalseinmodel/variables.py)Tweak random seeds for optimal performance.Inferencepython3inference.pyexp/EXPERIMENT_NAMEBaseline Model Adapted fromTakmaz et al., 2020Model implementation is based onofficial PhotoBook repoTo run the Takmaz baselinecdtakmaz_baseline/
python3train.pyTo use reference chains extracted using CLIPScoresetREF_CHAIN_PATH = ref_chain_img_clipscore.pickleintakmaz_baseline/variables.pyNote that different random seeds might be needed intakmaz_baseline/variables.pyfor optimal results in different experiments.Utterance-based Reference Chain ExtractionThis part is largely inherited fromofficial PhotoBook repo, except that we add the option to use CLIPScore as the scoring metric.To reproduce the whole extraction and evaluation procedure described in(Takmaz et al., 2020), run these commands inchain-extraction.pythonsrc/extract_segments.pyout/all_segments.dict--stopwords--meteor--from_first_common--utterances_as_captions
pythonsrc/make_chains.pyout/all_segments.dictout/all_chains.json--scoref1
pythonsrc/make_gold_chains.pyout/gold_chains.json--from_first_common--first_reference_only
pythonsrc/make_dataset.pyout/all_chains.jsonout/gold_chains.jsonout/dataset

pythonsrc/extract_segments.pyout/eval_segments.dict--path_game_logsdata/logs/test_logs.dict--stopwords--meteor--from_first_common--utterances_as_captions
pythonsrc/eval_chains.pyout/eval_segments.dictTo alternatively use CLIPScore as part of the scoring in extraction, just
add the--clipscoreoption when runningextract_segments.pyabove.
Package: photobooth-app
Welcome to your brand-new photobooth-app! Written in Python 🐍, coming along with a modern Vue3 frontend.Installation-Documentation-PyPI package-3d printed box😍 Features📹 camera live preview with shortest delay as possible, permanent video live view in background🛫 optimized for speed, highly response UI🫶 several camera backends supported for high quality stills and livestream💡 WLED support signaling photo countdown and feedback to the user when the photo is actually taken🤝 Linux 🐧, Raspberry Pi 🍓 and Windows 🪟 platforms supported📷 Supported CamerasThe photobooth app's Python backend allows to use different camera types on Linux and Windows platforms:Raspberry Pi Camera Module 1/2/3 (with or without autofocus)Arducam cameras (with or without autofocus)DSLR camera viagphoto2, Linuxdigicamcontrol, WindowsWebcameras (via opencv2 or v4l)The app controls camera's autofocus, handles led signaling when a photo is taken and streams live video to photobooth.The reference photobooth box is made from 3d printed parts,see the 3d printed reference box over here.💅 ScreenshotsFind screenshots in the documentation🔧 InstallationSee separate installation instructions in the documentation.©️ LicenseThe software is licensed under the MIT license.🎉 DonationIf you like my work and like to keep me motivated you can sponsor me:
Package: photo-burst-detection
photo_burst_detectioninstallpipinstallphoto_burst_detectioninstall from sourcesgitclonehttps://github.com/batou9150/photo_burst_detection.gitcdphoto_burst_detection
python3setup.pyinstallrunRun with gunicorn (Unix)pip3installgunicornexportPHOTO_BURST_DETECTION_PATH=<startpath>exportLDAP_HOST=ad.mydomain.comexportLDAP_BASE_DN=dc=mydomain,dc=com

gunicorn-b0.0.0.0:8000photo_burst_detection:appRun with waitress (Windows)exportPHOTO_BURST_DETECTION_PATH=<startpath>exportLDAP_HOST=ad.mydomain.comexportLDAP_BASE_DN=dc=mydomain,dc=com

waitress-serve--listen=*:8000photo_burst_detection:appconfigurationvariabledescriptionPHOTO_BURST_DETECTION_CONFIGconfig file (optional)PHOTO_BURST_DETECTION_PATHstart pathSECRET_KEY(default value = 'secret')LDAP_HOSTLDAP_PORT(default value = '389')LDAP_BASE_DNLDAP_USER_DNLDAP_GROUP_DNLDAP_USER_RDN_ATTR(default value = 'uid')LDAP_USER_LOGIN_ATTR(default value = 'uid')LDAP_BIND_USER_DNLDAP_BIND_USER_PASSWORDLDAP_GROUP_OBJECT_FILTER(default value = '(objectclass=group)')