Saravanan666/pypi-org huggingface dataset:
Package: problem-detector
problem_detectorTemplate for python package which use Jenkins, Docker, Py-test …Free software: MIT licenseDocumentation:https://pypkg-reference.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theyujinrobot/yujin-pythonproject template.History0.2.0 (2019-11-13)Change problem detector structure.0.1.5 (2019-11-06)Add exception during connection errorAdd robot uuid in log fileShow Config before start0.1.4 (2019-11-06)Fix config bug0.1.3 (2019-11-06)Fix port and class bug0.1.2 (2019-11-06)Add port in config file0.1.1 (2019-11-06)First commit.
Package: problem-solving-offline-judge
개요백준이나코드포스문제를
풀 때 여러 케이스를 실행하여 결과를 보여줍니다.설치$pipinstallproblem_solving_offline_judge문제풀이의 상단 디렉토리에 CLI 용 파일을 생성하여 다음과 같은 내용을 입력합니다.
파일명은 관계없지만 이 설명서에서는judge.py를 사용하겠습니다.# judge.pyfromproblem_solving_offline_judgeimportjudgejudge.cli()사용법$python3./judge.py<문제디렉토리이름>파이썬에서는 패키지로 사용할 디렉토리 이름은 문자 나_로 시작해야 합니다.
하지만 디렉토리 이름을 전부 입력할 필요는 없습니다.$python3./judge.pyb_1000
$python3./judge.py1000성공할 경우 다음과 같이 출력됩니다.$python3./judge.py1000SUCCESS!1.in(48ms)실패할 경우 다음과 같이 출력됩니다.$python3./judge.py1000FAIL!1.in(47ms)Result:2Expected:3디렉토리 구조├──b_1000
│├──1.input.txt
│├──1.output.txt
│├──2.input.txt
│├──2.output.txt
│└──problem.py
├──b_1001
│├──...
│├──...
└──judge.sh# problem.py# solve, solution, main 함수 중 하나는 반드시 있어야 합니다.defsolve():# 풀이 (아래는 백준 1000번 문제 샘플입니다)a,b=map(int,input().split())print(a+b)# 백준이나 코드포스에 그대로 복사해서 붙여넣기 위해 필요합니다.if__name__=="__main__":solve()judge.py: CLI 스크립트\b_1000: 문제 디렉토리\b_1000/1.input.txt: 입력값.1.in과 같은 형식도 가능합니다.\b_1000/1.output.txt: 솔루션이 출력해야하는 값. 입력값 파일명에서in을out으로 바꾸시면 됩니다.problem.py: 문제 모듈 파일. 이름은problem.py이 아니어도 됩니다. 자세한 구조는 위 파일내용을 참조해주세요.
Package: problib
problibSmall Python library to calculate and plot probability density functions for Gaussian and Binomial distributions.Note that this is a test Python package, it works fine but has some issues and solves no new problem. You can totally give it a try though!Installation with pippip install problib

