Saravanan666/pypi-org huggingface dataset:
Package: errorcalcsbeta
"ErroRCalcS" is a GUI-tool to calculate uncertainties by using the uncertainties and the PyQt5 packages.ErroRCalcS-BETAThis is the beta version of ErroRCalcS. Please check outfor the stable version.Input and Result ExamplesGeneral InpusvariablevalueerrorformularesultV, T, n2, 283.5, 4.30, 0.5, 0.03(n*8.314*T)/V5067.591+/-36.467x4.31.1sin(x)*3.5-3.2066+/-1.5431y3.2540.032log10(y)0.5124175+/-0,0042709x, y4.3, 3.2541.1, 0.032log(x)**y3.4156+/-1.9497Arithmetic Characterscharacters and operatorsmeaningexample+plus4+2=6-minus4-2=2*multiplication4*2=8/division4/2=2**exponent4**2=16sqrt(x)square rootsqrt(4)=2log(x)natural logarithmlog(2.71828)=1logY(x)logarithm with base Ylog10(2.71828)=0.4343sin(x)sinus in radiansin(1)=0.8415cos(x)cosinus in radiancos(1)=0.5403tan(x)tangens in radiantan(1)=1.5574asin(x)arcsinus in radianasin(1)=1.5707acos(x)arccosinus in radianacos(1)=0atan(x)arctangens in radianatan(1)=0.7854exp(x)exponentialfunktion of e^(x)exp(2)=7.3891RequirementsPython >= 3.4uncertaintiesPyQt5Installationerrorcalcs-beta can be installed bypip3 install errorcalcs-betaorpython3 -m pip install errorcalcs-beta(Linux) or simplypip install errorcalcs-beta(Windows). You can run the GUI with following code:from errorcalcs-beta.errorcalcs import run\_e\_c
run\_e\_c()errorcalcs-beta
Package: error-cat
error_catA fun way to display python errors.Do you find long python error tracebacks annoying? Personally, they make me painfully aware of the fact that I don't know what I'm doing. And while that is certainly the case, sometimes I'd like that news to be delivered to me in a nicer way. For that, there iserror_cat.Installationpip install error_catUsageerror_cat python <name of your favorite python script>.pyIf<name of your favorite python script>.pyruns successfully, you will see a fun, reassuring message fromerror_cat:________________________
               /                        \
               |   Everything worked!   |
               \  ______________________/
              /  /
 ,_     _    / /
 |\\_,-~/   /'
 / _  _ |    ,--.
