Saravanan666/pypi-org huggingface dataset:
Package: handwritten-image
HandwrittenFor those who are too lazy to write lectures by hand, oops, it's me. My own handwritten font is used here. Distance learning has dramatically increased the number of lectures that had to be written by hand. So I wrote this small program.ExampleHere is an example in English (left/top) and in Russian (right/bottom). English isn't my native language, so I write like a robot :)In Russian looks more real, at least the lecturer didn't notice.Getting startedInstall projectpip install handwritten-imageSetupfromhandwritten_imageimportHandWritehand=HandWrite()Convert to a handwritten imagesYou can easily convert your text to handwritten text using this methodhand.convert_to_image('your-text-file.docx')# or .doc and .txt fileSave directorySpecify the folder where you want to save the images usingsave_dirargument, if not specified, they will be saved to the current folderhand.convert_to_image('your-text-file.docx',save_dir='images')Random selectionIf you don't need random sampling from the text, you can specifyrandom_select=Falseargumenthand.convert_to_image('your-text-file.docx',random_select=False)Text file to editBefore converting to images, you may want to change the text (add brackets, remove extra characters, etc.). Ifedit=Trueit creates a txt file that you can edit and then use to create images.hand.to_txt('your-text-file.docx',edit=True)# or .doc and .txt fileNoteBefore converting the file to an image, remove thehand.to_txt()call, otherwise it will overwrite the file you editedAfter you edit the file, you can convert this filehand.convert_to_image('your-edited-file.txt',random_select=False)Random selectionYou also can specify therandom_select=Falseargument if you don't need a random selectionhand.to_txt('your-text-file.docx',random_select=False)Save folderDefault folder to save in your script folder and default file name istemp.txt. Specifysave_pathargumentwithfile type if you want to change the namehand.to_txt('your-text-file.docx',save_path='your-folder/file.txt')
Package: handwritten-signature-verification
handwritten-signature-verificationArgument passed are image1, image2 & modelname(VGG16, ResNet, AlexNet) to return match/unmatch.[incomplete]Handwritten Signature Verification is the demonstration library for matching 2 signature images on perticulary dataset.DisclaimerMay not be used for production.Homepage:https://github.com/eryash15/handsignverifyWebsite of Gesis:https://pypi.org/project/handwritten-signature-verification/0.0.3/#descriptionInstallationYou have multiple options for the installation on your local machine.If you want to become a contributor in this library and you want to apply changes or add new functions to the library you can take a look on the development guide from the website.
Contact me ateryash15@gmail.com.If you just want to install the library on your system to work with it, you can do so with:$ pip install handwritten-signature-verification=0.0.3TutorialsIf you are new to this library and you want to learn about how to use the included methods or you want to learn how they work you can use the tutorials. For a short description of the different tutorials you can find more information in the tutorial READMETutorial README. If you want to test the tutorials right now you can click on the binder badge on top of this README.md to open the tutorials in the Gesis Notebooks.Hereyou get to the tutorial folder.$ from handsignverify import model
    $ model.match_sign(path_img1,path_img2)Current StateThe face2face toolbox at its current state is an alpha version. If you find any bugs or you have suggestions about how to extend the toolbox with useful new functionalities please let us know by creating a new issue thread on ourGitHub Pageor contribute a fix or additional methods by yourself as described in the developer guide in the online documentation.