# test.pypi install
pip install -i https://test.pypi.org/simple/ problib==0.2Use in PythonGaussian DistributionfromproblibimportGaussian# Create new gaussian distribution with mu=25 and sigma=2gaussian=Gaussian(25,2)gaussian# mean 25, standard deviation 0.5# Return mean and standard deviationgaussian.mean# 25.0gaussian.stdev# 2.0# Compute probability density function at point x=25gaussian.pdf(25)# 0.19947# Add two Gaussian distributions togethergaussian_b=Gaussian(80,20)gaussian+gaussian_b# 'mean 105, standard deviation 20.09975'# Read data from .txt file, recompute mean and stdevgaussian.read_data_file('numbers.txt')gaussian.calculate_mean()gaussian.calculate_stdev()# Plot data (requires loading data first)gaussian.plot_histogram()# Plot normalized histogram of data and probability density function (requires loading data first)gaussian.plot_histogram_pdf()Binomial DistributionThe Binomial distribution has the same methods as Gaussian but takes success probability and trial size as required inputsfromproblibimportBinomial# Create new Binomial distribution with p=0.4 and n=20binomial=Binomial(0.4,20)binomial.p# 0.4binomial.n# 20binomial.mean# 8.0binomial.stdev# 2.19089# Compute probability density function for k=5binomial.pdf(5)# 0.07465# Read data from .txt file, recalculate propertiesbinomial.read_data_file('numbers_binomial.txt')binomial.replace_stats_with_data()# Plot data and probabilities (works with or without read data)binomial.plot_bar()binomial.plot_bar_pdf()
Package: problystatpy
problyStatPyPython package for computing and visualizing various probability distributionsGeneral Module Descriptions:Applicable for Gaussian and Binomial distributionsRead in datasetsCalculate meanCalculate standard deviationCompute probability distribution FunctionPlot histogram and bar chartPlot probability density functionAdd two distributionsReturn basic statistics of a distributionInstallation:link: Instant file download link:https://pypi.org/project/problystatpy/#files:sparkles: Command line:$ pip install --user problystatpy​		OR$ python3 -m pip install --user problystatpyUsageRecommended for usage accommodation:from problystatpy import *Command line execution:$ python3
>>> from problystatpy import *
>>> gaussian_one = Gaussian()
>>> gaussian_two = Gaussian(25, 2)
>>> gaussian_one.stdev
1
>>> gaussian_one + gaussian_two
mean 25, standard deviation 2.23606797749979Updates6.22.2020 successfully passed test codes and ready for upload testing6.23.2020 problystatpy-0.8.3v release on Test PyPi & pypi.org/project/problystatpy/Github:link:https://github.com/jungsNN/problystatPyP
Package: probnum
Learn to Approximate. Approximate to Learn.Probabilistic Numerics in Python.Home|Tutorials|API Reference|ContributingProbNumis a Python toolkit for solving numerical problems in linear algebra, optimization, quadrature and
differential equations. ProbNum solvers not only estimate the solution of the numerical problem, but also its uncertainty (numerical error) which arises from finite computational resources, discretization and stochastic input. This numerical uncertainty can be used in downstream decisions.Currently, available solvers are:Linear solvers:Solve $A x = b$ for $x$.ODE solvers:Solve $\dot{y}(t) = f(y(t), t)$ for $y$.Integral solvers (quadrature):Solve $F = \int_D f(x) \mathrm{d}p(x)$ for $F$.Lower level structure includes:Random variables and random processes, as well as arithmetic operations thereof.Memory-efficient and lazy implementation oflinear operators.Filtering and smoothingfor (probabilistic) state-space models, mostly variants of Kalman filters.ProbNum is underpinned by the research field probabilistic numerics (PN), which lies at the intersection of machine learning and numerics.
PN aims to quantify uncertainty arising from intractable or incomplete numerical computation and from stochastic input
using the tools of probability theory. The general vision of probabilistic numerics is to provide well-calibrated
probability measures over the output of a numerical routine, which then can be propagated along the chain of
computation.InstallationTo get started install ProbNum usingpip.pipinstallprobnumAlternatively, you can install the latest version from source.pipinstallgit+https://github.com/probabilistic-numerics/probnum.gitNote: This package is currently work in progress, therefore interfaces are subject to change.Documentation and ExamplesFor tips on getting started and how to use this package please refer to thedocumentation. It contains aquickstart guideand Jupyter notebooks illustrating the basic usage of the ProbNum solvers.Package DevelopmentThis repository is currently under development and benefits from contribution to the code, examples or documentation.
Please refer to thecontribution guidelinesbefore
making a pull request.A list of core contributors to ProbNum can be foundhere.Citing ProbNumIf you are using ProbNum in your research, please cite as provided.
The "Cite this repository" button on the sidebar generates a BibTeX entry or an APA entry.License and ContactThis work is released under theMIT License.Please submit anissue on GitHubto report bugs or
request changes.
Package: prob-phoc
prob-phocPyTorch functions to compute meaningful probabilistic relevance scores from
PHOC (Pyramid of Histograms of Characters) embeddings.
Although they are called Pyramid of Histograms of Characters, in practice
they are a Pyramid of Bag of Characters. At the end, each word is
represented by a high-dimensional binary vector.See thewikifor additional details.UsageThe library provides two functions:cphocandpphoc, which are
similar to SciPy'scdistandpdist:Both functions can operate with PHOC embeddings in the probability space (where
each dimension is a real number in the range [0, 1]), or in the log-probability
space (where each dimension is the logarithm of a probability). These are also
sometimes refered to as the Real and Log semirings.importtorchfromprob_phocimportcphoc,pphocx=torch.Tensor(...)y=torch.Tensor(...)# Compute the log-relevance scores between all pairs of rows in x, y.# Note: x and y must have the PHOC log-probabilities.logprob=cphoc(x,y)# This is equivalent to:logprob=cphoc(x,y,method="sum_prod_log")# If your matrices have probabilities instead of log-probabilities, use:prob=cphoc(x,y,method="sum_prob_real")# Compute the log-relevance scores between all pairs of distinct rows in x.# Note: The output is a vector with N * (N - 1) / 2 elements.logprob=pphoc(x)InstallationThe easiest way is to install the package from PyPI:pipinstallprob-phocIf you want to install the latest version from the repository, clone it
and use the setup.py script to compile and install the library.pythonsetup.pyinstallYou will need a C++11 compiler (tested with GCC 4.9).
If you want to compile with CUDA support, you will also need to install
the CUDA Toolkit (tested with versions 8.0, 9.0 and 10.0)Tests and benchmarksAfter the installation, you can run the tests to ensure that everything is
working fine.python-mprob_phoc.testI have also some benchmarks to compare CPU vs. CUDA, for different matrix
sizes and float precision. These take quite a long to run, so don't hold
your breath.python-mprob_phoc.benchmark
Package: probplanparse
A small library that parses through the report.txt file and converts to auser-dictmade up of Hypothesis objects. This will use report.txt files from theexternal-project.Usepip install probplanparseto install package.Here is a short example of how to use this package:importprobplanparseprobplanparse.parse_report('/mnt/c/Users/14022/Documents/SIFT/external-planner/pr_result/report.txt')If you have a folder full of.tar.bz2result folders, you can use the following script:importprobplanparseimportosimportsysfor(dirpath,dirnames,filenames)inos.walk('./prob-plan-results/'):forfilenameinfilenames:iffilename.endswith('.tar.bz2'):try:probplanparse.parse_report(os.path.join('prob-plan-results',filename),True)except:print("Unexpected error:",sys.exc_info())passChange Log0.1.2 (8/4/2021)Fix tono attribute parse-report.0.1.1 (8/4/2021)Added in ability to save the dictionaries into both.jsonand.csvUpdated README for instructions on running with a folder full of problems0.1.0 (8/4/2021)Added in ability to save the dictionaries to a file in a folder called "parsed-reports"Takes the problem name from the report, rather than file nameOnly will search for "report.txt"0.0.8 (8/4/2021)Added in a CHANGELOGRemoved unused functionsmain()andget_report_from_args()Updated print statements to include problem names0.0.7 (8/4/2021)Updated functionparse-report()to enable it to take paths to.tar.bz2folders.Created new functionget_report_func()to extract report from.tar.bz2folders.0.0.6 (8/3/2021)First working releaseVersions 0.0.1 ~ 0.0.5 were broken and not working.
Package: probplotlib
Probability Distributions for PythonThe Statistical VoidStats can get tricky in the transition from plotting fun graphs to advanced algebraic
equations. A classic example is the given sum:1.0e14 + 1.0 - 1.0e14The actual result is1.0but in double precision, this will result in0.0.
While in this example the failure is quite obvious, it can get a lot trickier
than that. Instances like these hinder the community from exploring the
inferential potential of complex entities.p=Gaussian(a,b)q=Gaussian(x,y)p+qThis snippet would be close to useless as python addition doesn't isn't attributed for
higher-level declarables such as Gaussian variables. probplotlib provides simple solutions
for probability distributions; posing a highly-optimized alternative tonumpyandmath,
in a niche that is scarce in options.Usageprobplotlib has the following operative methods:+: usesDunder Methodsfor facilitating dist-additions.calculate_mean(): returns the mean of a distribution.gaussianex=Gaussian()calculate_mean(gaussianx)calculate_stdev(): returns the standard deviation of a distribution.binomialex=Binomial()calculate_stdev(binomialex)read_dataset(): reads an external .txt dataset directly as a distribution.gaussianex.read_dataset('values.txt')binomialex.read_dataset('values.txt')params(): retrieves the identity parameters of an imported dataset.gaussianex.params()binomialex.params()pdf(): returns the probability density function at a given point.pdf(gaussianex,2)functions unique toGaussian Distributions:plot_histogram(): uses matplotlib to display a histogram of the Gaussian Distribution.gaussianex.plot_histogram()plot_histogram_pdf(): uses matplotlib to display a co-relative plot along with the Gaussian probability density function.gaussianex.plot_histogram_pdf()functions unique toBinomial Distributions:plot_bar(): uses matplotlib to display a bar graph of the Binomial Distribution.binomialex.plot_bar()plot_bar_pdf(): uses matplotlib to display a co-relative plot along with the Binomial probability density function.binomialex.plot_bar_pdf()Data Visualizationprobplotlib therefore allows you to analyze raw numerical data graphically in minimial
lines of code. The example below makes for better understanding.a bag of numbers in a.txtfile corresponds to the following plots:histogram plot:bar plot:histogram plot with pdf:ReferencesStanford Archives: CS109- The Normal(Gaussian) DistributionA Practical Overview on Probability Distributions: Andrea Viti, Alberto Terzi, Luca BertolacciniAwesome Scientific Computing: Nico SchlÃ¶mer, GitHub Repositorymath.statistics: Python 3.10 Source CodeStack OverflowDependenciesprobplotlib depends on thematplotliblibrary on top of your regular python installation.pip install matplotliborconda install matplotlibInstallationprobplotlib is available on thePython Package Index. You can install it directly using pip.pip install probplotlibTestingTo run the tests, simply check to this directory and run the code below.python -m unittest test_probplotlib
Package: probreg
Probreg is a library that implements point cloudregistration algorithms withprobablistic model.The point set registration algorithms using stochastic model are more robust than ICP(Iterative Closest Point).
This package implements several algorithms using stochastic models and provides a simple interface withOpen3D.Core featuresOpen3D interfaceRigid and non-rigid transformationAlgorithmsMaximum likelihood when the target or source point cloud is observation dataCoherent Point Drift (2010)Extended Coherent Point Drift (2016)(add correspondence priors to CPD)FilterReg (CVPR2019)Variational Bayesian inferenceBayesian Coherent Point Drift (2020)Distance minimization of two probabilistic distributionsGMMReg (2011)Support Vector Registration (2015)Hierarchical Stocastic modelGMMTree (ECCV2018)TransformationstypeCPDSVR, GMMRegGMMTreeFilterRegBCPD (experimental)RigidScale + 6D pose6D pose6D pose6D pose(Point-to-point,Point-to-plane,FPFH-based)-NonRigidAffine,MCTTPS-Deformable Kinematic(experimental)Combined model(Rigid + Scale + NonRigid-term)CUDA supportYou need to install cupy.pip install cupyRigid CPDAffine CPDInstallationYou can install probreg usingpip.pip install probregOr install probreg from source.git clone https://github.com/neka-nat/probreg.git --recursive
cd probreg
pip install -e .Getting StartedThis is a sample code that reads a PCD file and calls CPD registration.
You can easily execute registrations from Open3D point cloud object and draw the results.importcopyimportnumpyasnpimportopen3daso3fromprobregimportcpd# load source and target point cloudsource=o3.io.read_point_cloud('bunny.pcd')source.remove_non_finite_points()target=copy.deepcopy(source)# transform target point cloudth=np.deg2rad(30.0)target.transform(np.array([[np.cos(th),-np.sin(th),0.0,0.0],[np.sin(th),np.cos(th),0.0,0.0],[0.0,0.0,1.0,0.0],[0.0,0.0,0.0,1.0]]))source=source.voxel_down_sample(voxel_size=0.005)target=target.voxel_down_sample(voxel_size=0.005)# compute cpd registrationtf_param,_,_=cpd.registration_cpd(source,target)result=copy.deepcopy(source)result.points=tf_param.transform(result.points)# draw resultsource.paint_uniform_color([1,0,0])target.paint_uniform_color([0,1,0])result.paint_uniform_color([0,0,1])o3.visualization.draw_geometries([source,target,result])ResourcesDocumentationResultsCompare algorithmsCPDSVRGMMTreeFilterRegNoise testICP(Open3D)CPDFilterRegNon rigid registrationCPDSVRFilterregBCPDFeature based registrationFPFH FilterRegTime measurementExecute an example script for measuring time.OMP_NUM_THREADS=1 python time_measurement.py

