Saravanan666/pypi-org huggingface dataset:
Package: recsources
Requirementspython3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
python3 -m pip install --upgrade setuptools wheelDownload repository:git clone https://github.com/johanneskruse/pypi_template.gitUpload:Inpyproject.tomlyou can set the name of the pacakageRun the following to upload:Packaging Python ProjectsGenerating distribution archivesStand inside the project, i.e.cd pypi_templateNext build the package:python3 -m buildThis command should output a lot of text and once completed should generate two files in the dist directory:dist/
├── sampleproject-0.0.1-py3-none-any.whl
└── sampleproject-0.0.1.tar.gzUploading the distribution archivestwine upload dist/*Go tohttps://pypi.org/to see the package!Inspirationsetup.py vs setup.cfg in Pythonsample git repo projectPackaging Python ProjectsTODO:Setup with pyproject.toml fileNote that if you want to install packages in editable mode (i.e. by running pip install -e .) you must have a valid setup.py file apart from setup.cfg and pyproject.toml. TRY TO RUN INSTEAD: pip install -e . -f .Acronym Generator (help generate the name)https://acronymify.com/
Package: recs-searcher
recs-searcher (Registry error correction system - Searcher)pip install recs-searcherСистема способна решить следующие задачи:Исправление реестровых ошибок пользовательского ввода при сравнении с базой данных;Поиск схожих текстовых записей на пользовательский текст по базе данных.Функциональные возможности:обучение моделей для создания эмбеддингов (например, TfIDF, FastText, SentenceTransformer) на собственных данных;быстрый поиск по базе данных (например, KNN, Faiss, Chroma-DB, TheFuzzSearch);дообучение.Реализованные модули:api;augmentation;dataset;models;preprocessing;similarity_search.Примеры примененияПример для быстрого использования:пример API
Package: recstudio
RecStudio is a modular, efficient, unified, and comprehensive recommendation library based on PyTorch.We divide all the models into 3 basic classes according to the number of towers: TowerFree, ItemTower, TwoTower, and cover models in 4 tasks: General Recommendation, Sequential Recommendation, Knowledge-based Recommendation, Social-Network-based Recommendation. View github page:https://github.com/ustcml/RecStudio
Package: recsys-metrics-polars
recsys-metrics-polarsDescriptionPython library for computing some metrics for recomendations systems based onpolarsAvailable metrics:Precision at kRecall at kAverage precision at kMean average precisionDocumentationPyPIRequirementsPython 3.9 or higher.How to runInstall poetryInstall poetry-version-pluginInstall dependencies:poetry install --only main --no-rootFor development:poetry install --only main,dev --no-rootFor docs:poetry install --only main,dev,doc --no-rootTestspytest ./testsDoc buildingInstall XeTeXsphinx-build -n -b html ./docs/source/ ./docs/build/
Package: recsys-models
RecSysModelsHere we have implemented various Recommender System algorithms for implicit feedback and sequential recommendation. These algorithms are implemented in Python andTensorFlow. This package aims to provide clear, annotated, and efficient implementations of these algorithms along with wrapper classes and methods for easy experimentation and usage.Implicit FeedbackThis package focuses on recommendations based on sequential andimplicit feedback. In these settings there is no explicit numerical rating of items by users - only the record of actions they have taken. Thus there is only observed positive feedback - if a useruhas not interacted with itemi, it could either be because they dislike the item (negative) or they merely have not come upon this item yet (positive).The algorithms implemented here approach the implicit feedback recommendation problem from a pairwise ranking perspective, where we assume that an item a user has interacted with should be ranked higher than an item that the user has not yet interacted with.Algorithms ImplementedBayesian Personalized Ranking (BPR), from'BPR: Bayesian Personalized Ranking from Implicit Feedback'(Rendle et al. 2009)Factorized Personalized Markov Chains (FPMC), from'Factorizing personalized Markov chains for next-basket recommendation'(Rendle et al. 2010)TransRec, from'Translation-based Recommendation'(He, et al. 2017)InstallationRecSysModelsis onPyPI, so you can install the package withpip:$pipinstallrecsys_modelsDependenciesPython 3+(3.6 may be required for Tensorflow-GPU on Windows)tensorflowortensorflow-gpunumpypandasJupyter/JupyterLab(If you want to run the notebook)Sample UsageSee thesample_pipeline Jupyter Notebookfor sample usage. In order to run this, you will need to download theMovieLens 1M Datasetreleased in 2003 by the wonderful folks at theGroupLens Labat the University of Minnesota.InteroperabilityFor interoperability, this package supports initializing a model with pretrained weights in the form ofnumpyarrays exported from models trained under other frameworks. Please see individual model files (e.g.BPR) for a description of trainable variables and their shapes.This package is released underGNU GPLv3byShuyang Li
Package: rectangle
A class for handling rectangle regions.ExampleIn[1]:fromrectangleimportRectIn[2]:r=Rect(mins=[1,2],maxes=[4,6])In[3]:rOut[3]:Rect([1.2.],[4.6.])In[4]:r+1Out[4]:Rect([2.3.],[5.7.])In[5]:s=Rect(sizes=[1,1])In[6]:r<sOut[6]:FalseIn[7]:s<=rOut[7]:True
Package: rectangle-packer
Pack a set of rectangles into a bounding box with minimum areaWelcome to rectangle-packerPrimary use:Given a set of rectangles with fixed orientations,
find a bounding box of minimum area that contains them all with no
overlap.This project is inspired by Matt Perdeck’s blog postFast Optimizing
Rectangle Packing Algorithm for Building CSS Sprites.The latest documentation is available onRead the Docs.The source code is available onGitHub.InstallationInstall latest version fromPyPI:$python3-mpipinstallrectangle-packerOrclone the repositoryand install with:$python3setup.pyinstallBasic usage# Import the module>>>importrpack# Create a bunch of rectangles (width, height)>>>sizes=[(58,206),(231,176),(35,113),(46,109)]# Pack>>>positions=rpack.pack(sizes)# The result will be a list of (x, y) positions:>>>positions[(0,0),(58,0),(289,0),(289,113)]The output positions are the lower left corner coordinates of each
rectangle in the input.These positions will yield a packing with no overlaps and enclosing
area as small as possible (best effort).NoteYou must usepositive integersas rectangle width and height.The module name isrpackwhich is an abbreviation of the package
name at PyPI (rectangle-packer).The computational time required byrpack.pack()increases by
the numberandsize of input rectangles.  If this becomes a problem,
you might need to implement your owndivide-and-conquer algorithm.ExamplesExample A:Example B:Example C:Sometimes the input rectangles simply cannot be packed in
a good way. Here is an example of low packing density:Example D:The image below is contributed by Paul Brodersen, and
illustrates a solution to a problem discussed atstackoverflow.
Package: rectangle-packing-solver
rectangle-packing-solverA solver to find a solution of the 2D rectangle packing problem by simulated annealing (SA) optimization.
Sequence-pair [1] is used to represent a rectangle placement (floorplan).FeaturesSolution quality and execution time are tunable, since the solver is SA-based.Not only integers but also real numbers can be set as a rectangle width and height.A rectangle can rotate while optimizing.The built-in visualizer visualizes a floorplan solution.Installationpipinstallrectangle-packing-solverExample UsageSample code:importrectangle_packing_solverasrps# Define a problemproblem=rps.Problem(rectangles=[[4,6],# Format: [width, height] as list. Default rotatable: False(4,4),# Format: (width, height) as tuple. Default rotatable: False{"width":2.1,"height":3.2,"rotatable":False},# Or can be defined as dict.{"width":1,"height":5,"rotatable":True},])print("problem:",problem)# Find a solutionprint("\n=== Solving without width/height constraints ===")solution=rpm.Solver().solve(problem=problem)print("solution:",solution)# Visualization (to floorplan.png)rps.Visualizer().visualize(solution=solution,path="./floorplan.png")# [Other Usages]# We can also give a solution width (and/or height) limit, as well as progress bar and random seedprint("\n=== Solving with width/height constraints ===")solution=rps.Solver().solve(problem=problem,height_limit=6.5,show_progress=True,seed=1111)print("solution:",solution)rps.Visualizer().visualize(solution=solution,path="./figs/floorplan_limit.png")Output:problem: Problem({'n': 4, 'rectangles': [{'id': 0, 'width': 4, 'height': 6, 'rotatable': False}, {'id': 1, 'width': 4, 'height': 4, 'rotatable': False}, {'id': 2, 'width': 2.1, 'height': 3.2, 'rotatable': False}, {'id': 3, 'width': 1, 'height': 5, 'rotatable': True}]})

=== Solving without width/height constraints ===
solution: Solution({'sequence_pair': SequencePair(([3, 0, 2, 1], [0, 1, 3, 2])), 'floorplan': Floorplan({'positions': [{'id': 0, 'x': 0, 'y': 0, 'width': 4, 'height': 6}, {'id': 1, 'x': 4, 'y': 0, 'width': 4, 'height': 4}, {'id': 2, 'x': 5.0, 'y': 4.0, 'width': 2.1, 'height': 3.2}, {'id': 3, 'x': 0, 'y': 6, 'width': 5, 'height': 1}], 'bounding_box': (8, 7.2), 'area': 57.6})})

=== Solving with width/height constraints ===
Progress: 100%|█████████████████████████████████████████████████████████████| 10000/10000 [00:05<00:00, 1764.33it/s]
solution: Solution({'sequence_pair': SequencePair(([0, 1, 2, 3], [0, 3, 1, 2])), 'floorplan': Floorplan({'positions': [{'id': 0, 'x': 0, 'y': 0, 'width': 4, 'height': 6}, {'id': 1, 'x': 4, 'y': 1, 'width': 4, 'height': 4}, {'id': 2, 'x': 8.0, 'y': 1.0, 'width': 2.1, 'height': 3.2}, {'id': 3, 'x': 4, 'y': 0, 'width': 5, 'height': 1}], 'bounding_box': (10.1, 6), 'area': 60.599999999999994})})Floorplan (example):Floorplan (larger example):References[1] H. Murata, K. Fujiyoshi, S. Nakatake, and Y. Kajitani, "VLSI module placement based on rectangle-packing by the sequence-pair,"IEEE Trans. on Computer-Aided Design of Integrated Circuits and Systems, vol. 15, no. 12, pp. 1518--1524, Dec 1996.License
Package: rectif-ai
Rectif.aiMaking the world a better place one posture at a time.Running the systemCreate and activate a Virtual Environment (preferably Python 3.7)Install dependencies using therequirements.txtfile or withsetup.pyaspip install -e .If you havegit-lfsinstalled, models should be automatically downloaded.
If it isn't (i.e the sizes aren't ~13MB:posenet and 296KB:posturenet), explicitly download the models from thisdrive linktodata/raw/folder.Runpython -m rectifai.predictors.demo_webcamto see the demo with realtime pose preview.orRunpython -m rectifai.predictors.demo_webcam --no-previewto see the notifications only when you need to. :)InspirationIn today’s world, our work requires us to be sitting for a lot of the time. Failing to maintain good posture can thus, cause a variety of health problems related to our lungs, digestion, bones, and so on and so forth. Furthermore, bad posture habits are pretty common and it can be difficult breaking away from them without much deliberate effort.What it doesThe app helps develop good posture habits by making people mindful about their postures when they are in front of the screen.How We built itWe used a Pytorch implementation of PoseNet to detect key-points. The points are then passed onto another network that classifies it into good or bad posture.
Because of the unavailability of the posture(good/bad) dataset, We had to create our own data.  By sitting in both good and bad postures and generating annotated keypoints co-ordinate dataset with pose estimation model, we were able to collect 150,000 different pose Coordinates. Details on the train-val-test splits is given below. The main benefit of this type of custom dataset is it's ease of data collection. Also because of it's simplicity any simple ML model can give good results with it unlike any expensive - image based dataset.DatasetsMPII Human Pose DatasetCustom Generated Posture Data (Each pose has 17 keypoint Coordinates for each Human landmarks/Joints)Dataset type# of pose (Keypoint Co-ordinates)Train100,000Validation30,000Test20,000ToolsPytorch, TorchvisionOpencvNumpyTorchSummaryChallenges we ran intoNo proper posture detection dataset anywhere, Really expensive to create image based dataset for it. so we tried a different domain problem and hacked it to work for our use case.Infrastructure needed for best results. Didn't have good machines so used mobilenet for the posenet  and Linear neuron networks for detection because of its speed and accuracy compared to size of models and infrastructure required.What's next for Rectif.aiTraining on more data for more accurate resultsAddition of feature to get analytics for posture over a period of timeMonitoring from different anglesAdd temporal models for posture detectionAcknowledgementsAllenNLPPosenet-Pytorch
Package: rectify
rectifyrectifyis a tiny Python package whose sole purpose of life is generating
randomized images with colorful bars on a single-color background. Making,
displaying and saving a picture like the one on the top of this page is as
simple as:from rectify.image import generate, save

picture = generate(900, 30, background=(30, 30, 30), colors='pastel')

picture.show()
save(picture, 'bars.png')Or from the command line:$ rectify -x 900 -y 30 -b '(30,30,30)' -c pastel -o 'bars.png' --showFull documentation is available atjenx.gitlab.io/rectify.
Package: rect-intersection
Checks if two rectangles intersect# Tested with:# Python 3.9.13# Windows 10fromrect_intersectionimportintersects# Allowed formats for box1/box2format_1x4=(0,0,100,200)format_4x2=[(0,0),(100,0),(100,200),(0,200)]format_2x2=[(0,0),(100,200)]box1=(0,0,100,200)box2=(1000,1000,2000,2000)print(intersects(box1,box2))box2=(50,20,2000,2000)print(intersects(box1,box2))box2=[(50,20),(2000,20),(2000,2000),(50,2000)]print(intersects(box1,box2))box2=[(50,20),(2000,2000)]print(intersects(box1,box2))box2=(1000,1000,2000,2000)print(intersects(box1,box2))box2=(50,20,2000,2000)print(intersects(box1,box2))box2=[(50,20),(2000,20),(2000,2000),(50,2000)]print(intersects(box1,box2))box2=[(50,20),(2000,2000)]print(intersects(box1,box2))box2=(1000,1000,2000,2000)print(intersects(box1,box2))box2=(50,20,2000,2000)print(intersects(box1,box2))box2=[(50,20),(2000,20),(2000,2000),(50,2000)]print(intersects(box1,box2))box2=[(50,20),(2000,2000)]print(intersects(box1,box2))FalseTrueTrueTrueFalseTrueTrueTrueFalseTrueTrueTrue
Package: rectiou
rectiouRectiou is a pytorch implementation of the intersection over union (IoU) between two rotated rectangles.Supports:✅ Works with rotated rectangles: can handle rectangles with any angle.✅ Batched computation: No for loops, if statements, or other control flow. Can have as many batch dimensions as you want.✅ Fast: faster than OpenCV's implementation.✅ Differentiable: Can be used in a pytorch model and backpropagated through.✅ GPU: can be run on the GPU.✅ No weird stuff: everything is implemented in plain pytorch, no weird custom CUDA kernels or anything like that.ExampleUsage is simple:importtorchimportrectiou# Rectangles: [x, y, w, h, radians]rect_a=torch.tensor([0.0,0.0,1.0,1.0,0.0])rect_b=torch.tensor([0.2,0.1,1.1,0.8,torch.pi/4])# Intersection over unioniou=rectiou.compute_iou(rect_a,rect_b)InstallationpipinstallrectiouTo test that everything is working correctly, run:pipinstallrectiou[tests]pytest
Package: rectipy
RectiPyRecurrent neural networktraininginPython (RectiPy) is a software package developed by Richard Gast
that allows for lightweight implementations of recurrent neural networks (RNNs) based on ordinary or delayed
differential equations.RectiPyprovides an intuitiveYAMLinterface for model definition, and leveragesPyRatesto translate these model definitions intoPyTorchfunctions.
This way, users can easily define their own neuron models, spike-based or rate-based, and use them to create a RNN model.
All model training, testing, as well as numerical integration of the differential equations is also performed inPyTorch.
Thus,RectiPycomes with all the gradient-based optimization and parallelization features thatPyTorchprovides.Basic Features1. Model definitionRNN layers are defined via ordinary or delayed differential equations that govern the neuron dynamicsneurons can either be rate neurons or spiking neuronsRNN layers can either be defined viaYAMLtemplates (see documentation ofPyRatesfor a detailed documentation of theYAML-based model definition) or via customPyTorchmodules.linear input and output layers can be added, thus connecting the RNN into a layered neural network2. Model training and testinginput and output weights, as well as any parameters of the RNN layers can be trainedautogradfunctions byPyTorchare used for the parameter optimizationmost loss functions and optimization algorithms implemented inPyTorchare available3. Model outputsrecord any RNN state variable, loss, or model outputs via theObserverclasschoose at which rate to sample your recordingsvisualize for recordings via lightweight plotting functionsconnect theRectiPynetwork to larger deep learning architecturesInstallationStable release (PyPi)You can install the most recent stable version ofRectiPyvia thepipcommand.
To this end, execute the following command via the terminal within the Python environment you would like to installRectiPyin:pip install rectipyThis will also install the dependencies of the software listed below.Development version (github)To install the most recent development version ofRectiPyas available on the master branch, clone this repository and run the
following line from the directory in which the repository was cloned:python setup.py installAgain, this will also install the dependencies of the software listed below.DependenciestorchpyratesnumpymatplotlibDocumentationYou can find a detailed documentation and various use examples at ourreadthedocswebsite.ReferencesIf you use this framework, please cite:Gast, R., Knösche, T. R. & Kennedy, A. (2023). PyRates - A Code-Generation Tool for Dynamical Systems Modeling. arXiv:2302.03763.ContactIf you have any questions, want to contribute to the software, or just get in touch, feel free to post an issue or contactRichard Gast.
Package: rectree-digfish
RECTREEThis a python application to survey and monitor the continuous changes in a directory tree. For those all of you that use local mirrors of some cloud storage service like Dropbox, Google Drive or Box, usually they provide an application that provides the synchronization between your local host and their cloud servers, usually they sit on the system tray notifying you of changes that occur after the last changes are made to put your local host in sync with the remote servers. The Dropbox app is bloated and occupies, for what it does, more than 100 MB in memory just to provide you with the synchronization and notification of the changes. I replace the Dropbox windows application with a 3rd party (in my case, GoodSync), which provides sync with multiple cloud storage providers. In this last case, the app just syncs and I needed an app that provided me with the notifications and a menu (on the system tray, obviously!) and a menu to quick access the most recent modified files.
I used the most beautiful language in the World, Python, of course, which give you all the tools you need with the most concise and few lines of code. In this, the ingredients where already there and I used:pysystray (for the system tray menu)watchdog (to monitor the dirtree changes)PySimpleGui (to build easyly and quickly UIs).The final result was this:The configurations are stored in an ini file in which you can configure the icon file, the polling interval, and one or more sections, eache one with the path of the directory being monitored, along with the number of items to display and an exclusions pattern, separated by "|". You can configure in a friendly way by choosing the config options on the menu.
There is no limit for the directories to monitor.To get the package you can install it:pip install rectree-digfishAnd to execute it:python -m rectree.rectree
Package: rects
rectsA library for unions, intersections, subtractions, and xors of rectangles.The result of set operations on two rects are shown by the green regions below:RegionsLet's say we have the following rects:+------------+   +--------+
    |            |   |    B   |
    |        +-----------+    |
    |    A   |     C     |    |
    |        +-----------+----+
    |            |
    +------------+And we want to represent the regionA + B - C:+------------+   +--------+
    |            |   |        |
    |        +---+   +---+    |
    |        |           |    |
    |        +---+       +----+
    |            |
    +------------+One method is to divide the area into a series of mutually exclusive horizontal bands:+------------+   +--------+
    |            |   |        |
    +--------+---+   +---+----+
    | a      | b         | c  | d   <- 2nd band with walls at a, b, c, d.
    +--------+---+       +----+
    |            |
    +------------+Each band is a vertical interval and a list of walls. Each contiguous pair of walls indicates a new rect in the band.
ARegionis a list of sorted, mutually exclusive bands.UsingrectsTo use rects, construct an initialRegion,r, from some rect and iteratively+,-,&, or^with other regions:>>>fromrectsimport*>>>r=Region.from_rect(Rect(0,0,100,200))>>>s=Region.from_rect(Rect(10,25,40,75))>>>t=Region.from_rect(Rect(45,75,50,125))>>>rRegion(bands=[Band(y1=0,y2=100,walls=[0,200])])>>>v=r-s-t>>>vRegion(bands=[Band(y1=0,y2=10,walls=[0,200]),Band(y1=10,y2=45,walls=[0,25,100,200]),Band(y1=45,y2=50,walls=[0,25]),Band(y1=50,y2=95,walls=[0,75]),Band(y1=95,y2=100,walls=[0,200])])>>>list(v.rects())[Rect(y=0,x=0,height=10,width=200),Rect(y=10,x=0,height=35,width=25),Rect(y=10,x=100,height=35,width=100),Rect(y=45,x=0,height=5,width=25),Rect(y=50,x=0,height=45,width=75),Rect(y=95,x=0,height=5,width=200)]>>>v.bboxRect(y=0,x=0,height=100,width=200)
Package: rectset
rectsetAnalytical potentials for rectangle electrodes in a surface ion trap.This package provides numpy functions to calculate analytically the electric potential, gradient, and hessian generated by a rectangular electrode in the upper half-space above it $(z > 0)$.InstallpipinstallrectsetDependenciesnumpyAPIrectangle_electrode.pyStatic potential, gradient and hessian generated by a rectangle electrode of finite size delimited by corner points $(x_1, y_1)$ and $(x_2, y_2)$, set at a DC potential of 1 V.pseudopotential.pyStatic potential and gradient of a pair of electrodes symmetric around $y = 0$, separated by a distance $a$, of width $w$ and infinitely extended along $x$; pseudopotential generated by the same pair loaded by an AC voltage of amplitude 1 V, frequency of 1 MHz, for a particle of charge +1 elementary charge and of mass 1 amu.Usageimportnumpyasnpfromrectsetimportrectangle_electrodeasrectfromrectsetimportpseudopotentialasps# Square electrode of 20 x 20 um# Potential and derivatives along one line at 50 um above the trap planex1,y1=-10e-6,-10e-6x2,y2=10e-6,10e-6x=np.linspace(-100,100)*1e-6y=0z=50e-6pot=rect.rect_el_potential(x,y,z,x1,x2,y1,y2)# ndarray, shape (50,)grad=rect.rect_el_gradient(x,y,z,x1,x2,y1,y2)# ndarray, shape (50, 3)hess=rect.rect_el_hessian(x,y,z,x1,x2,y1,y2)# ndarray, shape (50, 3, 3)# Infinite pair of RF electrodes, large 100 um and separated by 40 um# Pseudopotential and derivatives experienced by a 40Ca+ ion with# RF voltage amplitude = 50 V# RF voltage frequency = 30 MHza=40e-6w=100e-6rf_v=50# voltrf_freq_mhz=30# megahertzion_unit_charge=1# elementary chargeion_mass_amu=40# amuK=(rf_v**2*ion_unit_charge)/(ion_mass_amu*rf_freq_mhz**2)# trap and ion scaling factorpspot=K*ps.pseudo_potential(x,y,z,a,w)# ndarray, shape (50,)psgrad=K*ps.pseudo_gradient(x,y,z,a,w)# ndarray, shape (50, 3)pshess=K*ps.pseudo_hessian(x,y,z,a,w)# ndarray, shape (50, 3, 3)ReferencesM.G.House, "Analytic model for electrostatic fields in surface-electrode ion traps", Phys. Rev. A 78, 033402 (2008)https://doi.org/10.1103/PhysRevA.78.033402