Package: handy
A collection of different tools, shortcuts, decorators, form and model fields
to make your django life easier.Installationpip install handyOverviewHere are quick overview of what you can do with handy.
You can also readfull docs.AvoidHttpResponseandrender_to_response()biolerplate with@render_to()decorator.
This one will render result dict to'app_name/foo.html':@render_to()deffoo(request):return{'bar':Bar.objects.all()# You can easily override default template, content type,# status code and add cookies to response:'STATUS':410,'CONTENT_TYPE':'text/plain'}Easy JSON responders with@render_to_json()decorator:@render_to_json()defposts_by_tag(request,tag=None):posts=Post.object.values().filter(tag=tag)returnlist(posts)And higher order@ajaxdecorator to handle more complex asynchronous actions:@ajax@ajax.login_required@ajax.catch(Post.DoesNotExist)defenable_post(request):post=Post.objects.get(pk=request.GET['id'])ifpost.author!=request.user:raiseajax.error('permission_denied')post.enabled=Truepost.save()Send emails rendered from templates:render_to_email(article.author.email,'approved.html',{'article':article})A collection of model fields with accompanying form fields and widgets. Most notably different array fields to store array of values or choices:DAYS=zip(range(7),'Sun Mon Tue Wed Thu Fri Sat'.split())classCompany(models.Model):phones=StringArrayField('Phone numbers',blank=True,default=lambda:[])workdays=IntegerArrayField('Work days',choices=DAYS)company=Company(phones=['234-5016','516-2314'],workdays=[1,2,3,4])company.save()In model formphonesfield would be represented asCommaSeparatedInputandworkdaysas multiple checkboxes:classCompanyForm(forms.ModelForm):classMeta:model=CompanyA handy@cached_propertyutility:classUserProfile(models.Model):phones=models.ManyToManyField(Phone)...@cached_propertydefpublic_phones(self):# this queryset will be constructed only once, thanks to @cached_propertyreturnself.phones.filter(public=True)A bunch of database querying utilities to not tinker withcursor()anymore:best_offer=fetch_val('select max(value) from offers where ...')forrowinfetch_named('select * from blog_post'):printrow.id,row.titleAnd a middleware to make your html output slimmer by stripping out unnecessary spaces:MIDDLEWARE_CLASSES=(...'handy.middleware.StripWhitespace',)And more:simple logger wrap upCommaSeparatedInputandMultilineInputwidgets for array fieldsJSONField,AdditionalAutoFieldandBigAutoFieldand a bunch of database, email, text and debugging utilitiesNOTE: functional tools, namely@memoizeand@cache, moved tofuncyHow you can helpgive me any feedback. What bits are most useful? What can be added or changed?bring your ideas and/or code that can make all our django experience more funTODOdocs for text and just utilsadd support for querysets and models in JSON decorators
Package: handy-archives
Some handy archive helpers for Python.DocsTestsPyPIAnacondaActivityQAOtherInstallationhandy-archivescan be installed from PyPI or Anaconda.To install withpip:$python-mpipinstallhandy-archivesTo install withconda:First add the required channels$condaconfig--addchannelshttps://conda.anaconda.org/conda-forge$condaconfig--addchannelshttps://conda.anaconda.org/domdfcodingThen install$condainstallhandy-archives
Package: handy-dandy
Handy DandyA collection of handy programs for your python project.Output validatorHandy dandy's validate decorator can make sure that
functions return the type that you want them to.fromhandy_dandyimportvalidatorasval@val.string# expecting function to return stringdeffoo(x):returnxy=foo(5)TimerRecords how long a function takes to run.fromhandy_dandyimporttimer@timerdeffoo():passSystemsystem function. Returns the computer's os (win32, win64, mac, linux).RecorderRecords the amount of times it has been ran. This can be helpful when you want to see how many times multiple functions have been ran durring the program.>>>fromhandy_dandyimportRecorder>>>x=Recorder('f','s')>>>x.click('f')1>>>x.clicks(){'f':1,'s':0}>>>x.click()>>>x.clicks(){'f':2,'s':1}DesignI made a bunch of text design programs for this package, inspired bythis. They're really self-explanitory, so i'll just give a list of the function names:scroll_clear()underline(text, color='white')bold(text, color='white')italic(text, color='white)color(text, color)ascii(text)p
Package: handy-decorators
Handy DecoratorsThis is a set ofhandy decoratorswhich one can use for their day-to-day life coding.Installation MethodInstall it via pippipinstallhandy-decoratorsDescriptionThe set of decorators contain some daily needed decorators for being used in our day to day coding life. This has following set of decorators.trycatchThis decorator surounds your function with atry-exceptblock and if your code/function raises an exception, it's caught by this decorator and reported by logging.>>>fromdecoratorsimporttrycatch>>>@trycatch...deffunc():...print(0/0)# Division by 0 must raise exception...>>>func()Exceptionoccurred:[integerdivisionormodulobyzero]>>>timerThis decorator will calculate a time required in seconds by your function for execution.>>>fromdecoratorsimporttimer>>>@timer...defa():...importtime...print('Hi')...time.sleep(1)...>>>a()HiTimetakenbythefunctionis[1.00103902817]sec>>>singletonThis decorator is for making your classsingleton.The features given by this decorator are:If instances of same class are created withsameargs and kwargs, decorator will return previously existing instanceIf instances of same class are created withdifferentargs and kwargs, decorator will create a different one for you and store the newly created instance>>>fromdecoratorsimportsingleton>>>>>>@singleton...classA:...def__init__(self,*args,**kwargs):...pass...>>>>>>a=A(name='Siddhesh')>>>b=A(name='Siddhesh',lname='Sathe')>>>c=A(name='Siddhesh',lname='Sathe')>>>aisb# has to be differentFalse>>>bisc# has to be sameTrue>>>Please create an issue if more decorators are needed.
Package: handyderivatives
handyderivativesPyPi linkA command line program to do some differential calculus.
This is essentially a wrapper for some ofSymPy'scalculus tools.Here is SymPy's calculus documentation.Right now it has the functionality listed below.Differentiate elementary functions.Get the gradient of a scalar field.Installationpip3 install handyderivativesRunning itTo get the derivatives for an arbitrary number of functions of a single variable.handyderivatives -d 'f(x) = x ^ 2' 'g(x) = sin(x) + 2 * x'To get the gradient for an arbitrary number of scalar functions.handyderivatives -g 'f(x,y,z) = ln(x / (2 * y)) - z^2 * (x - 2 * y) - 3*z'Or run that with one command.handyderivatives -d 'f(x) = x ^ 2' 'g(x) = sin(x) + 2 * x' -g 'f(x,y,z) = ln(x / (2 * y)) - z^2 * (x - 2 * y) - 3*z'To differentiate a list of functions in a file and output that to a LaTeX document.handyderivatives --latex -f functions.txt
handyderivatives -l -f functions.txtThe-lflag can also be used in the earlier examples.Helpusage: handyderivatives [-h] [--input-file FILE] [--latex] [--diff [DIFFERENTIAL [DIFFERENTIAL ...]]] [--gradient [GRADIENT [GRADIENT ...]]]

Command line differential calculus tool using SymPy.
Try running:
handyderivatives -l -g 'f(x,y) = sin(x) * cos(y)'

optional arguments:
  -h, --help            show this help message and exit
  --input-file FILE, -f FILE
                        Input file
  --latex, -l           Compile a LaTeX document as output
  --diff [DIFFERENTIAL [DIFFERENTIAL ...]], -d [DIFFERENTIAL [DIFFERENTIAL ...]]
                        Works for equations written in the form  'f(x) = x ^2'
  --gradient [GRADIENT [GRADIENT ...]], -g [GRADIENT [GRADIENT ...]]
                        Works for scalar functions written in form  'f(x,y,z) = x ^2 * sin(y) * cos(z)'How the input file should be formattedEdit a file that has functions listed one per line.
The left hand side should be what your function will be differentiated with respect to, i.ef(x).
The right hand side will be the expression.# This is how the file for the argument -f should be formatted.

c(x) = r * (cos(x) + sqrt(-1) * sin(x))
a(t) = 1/2 * g * t ** 2
f(x) = sin(x**2) * x^2
h(w) = E ^ (w^4 - (3 * w)^2 + 9) # Capital E is interpreted by SymPy as the base of the natural log.
g(x) = exp(3 * pi)               # So is exp(x), but written as a function taking an argument.
p(j) = csc(j^2)If you don't format it like that you will likely run into errors.
You  can add comments.
Package: handy-dict
Handy DictA library with some handy utils to deal with dictionaries that contain arraysThis file will become your README and also the index of your documentation.Installpip install handy-dictHow to useLet's start with a dictionarypikachu={"name":"pikachu","moves":[{"move":{"name":"mega-punch","url":"https://pokeapi.co/api/v2/move/5/"}},{"move":{"name":"pay-day","url":"https://pokeapi.co/api/v2/move/6/"}},{"move":{"name":"thunder-punch","url":"https://pokeapi.co/api/v2/move/9/"}}],"stats":[{"base_stat":90,"effort":2,"stat":{"name":"speed","url":"https://pokeapi.co/api/v2/stat/6/"}},{"base_stat":50,"effort":0,"stat":{"name":"special-defense","url":"https://pokeapi.co/api/v2/stat/5/"}}]}apply_keyedfromhandy_dictimportapply_keyedWithhandy-dictyou can apply a function to the keys inside a dictionary, say you want to takenameout ofstat,  go from something like this:{"base_stat":50,"effort":0,"stat":{"name":"special-defense","url":"https://pokeapi.co/api/v2/stat/5/"}}to this:{"base_stat":50,"name":"special-defense"}The functiontransform_statis just a little helper that will transform thestatsarray in ourpikachudictionary and return a new array, that will replace thestatsin a copy of the original dict:deftransform_stat(stat_array):return{stat["stat"]["name"]:stat["base_stat"]forstatinstat_array}modified_pikachu=apply_keyed(pikachu,["stats"],transform_stat)modified_pikachu["stats"]{'speed': 90, 'special-defense': 50}return_keyedfromhandy_dictimportreturn_keyedhandy-dictalso makes it easy to return multiple values from a dictionary, iterating through keys and arrays:return_keyed(pikachu,["moves","move","name"])['mega-punch', 'pay-day', 'thunder-punch']
Package: handy-library
HandyLibraryA library that makes it very convenient to perform standard actions in PythonInstallationUsing PyPIThe latest stable release is available on PyPI, and you can install it by sayingpython -m pip install handy-libraryExampleExample of configuring automatic creation ofconfig.jsonfrom handylib.tools import ConfigLoader

cl = ConfigLoader()
cl.load_config("config.json", [cl.ConfigParam('test', value=[1, 2, 3], description="Params", value_type=list)])Theconfig.jsonfile that resulted from the output{
    "test_1_description": "Params",
    "test_1": [1, 2, 3],
    "test_2": 0.123,
    "test_3": true
}
Package: handy-log
AimMake the log system easier to use, by simply:import log

log.info("Hello handy-log!")FeaturesWhile the builtinlogging.info(msg)uses therootlogger to record message,log.info(msg)can usecurrent module's logger.  Here,current modulemeans
the module inside which you invoked thelog.info(msg).
You don't have to code like this any more:import logging

logger = logging.getLogger(you_package_name)

logger.info(your_msg)A bunch of predefined formats, handlers, loggers.Easy to config, and easy to invoke.MechanismThis is a wrapper for python builtinloggingsystem.Load yaml to dict, then use thelogging.config.dictConfig(config_dict)to configure the logging system.When you invokelog.info(msg),handy-logwill first findcurrent module's logger,
and then use thisloggerto log the message.Configuration/How to useOption 1:Do nothing, use the default configuration. Justimport logand use it.Option 2:Create your ownhandy-log.yamlin yourcurrent work directory.Then justimport logand use it.Option 3:Create your own yaml configuration file.Invokelog.init(your_config_file)to configure the logger.This will mergeyour_config_file's content with the builtinhandy-log.yamlfirst,
then apply the merged configuration to the builtin logging system.Thenimport logand use it.Notes:Since the root logger can only be initialized once,
you should invokelog.init()before any other logger configuration takes effect.In the configuration file, loggers and handlers have their independentlogging level,
The message needs to pass through all theselevelto be recorded.
Package: handyman
HandymanCommon utility framework for ML ServicesInstallTo install the handyman library, please use the following command in case ofpip:pip install handymanOr add handyman as a poetry dependency.handyman = 0.3.5Requires Python 3.7 or greaterUsageThe handyman library currently consists of the following packages:exceptionsiojson_utilslogprometheussentrycryptoeventsTo use any of the packages stated above, please use:fromhandymanimport<packagename>Crypto ModuleFull example of new client onboarding to encryption/decryption to deletion of the clientGenerate data key for client (onboarding)fromhandyman.cryptoimportgenerate_new_data_key# Random client uuid for example usage purposeclient_uuid='6a624995-a0f4-43e1-b331-1716457962ce'# Generate data key for new client (while onboarding)generate_new_data_key(client_uuid)# Output - ('vault:v1:tXZ4nHIs3G8xhbLWMuMM8kzdLDgG7pr8B/uyNTz8svK2maNFZM8tkwU/ribGQQO6/5K7Pg2TeOSLia2b', None)# Store the variable for example usage purposeencrypted_data_key='vault:v1:tXZ4nHIs3G8xhbLWMuMM8kzdLDgG7pr8B/uyNTz8svK2maNFZM8tkwU/ribGQQO6/5K7Pg2TeOSLia2b'Encrypt data with newly created clientfromhandyman.cryptoimportencrypt_string# Encrypt plaintextencrypt_string("hello world",client_uuid,encrypted_data_key)# Output - ('GICD7oOmX0KbaBzeqzvOxtmK2ntjRH7kiFMmgKH8F6FYbvibASCM', None)# Store the variable for example usage purposeencrypted_data='GICD7oOmX0KbaBzeqzvOxtmK2ntjRH7kiFMmgKH8F6FYbvibASCM'Decrypt data with the same clientfromhandyman.cryptoimportdecrypt_base64_string# Decrypt data (2nd return parameter is an exception if any)decrypt_base64_string(encrypted_data,client_uuid,encrypted_data_key)# Output - (b'hello world', None)# Decrypt data to string (2nd return parameter is an exception if any)decrypt_base64_string(encrypted_data,client_uuid,encrypted_data_key,decode_to_str=True)# Output - ('hello world', None)Delete client (offboarding)fromhandyman.cryptoimporttransit_delete_key# Delete client (offboarding)transit_delete_key(client_uuid)Events ModuleThe purpose of this module is to seamlessly integrate usage of event driven systems for python codebases.Example usage -fromhandyman.eventsimportsend_messages,Events,use_credentials# Set custom aws credentials (from env/file)use_credentials("<aws_access_key_id>","<aws_secret_access_key>","<aws_region>")# Send messages(success,failed_messages),err=send_messages('<queue_name>',["hello","world"],Events.<event_type>)# success - bool# failed_messages - messages failed to send with message id# err - Exceptions capturedTo send a cost event:importhandyman.eventsaseventsevents.send_cost_event(events.Service.ASR,events.Vendor.GOOGLE,"client_uuid","flow_uuid","call_uuid","conversation_uuid")# if you want to count single event as multiple hitsevents.send_cost_event(events.Service.ASR,events.Vendor.GOOGLE,"client_uuid","flow_uuid","call_uuid","conversation_uuid",num_hits=2)PublishCreate a distribution package:python setup.py sdistPublish to PyPi:pip install twine

twine upload dist/*You will be prompted to enter username and password, if you don't have credentials contact@devops.
Package: handyscope
Handyscope provides a Python interface to the mobile USB-oscilloscopes made by TiePie.This package is inspired bypython-libtiepieand acts as an alternative. The main differences are the following:python-libtiepiehas some constants defined, which can be used to set properties like signal type. However, the user needs to know the names of these constants and they cannot be printed due to actually being numerical (binary) values. Inhandyscope, the values are given as strings and an overview of the available strings is provided in an additional property.The error check is performed automatically after every method call.More easier way of opening of devices.Example of setting and getting the signal type inpython-libtiepie:# Set the signal type to triangle
gen.signal_type = libtiepie.ST_TRIANGLE
# Prints 0x00000010
print(gen.signal_type)Example of setting and getting the signal type inhandyscope:# Prints the tuple ('sine', 'triangle', 'square', 'DC', 'noise', 'arbitrary', 'pulse')
print(gen.signal_types_available)
# Set the signal type to triangle
gen.signal_type = "triangle"
# Prints "triangle"
print(gen.signal_type)Example of opening a generator device from thepython-libtiepierepository:import libtiepie

# Search for devices:
libtiepie.device_list.update()

# Try to open a generator:
gen = None
for item in libtiepie.device_list:
    if item.can_open(libtiepie.DEVICETYPE_GENERATOR):
        gen = item.open_generator()
        if gen:
            breakExample of opening a generator device usinghandyscope:from handyscope import Generator

gen = Generator("HS5")FeaturesUseslibtiepieProvides access to oscilloscope, signal generator and I2C interface featuresWorks with Windows and LinuxInstallationTo install the Handyscope Interface, run this command in your terminal:$ pip install handyscopeNote that usage in Windows will require theTiePie USB driver
version 8.1.9UsageExample for using an oscilloscope device:from handyscope import Oscilloscope
# To initialize as HS3 oscilloscope device
osc = Oscilloscope("HS3")
# Set the range of the channels to 4 Volts
osc.channels[0].range = 4
osc.channels[1].range = 4
# Set the trigger kind to rising edge
osc.channels[0].trig_kind = "rising"
# Enable the trigger
osc.channels[0].trig_enabled= True
# Disable the trigger timeout
osc.trig_timeout = -1
# Set record length and sampling frequency
osc.record_length = 62500
osc.sample_freq = 100000
# Start measuring and get the data
data = osc.measure()Example for using a generator device:from handyscope import Generator
# To initialize as HS3 generator device
gen = Generator("HS3")
# Set the signal type to a sinus wave
gen.signal_type = "sine"
# Set the amplitude to 2 Volts
gen.amplitude = 2
# Set the frequency to 100 Hz
gen.freq = 100
# Enable the output
gen.is_out_on = True
# Start the generator
gen.start()
Package: handythread3
Acknowledgement to original python 2 of handythread inhttps://github.com/scipy/scipy-cookbook/blob/master/ipython/attachments/Multithreading/handythread.pysimple code snippetfromhandythreadimportforeacharray_to_update=list(range(10))deff(x):array_to_update[x]+=1print(x)time.sleep(0.2)foreach(f,range(10))
Package: handy-utils
Handy PythonCollection of handy utils for Python.Usagepipinstallhandy-utilsfromhandy_utilsimportxxxFeaturesMapReduce on local hostDecorators@attrs: Add attributes to a function/method.@acceptsand@returns: Enforce function argument and return types.@singleton: Define a class with a singleton instance.Regex patternsRegex pattern of Chinese charactersFind Chinese characters in a stringRegex pattern of float numbersFloat number validationRegex pattern of IPv4 addressesIPv4 address validationRegex pattern of email addressesEmail address validationRegex pattern of HTML elements or tagsHTML element or tag validationRegex pattern of domain names (English, Chinese)Domain name validation (English, Chinese)Regex pattern of color RGB hexColor RGB hex validationPassword strength validationRegex pattern of license plate (Chinese mainland, Hongkong)License plate validation (Chinese mainland, Hongkong)Regex pattern of WeChat (Wexin) IDWeChat (Wexin) ID validationRegex pattern of QQ number (ID)QQ number (ID) validationRegex pattern of Chinese telephone numberChinese telephone number validationRegex pattern of Chinese ID numberChinese ID number validationScriptsRun a GUI (based on Tcl/Tk) for RE (regular expression)python-mhandy_utils.re_tkLicenseApache License 2.0