# Results [s]
# ICP(Open3D):  0.0014092829951550812
# CPD:  0.038112225010991096
# SVR:  0.036476270004641265
# GMMTree:  0.10535842599347234
# FilterReg:  0.005098833993542939Citing@software{probreg,
    author = {{Kenta-Tanaka et al.}},
    title = {probreg},
    url = {https://probreg.readthedocs.io/en/latest/},
    version = {0.1.6},
    date = {2019-9-29},
}
Package: probs
probsProbability is a concept that many introductory Computer Science courses teach because of its frequent application in algorithms, data structures, and other mathematical fields. While numerous libraries for expressing probabilities exist (e.g. scipy, statistics, etc), the majority of them focus primarily on the application of these concepts rather than showcasing the mechanics of the mathematical theory.The goal of this project is to leverage Python's built-in language features to expose an intuitive and expandable API for simple probabilitic expressions.Usagepip install probsExamplesfromprobsimport*# define a normally-distributed random variable with# mean = 0, variance = 1X=Normal()assertE(X)==0assertVar(X)==1/12assertX.pdf(0.5)==2# combine multiple random variablesu,v=Uniform(),Uniform()assertE(u)==1/2assertVar(u)==1/12assert(u*v).pdf(0.5)==39.0169assert(1*v).pdf(0.5)==1assertE(u+1)==1.5assertE(u+v)==1assertE(u-v)==0assertVar(u+v)==1/6DocumentationContributingAll issues and pull requests are much appreciated! To build the project:probs is actively developed using the lastest version of Python.First, be sure to runpre-commit install.To run all tests and use auto-formatting tools, usepre-commit run.To only run unit tests, runpytest.TODO ListUse ApproxFloat across all operations.Dataclasses are iffy, because:Need to set super().init() in order to get the parent class's fields.Need to set eq=False on all RandomVariables.Need to set repr=False in order to get the parent'sreprmethod.However, clearerinitfunction provided, other operators potentially builtin.repr can be inherited without a rewriteinheritance works so long as every parent is also a dataclass.super short init syntaxFigure out how to merge pmf and custom pmf functions.
Package: probs-module-ontology-conversion
PRObs ontology conversion moduleThis module contains scripts for converting an ontology to Datalog rules and bundling additional required facts together.These scripts are compatible withRDFoxversion 6.3a.Running the RDFox scriptsThis module reads the ontology definitions and data, and splits them into data (probs_ontology_data) and Datalog rules (probs_ontology_rules).To run the module:RDFoxsandbox<root>scripts/ontology-conversion/masterwhere<root>is the path to this folder.The converted data and rules will be written todata/.Using probs-runnerUsingprobs-runner, this module can be run using theprobs_convert_ontologyfunction.
Package: probs-ontology
PRObs ontologyThis repository contains the "Physical Resources Observatory" (PRObs) ontology. It includes both the concepts and relations as an OWL ontology, Datalog rules, and scripts designed to be run with  theRDFox triple store.This ontology is being developed as part ofUK FIRES.Getting startedSee thedocumentationfor more information about the ontology concepts and how it can be used.You can obtain a copy of the ontology files from this git repository, or by installing the Python packageprobs_ontology.Seeprobs-ontology-examplefor a practical example of using the PRObs system to access resource data.Contributing 🎁Contributions are welcome: share examples of work done using the ontology, make suggestions for improving the documentation, and examples of things that are more difficult than they should be or don't work -- as well as of course making actual fixes to the definitions, scripts and documentation.SeeDEVELOPING.mdfor more informationAuthorsStefano GermanoCarla SaundersRick LuptonLicenseThe PRObs ontology is licensed with theTODO license
Package: probspellchecker
Probabilistic Spell Checker in PythonSpell checker based on edit distance (Levenshtein-ish) and word frequency
in a training corpus.For theoretical background, see Peter Norvig's article,https://norvig.com/spell-correct.htmlComes with a dictionary trained from German Wikipedia articles.Usage:import json
import re
import probspellchecker