(  @  @ )   / ,-'
 \  _T_/-._( (
 /         `. \
|         _  \ |
 \ \ ,  /      |
  || |-_\__   /
 ((_/`(____,-'On the other hand, if<name of your favorite python script>.pyproduces an error,error_catwill break the news to you. Here is an example script that will lead to an error:fake_error.pydeffunc():func2()deffunc2():print(5+"5")func()Here is whaterror_catwill tell you:$ error_cat python fake_error.py

                _________________________________________________________________
               /                                                                 \
               |   File "fake_error.py", line 5, in func2                        |
               |   TypeError: unsupported operand types for +: 'int' and 'str'   |
               \  _______________________________________________________________/
              /  /
 ,_     _    / /
 |\\_,-~/   /'
 / _  _ |    ,--.
(  @  @ )   / ,-'
 \  _T_/-._( (
 /         `. \
|         _  \ |
 \ \ ,  /      |
  || |-_\__   /
 ((_/`(____,-'Artwork CreditAll ascii artwork is from theASCII Art Archive. Individual artworks are credited to the artist (if known) in the comments oferror_cat/characters.py. A big thank you to the following artists whose art has been incorporated intoerror_cat:MorfinaJoan G. Stark
Package: error-catcher
Error CatcherConvenient and comprehensive traceback decorator for Python scripts.To use this decorator, simply attach it to your function:fromerror_catcherimportsilent@silent(key_vars=[],log_file='',ascending=False)deffunc():i,j=1,0returni/jfunc()Parameterskey_vars: list, default[].This is a list of variable names to be caught. Once an exception happens, the returned message will include the corresponding value of these variables in the most recent frame, both globally or locally.log_file: string, default''.If this value is set non-empty, the returned message will be passed to a log file under the same folder as the Python scripts. You are suggested to use '.log' or '.txt' format.By default, it is empty and the returned message will be printed directly.ascending: Bool, defaultFalse.This parameter decides whether to append the returned message to the end of the log file (True) or to the top of the log file (False).If log_file is set empty, this parameter will have no impact.Return
Package: errorcollector
Error CollectorCollects raised error during with statement.FeaturesIn some cases we don't want to raise an error immediately.
For example, case when return error HTTP response to client
after validating whole HTTP POST data.This package helps to collect error.Installationpip install errorcollectorUsageMultipleErrorCollectorLet's say, there are data model which has single property.
Before process this data model, we want to validate property.Ex:fromyourproduct.exceptionsimportConvertErrorclassPostDataModel:def__init__(self,property_a_string:str,property_b_string:str):self._property_a_string=property_a_stringself._property_b_string=property_b_stringself.list_error=Nonedefvalidate(self)->bool:self.stock_convert_error(lambda:self.property_a_int,f"Property string A couldn't be converted to integer. Property string ={self._property_a_string}")self.stock_convert_error(lambda:self.property_b_int,f"Property string B couldn't be converted to integer. Property string ={self._property_b_string}")returnbool(self.list_error)defstock_convert_error(self,method:Callable[[],Any],message:str)->None:withMultipleErrorCollector(ConvertError,message,self.list_error):returnmethod()@propertydefproperty_a_int()->int:"""May raise ValueError"""returnint(self._property_a_string)@propertydefproperty_b_int()->int:"""May raise ValueError"""returnint(self._property_b_string)When we call methodvalidate(), even ifValueErroroccurs,
the exception is not raised and execution does not stop.Whenmethod()in methodstock_convert_error()raisesValueError,ConvertErrorwhich is set raisedValueErrorinto__cause__is set
into propertyself.list_error.We can check details of error after validate.SingleErrorCollectorThis is single version of Error Collector.
This may be useful in case when need to handle
multiple cases and singular cases in an integrated method by polymorphism.Ex:fromyourproduct.exceptionsimportConvertErrorclassPostDataModel:def__init__(self,property_string:str):self._property_string=property_stringself.convert_error=Nonedefvalidate(self)->bool:self.stock_convert_error(lambda:self.property_int,f"Property string couldn't be converted to integer. Property string ={self._property_string}")returnself.convert_errorisnotNonedefstock_convert_error(self,method:Callable[[],Any],message:str)->None:error_collector=SingleErrorCollector(ConvertError,message)witherror_collector:method()self.convert_error=error_collector.error@propertydefproperty_int()->int:"""May raise ValueError"""returnint(self._property_string)
Package: error-counter
error-counterError Counter: Count error (e.g. network error) beyond process boundary, then issue fix command when exceeded threshold.How to useimport requests
from error_counter import Counter

# reboot system when error accumulate 3 times in a low
network_error_counter = Counter("/tmp/network_error.txt")

try:
	r = requests.post(somowhere, somewhat)
except requests.ConnectionError as e:
	network_error_counter.inc_error()

if not r is None:
	# send succeeded.
	network_error_counter.reset_error()Counter classclass Counter:
  def __init__(self, counterfile, reset_task="sudo reboot", reset_threshold=3):

#  counterfile: file name to use counter. The file is owned jointly by sevelal Counter beyond process boundary.

#  reset_task: shell command which is issued when error count is over the threshold.

#  reset_threshold: Threshold for reset_task.

  def inc_error(self):
  #	Increment error count then issue reset_task if count is over threshold

  def dec_error(self):
  # Decrement error count as 0

  def reset_error(self):
  # Reset error count as 0downloadshistory0.1.0  2018.11.18  first version0.1.1  2018.11.18  fix README
Package: erroremail
Send an error email when an you get an exception.Free software: BSD licenseDocumentation: See BelowWhat does it do?Here is how it works:with ErrorEmail(email_config):
    do_stuff()Ifdo_stuffraises an exception, it will send an email with the
traceback. That’s it.ConfigurationThe ErrorEmail context manager accepts a configuration dictionary that
defines the To, From and SMTP server information. Here is an example:{
  'SERVER': 'smtp.myhost.com',
  'PORT': 25,
  'TO': ['foo@bar.com', 'baz@bar.com'],
  'FROM': 'erroremailer@myhost.com',
}ErrorEmail doesn’t have robust email support at the moment. I’m happy
to accept pull requests!
Package: error-emailer
EmailerEmailer providesa decorator to send emails on error instead of raise an error.Usefull whenCode should send out some kind of "alert" without breaking any codeComplex error handling isn't needed or isn't a good choice cosidering cost/valueE.g. You are writing an script to do some ETL work for a report for your self or a small group
It need to be reliable but good enough if you know it breaks and fix afterwardsEmails will be constructed as MIMEMultipart contains only simple text.
And sent throught smtp wihtout any authentication, which suitsmost of internal smtp servers.InstallationInstall with pippip install error-emailerEmail constructEmail constructed as MIMEMultipart with defaulterror_msg_title = 'Error'error_msg_content = 'Error occurred'Example: Use decoratorfrom erroremailer import EmailError

ee = EmailError(
    from_addr = 'me@example.com',
    to_addr = 'others@example.com',
    smtp_addr = '10.0.0.1@some-smtp.com',
    # set send_email to False for test
    send_email_on_error = False,
    error_msg_title = 'Error occured in my best script"
    error_msg_content = 'Error occured in my best script"
    )

# define a function with deco
@ee.email_on_error()
def make_a_error():

    a = 1
    b = '2'
    print(a + b)

    return a

make_a_error()Example: Use send email directlyfrom erroremailer import EmailError

ee = EmailError(
    from_addr = 'me@example.com',
    to_addr = 'others@example.com',
    smtp_addr = '10.0.0.1@some-smtp.com',
    # set send_email to False for test
    send_email_on_error = False,
    error_msg_title = 'Error occured in my best script"
    error_msg_content = 'Error occured in my best script"
    )

def make_a_error():

    a = 1
    b = '2'
    print(a + b)

    return a


if __name__ == '__main__':
    
    try:
        make_a_error()
    except:
        ee.send_error_email()
    finally:
        pass
Package: error-explainer
error-explainerThis is a project aimed at tool developers who want to create custom error checks
provide better messages with improved location, accuracy and message quality for different errors in Python.Some checks for syntax errors are provided out of the box.Currently available checks can be found inerror-explainer/messages.pyInstallationTo install this package usepip install error-explainerUsageCheck a Python file for possible errorsfromerror_explainer.check_runnerimportrun_checksmessages=run_checks("path/to/file")Messages will be a list of strings containing the generated messages.Add a new custom checkCustom checks can be added to the list of checks ran while calling run_checks().
To add a new check use@add_check(force: bool, level=99)annotation. Force parameter defines if the
check is ran only if the code does not compile (False) or always (True)
Checks are also run in multiple levels from 0 to 99.
Current layers are the following:0 - docstring errors, quote errors1 - miss match bracket errors, missing bracket errors, python 2 style print usage error2 - invalid function definition errors3 - missing colon errors, invalid assignment errors99 - indentation errors, coma used instead of a period in an assignment errorfromerror_explainer.check_runnerimportadd_check,add_message@add_check(False)defcustom_check(filename):# code for the checkiferror_in_file:# To add a message to the list of messages returned when calling run_checks() useadd_message("code_for_the_message",argument1="foo",argument2="bar")# Custom arguments can be used in the message text to make messages more dynamicManage messagesMessages used in checks can be:addedfromerror_explainer.messagesimportcreate_message# message text can contain arguments in curly brackets these can be later given values using kwargscreate_message("code_for_the_message","Message text with{dynamic_arguments}")removedfromerror_explainer.messagesimportremove_messageremove_message("code_for_the_message")overwrittenfromerror_explainer.messagesimportoverwrite_messageoverwrite_message("code_for_the_message","Message text with{dynamic_arguments}")
Package: errorgeopy
Geocoding is the process of taking a string representing a real-world address,
and resolving that to a single point location. However different providers will
resolve the same addresses to different locations, and it can be important to
consider this spatial error. For example, when determining the census tract an
addresses should be linked to, there may be some error. This error can go
unacknowledged but still be very influential on analysis, similar to the famous
modifiable area-unit problem (MAUP), but for point representations of addresses.This library can be used to determine spatial error across selected geocoding
providers. It can, for example, produce the convex hull of successful geocodes,
so you can imagine an address as a polygon. These individual points are also
available as a multipoint geometry.Intended to work with as many of the providers supported by geopy as you care to
configure. Without configuration, will use free global provdiders that don’t
require API tokens.Only supports Python 3. Tested with Python 3.4 and 3.5.
Package: errorhandler
ErrorHandlerThis is a handler for the python standard logging framework that can
be used to tell whether messages have been logged at or above a
certain level.This can be useful when wanting to ensure that no errors have been
logged before committing data back to a database.As an example, first, you set up the error handler:>>> from errorhandler import ErrorHandler
>>> e = ErrorHandler()Then you can log and check the handler at any point to see if it has
been triggered:>>> e.fired
False
>>> from logging import getLogger
>>> logger = getLogger()
>>> logger.error('an error')
>>> e.fired
TrueYou can use thefiredattribute to only perform actions when no
errors have been logged:>>> if e.fired:
...   print "Not updating files as errors have occurred"
Not updating files as errors have occurredInstallationDo the following in your virtualenv:pip install errorhandlerDocumentationThe latest documentation can also be found at:http://errorhandler.readthedocs.org/en/latest/LicensingCopyright (c) 2008-2015 Simplistix Ltd, 2016 Chris Withers.
See docs/license.txt for details.
Package: errorhelper
一款帮助中国的python初学者看懂exception和error的工具本工具的主要功能是对相应的错误给出中文提示安装pip install errorhelper使用在您的代码上面加入如下的代码import errorhelper注意事项由于编译器会对代码进行预编译，所以未能捕捉 compile 时候发生的错误，比如空格出错或者语法出错，如果您需要相关的全面检测，可以考虑 pylint可能会有的功能为了弥补不能捕捉编译错误的缺陷，将来可能会加上代码扫描功能，不过使用上可能就没那么方便了，必须以您的代码作为输入参数，在cmd中运行工具脚本
Package: error-helper
error-helperThis is a minimalistic python module which helps you print colorful messages for CLI
tools. It's available onPyPi, but you can also add it
to your project as a git submodule.Usage>>>fromerror_helperimport*>>>info("this is information")# output will be bluethis is information>>>hint("this is less important information")# output will be grayed outthis is less important information>>>warning("something didn't go quite right...")# output will be yellowwarning: something didn't go quite right...>>>error("something went terribly wrong")# output will be rederror: something went terribly wrong>>>success("completed the operation!")# output will be greensuccessfully completed the operation!prompt(...)andprompt_input(...)Theprompt(...)function, by default, prints a newline, followed by the provided values,
a colon and another newline:>>>prompt("enter the server url")enter the server url:>>>Theprompt_input(...)function, by default, prints the provided values, followed by a colon
and a space. Then it calls the defaultinput(...)function and returns it's result. The result
will be stripped ifstrip=True(default).>>>prompt("enter the server url");url=prompt_input("url:")enter the server url:url:  https://30350n.de>>>url'https://30350n.de'
Package: errorhelpers
errorhelpersHelpers for handling Python errors.Usage:# As a decorator@errorhelpers.expect_error(*errors,on_unexpected_error=handler)defsome_error_prone_funcion():...# Using with statementwitherrorhelpers.expect_error(*errors,on_unexpected_error=handler):# Some error prone operation...Example 1: Basic usageimportpytestimporterrorhelperswitherrorhelpers.expect_errors(ZeroDivisionError):assert4/2==2# `ZeroDivisionError` will be re-raised.withpytest.raises(ZeroDivisionError):witherrorhelpers.expect_errors(ZeroDivisionError):4/0# In case of other exceptions, `errorhelpers.UnexpectedError("Unexpected error")`# will be raised instead.withpytest.raises(errorhelpers.UnexpectedError,match="Unexpected error"):witherrorhelpers.expect_errors(ZeroDivisionError):"a"/"b"Example 2: Custom errorimportpytestimporterrorhelpersclassCustomError(Exception):@classmethoddefraise_(cls,msg):defraiser(error):print("Hiding error:",error)raisecls(msg)returnraiser@errorhelpers.expect_errors(ZeroDivisionError,on_unexpected_error=CustomError.raise_("Custom error"))defsensitive_transaction(x,y):returnint(x)/int(y)assertsensitive_transaction(4,"2")==2# `ZeroDivisionError` will be re-raised.withpytest.raises(ZeroDivisionError):sensitive_transaction(4,0)# In case of other exceptions, `CustomError` will be raised instead.withpytest.raises(CustomError,match="Custom error"):sensitive_transaction("a","b")# Hiding error: invalid literal for int() with base 10: 'a'
Package: errorify
ErrorifyErrorify is a simple Python package designed to streamline error formatting in your projects. With Errorify, you can organize and present errors in a structured and user-friendly manner, enhancing code readability and simplifying debugging processes.InstallYou can easily install Errorify using pip:pip install errorifyUsageTo utilize Errorify within your Python projects, simply import it and pass theerrorobject to the errorify method. It will return the formatted error details string.Below is an example illustrating how to incorporate Errorify into your code:fromerrorifyimporterrorifytry:raiseValueError('Invalid Value')exceptExceptionase:print(errorify(e))OutputThe code snippet provided yields the following output:---------------- Error Details ----------------
Exception Name: ValueError
Exception Message: Invalid Value
Exception File Path: /home/user/Documents/test.py
Exception File Name: test.py
Exception File Line Number: 4
Error File Path: /home/user/Documents/test.py
Error File Name: test.py
Error File Line Number: 4
-----------------------------------------------Another ExampleCode snippet:fromerrorifyimporterrorifytry:value=1/0print(value)exceptExceptionase:print(errorify(e))Output:---------------- Error Details ----------------
Exception Name: ZeroDivisionError
Exception Message: division by zero
Exception File Path: /home/user/Documents/test.py
Exception File Name: test.py
Exception File Line Number: 4
Error File Path: /home/user/Documents/test.py
Error File Name: test.py
Error File Line Number: 4
-----------------------------------------------
Package: error-lib
lib-namestep to commit:
    step rename:
        rename:
        ./
        |__src/
            |__packge_name/
        to your package name
    step edit:
        edit:
            ./
            |__setup.cfg
        name, version, author, author_email
    step build:
        step-1:
            make a pypi account
        step-2:
            run code on command line:
                Unix/macOS:
                    python3 -m pip install --upgrade build
                    python3 -m pip install --upgrade twine
                    python3 -m build
                    twine upload dist/*
                Windows:
                    py -m pip install --upgrade build
                    py -m pip install --upgrade twine
                    py -m build
                    twine upload dist/*Uploading distributions tohttps://test.pypi.org/legacy/Enter your username:[your username]Enter your password:[your password, this is hidden]Uploadingpackage-name-version-py3-none-any.whl100%|█████████████████████| 4.65k/4.65k [00:01<00:00, 2.88kB/s]Uploadingpackage-name-version.tar.gz100%|█████████████████████| 4.25k/4.25k [00:01<00:00, 3.05kB/s]
Package: error-limits
Calculations with error limitsCalculate with error limits:frommathimportpifromerror_limitsimportimprecise,Range@imprecisedefcalculate_area(r):returnpi*r**2area=calculate_area(Range(0.52,0.56))# [0.8494866535306802, 0.9852034561657592]Another example:@imprecisedefcalculate(a,b,c,d=1,e=0):return(a*sin(b+c))**d+eresult=calculate(Range(2,3),4,0,e=1)# [-1.2704074859237844, 0.4863950093841436]TestsRunpython tests/test.py
Package: error-links
error-linkserror-linksadds Google and Python documentation links to the bottom of exceptions.In most terminals, you will need to holdCmdorCtrlto allowclickingthe link.This works really well alongsideRich's traceback handler, which is what enabled the highlighting and coloured output in the screenshot above.UsageTo use this package, simply install it withpython -m pip install error_links.
Then, install the error links withfromerror_linksimportinstallinstall()You can control whether to show the emoji or the text with theinstallkeyword argumentsuse_emojiandshow_text, respectively.
For example,install(show_text=False)will use only the emoji for the link.You can switch from Google to DuckDuckGo by specifyingsearch_engine="duckduckgo".
More search enginesmaybe supported in the future if you make a PR orrequest it.Install automaticallyYou can use the commanderror-links installto install error links automatically.
This will modify the filesitecustomize.pyin your directorysite-packages.To see where the installation was made, you can use the commanderror-links where.If you want error links in the REPL automatically as well, you canread this article on how to run custom Python code on REPL startup.
Package: error-param-cal
error_param_calCalculate any of the 6 parameters of the power of a test iteratively.
The function will ask the user to specify the parameter to calulate and the user can terminate the current session with a simple y/n(i.e yes/no).This error calculator function calculates the different parameter with the given data. The parameters include:Sample Size(n)Type I Error(alpha)Type II Error(beta)Population MeanSample MeanPopulation Standard DeviationHow does it work?Select the error parameter number from above list.Enter the asked required data.Get the calculated output of the required parameter.Repeat steps 1,2,3 for different parameters to be calculated continuing the code.When you wish to quit type "n".InstallationRun the following to install:pipinstallerror_paramUsageimporterror_parameters_calculator# function usageerror_parameters_calculator.error_param()# For individual parameter calculation if you do not like to iterate and apply it simply. Use any of the below:importerror_parameters_calculatorerror_parameters_calculator.calculate_alpha()error_parameters_calculator.calculate_beta()error_parameters_calculator.calculate_population_mean()error_parameters_calculator.calculate_sample_mean()error_parameters_calculator.calculate_sample_size()error_parameters_calculator.calculate_sigma()