spellchecker = probspellchecker.ProbabilisticSpellChecker(
    word_counts=json.load(open("dictionary_dewiki_full10plus.json")),
    word_whitelist=["my", "custom", "wordlist"],
)

text = "lorem ipsum whatever"
for word in re.findall(r"\w+", text):
    correction = spellchecker.correction(word.lower())
    if correction:
        print(correction)
    else:
        print(word)Word counts is just that, a dict with word to count mapping. To build your
own dictionaries, see probdict-from-dewiki.py and probdict-from-text.py.
You may also specify a whitelist of words that should just be accepted by
the spell checker, which is useful if your name is not in the dictionary.If your language sports special characters like the German umlauts, you
might need to pass an additional charset parameter which is a string with
all allowed characters of your language, to the ProbabilisticSpellChecker.
This is then used to generate candidate words.LoggingIf the logging annoys you, just shut it up:spell_log = logging.getLogger("probspellchecker")
spell_log.setLevel(logging.ERROR)  # log only errors
Package: probs-runner
PRObs runnerThis repository containsprobs-runner, a Python package for data processing using the"Physical Resources Observatory" (PRObs) ontology system. The Python package coordinates running theRDFox triple store.This ontology is being developed as part ofUK FIRES.Getting startedSee thedocumentationfor more information about the package.Citing the PRObs systemIf you find these tools useful, please acknowledge this by citing the conference paper:Stefano Germano, Carla Saunders, Ian Horrocks and Rick Lupton.Use of Semantic Technologies to Inform Progress Toward Zero-Carbon Economy. In: International Semantic Web Conference 2021 (accepted).Contributing 🎁Contributions are welcome. SeeDEVELOPING.mdfor more informationAuthorsRick LuptonStefano GermanoLicenseThe Python code is licensed under theMIT License.