Saravanan666/pypi-org huggingface dataset:
Package: python-timekit
python-timekitThis package can be used to integration Timekit APIs with your project.
for more informationclick hereInstallationRun the following to installpipinstallpython_timekitUsagefromtimekit.clientimportTimekitAPIclient=TimekitAPI(app_token="<you_api_key>")response=client.apps.get()# Response data from timekitresponse.data# Response status code from timekitresponse.statusEndpoints AvailableAppresponse=client.apps.get()response=client.apps.invite(data)for more information on App related APIsclick hereBookingresponse=client.bookings.create(data,dynamic_includes)response=client.bookings.list(limit,page,dynamic_includes,search,order_by,sorted_by)response=client.bookings.retrieve(id)response=client.bookings.update_state(id,action)response=client.bookings.update_meta(id,data)response=client.bookings.reschedule(id,data)response=client.bookings.create_in_bulk(data)response=client.bookings.update_in_bulk(data)response=client.bookings.groups.list(limit,page,search)response=client.bookings.groups.retrieve(id)response=client.bookings.delete(id)for more information on Booking related APIsclick hereProjectresponse=client.projects.create(data)response=client.projects.list(limit,page,search)response=client.projects.update(id,data)response=client.projects.create(data)response=client.projects.delete(id)response=client.projects.add_resources(id,data)response=client.projects.set_resources(id,data)response=client.projects.remove_resources(id,resource_id)response=client.projects.get_resources(id)for more information on Project related APIsclick hereResourceresponse=client.resources.create(data)response=client.resources.list(limit,page,search)response=client.resources.retrieve(id,dynamic_includes)response=client.resources.update(id,data)response=client.resources.delete(id)response=client.resources.availability_constraints(id,data)for more information on Resource related APIsclick hereAvailabilityresponse=client.availability.list(data)for more information on Availability related APIsclick here
Package: python-timeout
TimeoutRandom timeout between minimum and maximum valuesInstallation:pip install python-timeoutUsage:from timeout import random_timeout, sleep

random_timeout(10, 20) # Random timeout between 10 and 20 seconds
random_timeout(from_minutes=1, to_minutes=2) # Random timeout between one and two minutes
random_timeout(from_hours=1, to_hours=2) # Random timeout between one and two hours
random_timeout(from_days=3, to_days=7) # Random timeout between one and two hours
random_timeout(1) # Random timeout for around one second
random_timeout(from_hours=1) # Random timeout for around one hour

sleep(5) # Sleep for five seconds
sleep(minutes=15) # Sleep for fifteen minutes
sleep(hours=2) # Sleep for two hours

from timeout import sleep_timer

during_active_time = sleep_timer('8am', '10pm').during_active_time
if during_active_time(): # Only active between certain time range
    run()
Package: pythontk
PYTHONTK (Python Toolkit)pythontk is a collection of backend utilities for Python.Installation:To install:
Add thepythontkfolder to a directory on your python path, or
install via pip in a command line window using:python -m pip install pythontkExample use-case:importpythontkasptkptk.filter_list([0,1,2,3,2],[1,2,3],2)# Returns: [1, 3]ptk.filter_dict({1:'1','two':2,3:'three'},exc='t*',keys=True)# Returns: {1: '1', 3: 'three'}
Package: python-tkdnd
tkinterDnDA nice and easy-to-use wrapper around the tkdnd package. No tcl installation, no build is required,just install and use it!InstallThe Pypi name is python-tkdnd, because tkinterDnD was already taken, but you can import the package astkinterDnDpip3 install python-tkdndor if you're using a distro like Windows 7, 10, or 11 replacepip3withpipCreditsCopyright (c) 2021 rdbende
Copyright (c) 2012-2020 Petasis - the tkdnd package
Copyright (c) 2020 Philippe Gagné - for Mac binaries
Copyright (c) 2017 Michael Lange - the TkinterDnD packageLittle exampleimporttkinterastkfromtkinterimportttkimporttkinterDnD# Importing the tkinterDnD module# You have to use the tkinterDnD.Tk object for super easy initialization,# and to be able to use the main window as a dnd widgetroot=tkinterDnD.Tk()root.title("tkinterDnD example")stringvar=tk.StringVar()stringvar.set('Drop here or drag from here!')defdrop(event):# This function is called, when stuff is dropped into a widgetstringvar.set(event.data)defdrag_command(event):# This function is called at the start of the drag,# it returns the drag type, the content type, and the actual contentreturn(tkinterDnD.COPY,"DND_Text","Some nice dropped text!")# Without DnD hook you need to register the widget for every purpose,# and bind it to the function you want to calllabel_1=tk.Label(root,textvar=stringvar,relief="solid")label_1.pack(fill="both",expand=True,padx=10,pady=10)label_1.register_drop_target("*")label_1.bind("<<Drop>>",drop)label_1.register_drag_source("*")label_1.bind("<<DragInitCmd>>",drag_command)# With DnD hook you just pass the command to the proper argument,# and tkinterDnD will take care of the rest# NOTE: You need a ttk widget to use these argumentslabel_2=ttk.Label(root,ondrop=drop,ondragstart=drag_command,textvar=stringvar,padding=50,relief="solid")label_2.pack(fill="both",expand=True,padx=10,pady=10)root.mainloop()
Package: python-tldap
TLDAP is a high level LDAP library for Python that uses Ecto like models
to define LDAP schemas that can then be used in an easy way from Python code.
It also supports fake LDAP transactions, to try and ensure LDAP database
remains in a consistent state, even if there are errors that cause the
transaction to fail.Documentation can be found athttp://python-tldap.readthedocs.org/
Package: python-tlsh
TLSH - C++ extension for PythonTLSH (Trend Micro Locality Sensitive Hash)is a fuzzy matching library.
Given a byte stream with a minimum length of 50 bytes
TLSH generates a hash value which can be used for similarity comparisons.
Similar objects will have similar hash values which allows for
the detection of similar objects by comparing their hash values.  Note that
the byte stream should have a sufficient amount of complexity.  For example,
a byte stream of identical bytes will not generate a hash value.What's new in py-tlsh 4.5.0This package was created as an unofficial fork, but is currently superceded by the officialpy-tlshpackage as of December 2020.
The improvements are:fixed this package so that it works on Windowscompatibility with VirusTotal adoption of TLSH: updated to the T1 hash format with backwards compatibility for old hashesfixed the q3=0 divide by zero bugissue 79Usageimporttlshtlsh.hash(data)Note data needs to be bytes - not a string.
This is because TLSH is for binary data and binary data can contain a NULL (zero) byte.In default mode the data must contain at least 50 bytes to generate a hash value and that
it must have a certain amount of randomness.
To get the hash value of a file, trytlsh.hash(open(file,'rb').read())Note: the open statement has opened the file in binary mode.Exampleimporttlshh1=tlsh.hash(data)h2=tlsh.hash(similar_data)score=tlsh.diff(h1,h2)h3=tlsh.Tlsh()withopen('file','rb')asf:forbufiniter(lambda:f.read(512),b''):h3.update(buf)h3.final()# this assertion is stating that the distance between a TLSH and itself must be zeroasserth3.diff(h3)==0score=h3.diff(h1)Extra OptionsThediffxlenfunction removes the file length component of the tlsh header from the comparison.tlsh.diffxlen(h1,h2)If a file with a repeating pattern is compared to a file with only a single instance of the pattern,
then the difference will be increased if the file lenght is included.
But by using thediffxlenfunction, the file length will be removed from consideration.Backwards Compatibility OptionsIf you use the "conservative" option, then the data must contain at least 256 characters.
For example,importostlsh.conservativehash(os.urandom(256))should generate a hash, buttlsh.conservativehash(os.urandom(100))will generate TNULL as it is less than 256 bytes.If you need to generate old style hashes (without the "T1" prefix) then usetlsh.oldhash(os.urandom(100))The old and conservative options may be combined:tlsh.oldconservativehash(os.urandom(500))
Package: python-tmx
Python-tmxA python library based on lxml to help create, edit, and export tmx files quickly.InstallationInstall the latest version of the library using Pypi, note that lxml is required.pipinstall-Upython-tmxHow to useBasicsA tmx file is represented as atmxobject, containing aheaderand a list oftuobject. Each tu is then further divided intotuvobjects, each having a list ofrunobject representing text and the different tags available.
Further,header,tuandtuvobjects all have a list ofnoteandpropobjects.Every possible attribute defined by the spec is represented by an attibute of that object accesible using dot notation. so for example, if you want to change the 'creationtool' attribute of a tmx header you can simply do the following:tmx_file.header.creationtool="python-tmx"Simple UsageThe below snippet shocases how to make a multilingual tmx bilingual with very little effortfromtmx.structuralimporttmxfromtmximportload_tmxtmx_file:tmx=load_tmx("tmx-file.tmx")# Load a tmx file into memoryfortuintmx_file.tus:# loop through all tusforindex,tuvinenumerate(tu.tuvs):# loop through all tuviftuv.xmllangnotin["en-US","fr-FR"]:# check tuv languagetu.tuvs.pop(index)# remove tuv if not english or frenchtmx_file.export("new-tmx.tmx")# export now bilingual tmx object into a tmx file
Package: python-todo
Python-TodoA simple todo list CLI tool!Installationpip install python-todo(Python 3.6 or greater is currently required)Valid CommandsDefaultPrints out the current task list-a/--addPrompts user for task information and adds it to the task list-r/--removePrompts the user for a row ID to remove from the task list-f/--finishPrompts the user for a row ID to change to a finished state-u/--unfinishPrompts the user for a row ID to change to an unfinished state-c/--changePrompts the user for a row ID to change information for-v/--viewPrints out the current task list-h/--helpPrints out the valid commandsLicenseThis project is licensed under the MIT License - see theLICENSEfile for details. Python-Todo
Package: python-todo-comments
Python # TODO:This project provides a cli that takes a directory as an argument, and returns the# TODO:comments from all the python modules under that directory.It will output in a markdown-friendly way, and is meant as a repeatable way to keep on top of all of the little todos that are peppered throughout a project.Installationpip install python-todo-commentsUsageThe basic command ispy-todoscombined with the following arguments:No argument: will search and parse the current working directory-dor--dirwill search and parse the directory provided-oor--outputwill write the output to the provided filename-hor--helpwill provide the command's help context
Package: python-todopago
python-todopagopython-todopago is a library based on the TodoPagos's Python-SDK. The main purpose of this library is to provide a friendly and pythonic way to consume TodoPagos's services, usingzeepas soap client andrequestsfor rest client.InstallationUse the package managerpipto install python-todopago.pipinstallpython-todopagoUsageimportpython_todopago# initialize connector classconnector=TodoPagoConnector("PRISMA A793D307441615AF6AAAD7497A75DE59",# token2159,# merchant idsandbox=True,)# authorize operationauthorization=connector.authorize_operation(success_url="http://example.com/success/",failure_url="http://example.com/failure/",operation_id="ABC",currency=32,amount=2.00,city="Cordoba",country_code="AR",state_code="D",billing_first_name="Juan",billing_last_name="Lopez",billing_email="test@gmail.com",billing_phone="+543513840243",billing_postcode="5000",billing_address_1="Arrayan 8958",billing_address_2=None,customer_id="1",customer_ip_address="192.168.0.1",items=items,# List[Item])# get operation statusstatus=connector.get_operation_status("1fb7cc9a-14dd-42ec-bf1e-6d5820799642",# request key"44caba31-1373-4544-aa6b-42abff696944",# answer key)ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseThis software is distributed under the MIT licence. See LICENCE for details.Copyright (c) 2021-2022 Juan Pablo Sennjuanpsenn@gmail.com
Package: python-toggl
toggl-python-api-clientTogglis an “insanely simple time tracking”
service.This specific library is a Python-based REST client to interface with
the Toggle API utilizingrequests.This library is a pure api client to help other python apps interface
with Toggl. I created this project primarily to help with a bigger
internal project that I am doing at work while at the same time getting
my feet wet in Python.Others out thereThere is already a similar library,toggl_targetthough it
is more of an application and the client api is not separate repo. Some
ideas/concepts on the client api were taken from there but I had needed
a client api only to help interface with my bigger app.UsagePypi Packagepip install python-togglManual installationDownload to a location of your choice and do the following.fromtoggl.api_clientimportTogglClientApisettings={'token':'xxx','user_agent':'your app name'}toggle_client=TogglClientApi(settings)response=toggle_client.get_workspaces()DependenciesPython 2.7 onwardsrequestsTests DependenciesTo run the tests, you will need the following packagesunittestjsonhttprettyTestsTests created under/testsare primarily integration tests and are
not strictly unit tests. They consists of an offline and online(live)
test.Offlinetests/tests_offline.pyThese tests are for the logic of the api client. They do not connect to
the actual Toggl servers - instead usehttprettyto mock the
responses. Sample responses are included intests/json_responsesand
are based on Toggle responses for V8 of the main api and V2 of the
report api.Online/Livetests/tests_live.pyThese tests are to check the connections to Toggl’s API and to ensure
that the client is handling the live responses from Toggl as expected.To avoid adding sensitive data to version control, no api credentials
have been included. To enable live tests, - make a copy oftests/tests_live_config.json.sampleastests/tests_live_config.json- update the settings ontests/tests_live_config.jsonas needed
Package: pythontohtml
pythontohtml : python functions to HTMLUSAGEfrom pythontohtml.htmlTags import html, div, header, h1, italic

html(
    div(
        header(h1("This is Header",id="main-header",className="header")),

        div(italic(("Let`s try this!"))),

        id="main-container",
        other_attr={
            "data-id" : 23
        },
    ),
    title="Testing..."
)
Package: python-to-latex
Python to LaTeXThis is a module provides several method to parse data from Python to LaTeX.Author:Sonja StuedliInstallationpip install --upgrade python_to_latexUsage examples:Below there are some small examples how to use the provided functions. Detailed explanation of each function can be found by usingimport python_to_latex as p2l
  help(p2l.<function_name>)Printing a matrix:importpython_to_latexasp2limportnumpyasnpmat2lat(np.eye(2),matrix_style='bmatrix')This will print the code block below and return the string to produce it.\begin{bmatrix}1&0\\0&1\\\end{bmatrix}Printing table output:importpython_to_latexasp2lnumeric_list_to_tabularx([[1,2,3],[4,5,6]],heading=['A','B','c'])The above code will print the code block below and return the string to produce it.\begin{tabularx}{\linewidth}{S[table-auto-round,table-omit-exponent,fixed-exponent=0]S[table-auto-round,table-omit-exponent,fixed-exponent=0]S[table-auto-round,table-omit-exponent,fixed-exponent=0]}\toprule{A}&{B}&{C}\\\midrule1&2&3\\4&5&6\\\bottomrule\end{tabularx}Saving a matplotlib figure:importpython_to_latexasp2limportnumpyasnpimportmatplotlibimportmatplotlib.pyplotaspltx=np.arange(15)y1=2*xy2=x+5y3=xfig1,plt1=plt.subplots(nrows=1,ncols=2)plt1[0].plot(x,y1)plt1[0].plot(x,y2,'.',label="line a")plt1[1].plot(x,y3,label="line 1")plt1[0].set_ylabel('$\lambda_2$')plt1[1].set_xlabel('$b$')plt1[1].set_ylabel('$\lambda_N$')plt1[1].set_xlabel('$N$')plt1[0].legend(loc=1)plt1[0].set_label("test")fig1.show()fig2pgf(fig1,"test",retain_color=True,retain_linestyle=True)The code above generates a simgle matplotlib figure and then saves that figure in PGF format in a file called test.tikz. The saved file can be loaded in LaTex.
Package: python-toolbox
The Python Toolbox is a collection of Python tools for various tasks. It
contains:python_toolbox.caching: Tools for caching functions, class instances andproperties.python_toolbox.cute_iter_tools: Tools for manipulating iterables. Addsuseful functions not found in Python’s built-initertools.python_toolbox.context_management: Pimping up your context managers.python_toolbox.emitting: A publisher-subscriber framework that doesn’tabuse strings.And many,manymore! The Python Toolbox contains100+useful
little tools.Documentation:http://python-toolbox.readthedocs.ioPython Toolbox on GitHub:https://github.com/cool-RR/python_toolboxPython Toolbox on PyPI:https://pypi.python.org/pypi/python_toolboxTestsTest can be run by running the_test_python_toolbox.pyscript that’s
installed automatically with the Python Toolbox.Whenpython_toolboxisn’t installed, you may runpytestat the repo
root to run the tests.The Python Toolbox was created by Ram Rachum. I provideDevelopment services in Python and Django.
Package: python-toolkit-vald3nir
Python-ToolkitCollection of utility scripts for developing Python projectsOverviewsrc
├── __init__.py
└── toolkit
    ├── database
    │   ├── firebase
    │   │   ├── firebase.py
    │   │   └── __init__.py
    │   ├── __init__.py
    │   ├── json
    │   │   ├── collectionDB.py
    │   │   └── __init__.py
    │   └── mongodb
    │       ├── __init__.py
    │       ├── mongo_api.py
    │       └── mongo_dao.py
    ├── __init__.py
    ├── protocols
    │   ├── __init__.py
    │   └── mqtt.py
    └── utils
        ├── backup_utils.py
        ├── converter_utils.py
        ├── dataset_utils.py
        ├── date_utils.py
        ├── __init__.py
        ├── io_utils.py
        └── string_utils.pyDonwload Libhttps://pypi.org/project/python-toolkit-vald3nir/
Package: pythontools
Python ToolsPython Tools provides several utility functions and tools that can be used in Python projects.This is mainly a dependency for my own packages and projects but they may be useful to others.autovenv provides function to automatically manage a virtual env (creation, update, ...)env provides environment related functions such as set_env that creates a context in which the environment can be changed.gitlab provides functions to communicate with a GitLab server through its REST API.pathutils provides path handling functions such as the chdir context function.
...ContributingSetup your enviroment:python3-mvenv./venv
../venv/bin/activate
python-mpipinstall--upgradepip
python-mpipinstall-r./requirements-dev.txtRun tests:python-mpytesttests--cov=pythontools
Package: python-tools-scripts
Python Tools ScriptsThis is a tool, similar toinvoke.
It's more recent and usesargparseunder the hood
and some additional magic to define the CLI arguments.To use it, you must have atoolspackage in your repository root.
On yourtools/__init__.pyimport your scripts andPython Tools Scriptswill add them to it's CLI.An Example Scripttools/vm.py"""These commands are used to create/destroy VMs, sync the local checkoutto the VM and to run commands on the VM."""fromptscriptsimportContext,command_group# Define the command groupvm=command_group(name="vm",help="VM Related Commands",description=__doc__)@vm.command(arguments={"name":{"help":"The VM Name","metavar":"VM_NAME","choices":list(AMIS),},"key_name":{"help":"The SSH key name.",},"instance_type":{"help":"The instance type to use.",},"region":{"help":"The AWS regsion.",},})defcreate(ctx:Context,name:str,key_name:str=None,instance_type:str=None,region:str="eu-central-1",):"""Create VM."""vm=VM(ctx=ctx,name=name)vm.create(region_name=region,key_name=key_name,instance_type=instance_type)@vm.command(arguments={"name":{"help":"The VM Name","metavar":"VM_NAME",},})defdestroy(ctx:Context,name:str):"""Destroy VM."""vm=VM(ctx=ctx,name=name)vm.destroy()The, on your repository root, run:❯ tools -h
usage: tools [-h] [--debug] {vm} ...

Python Tools Scripts

optional arguments:
  -h, --help   show this help message and exit
  --debug, -d  Show debug messages

Commands:
  {vm}
    vm         VM Related Commands

These tools are discovered under `<repo-root>/tools`.❯ tools vm -h
usage: tools vm [-h] {create,destroy} ...

These commands are used to create/destroy VMs, sync the local checkout to the VM and to run commands on the VM.

optional arguments:
  -h, --help            show this help message and exit

Commands:
  {create,destroy}
    create              Create VM.
    destroy             Destroy VM.
Package: python-toolz
python-toolz v0.1.7Zguillez| Guillermo de la IglesiaPython helpersGetting StartedInstallpip install --upgrade python-toolzUsagefrom python_toolz import helper as ztools

ztools.log("test")db = ztools.database({
    'conn': os.environ['DB_HOST'],
    'database': os.environ['DB_NAME'],
    'user': os.environ['DB_USER'],
    'password': os.environ['DB_PASS']
})
data = db.sql("SELECT id, name FROM template ORDER BY id ASC LIMIT 0,5")
db.close()
print(data[0])data = db.dict("SELECT id, name FROM template ORDER BY id ASC LIMIT 0,5", ['id', 'name'])
db.close()
print(data[0]['name'])Contributing and issuesContributors are welcome, please fork and send pull requests! If you have any ideas on how to make this project better
then please submit an issue oremailme.License©2023 Zguillez.IOOriginal code licensed underMITOpen Source projects used within this
project retain their original licenses.Changelogv0.1.0 (February 11, 2023)Initial commit
Package: python-topcmd
InstallationThe module, topis requires pandas, math and sys modules to function
This module is used to print the score and rank after using TOPSIS (Technique for Order Preference based on Similarity to Ideal Solution)Usages: python-topcmd$pipinstallpython-topcmd
$python-topcmdmyData.csv“1,2,1,1”“+,+,-+”LicenseMITAuthorSahil Ahuja
Package: python-topic-model-preprocessor
Topic-Model-Preprocessor=======================### IntroductionThis project is designed for facilitating preprocessing of text corpus for any topic modeling algorithms.Written by Zhiya Zuo, 2017 July.### Changelog- 01-16-2018. Make the package compatible with python2 and python3. However, I only tested it on Python 3.6.4 on macOS High Sierra at this moment.
Package: python-topicsio
# python-topicsioThe Python interface to the Topics.io backend.
Topics.io is a free API used to add relevant news from topics into your apps.## Installation$ sudo pip install python-topicsioor alternatively (you really should be using pip though):$ sudo easy_install python-topicsioFrom source:$ sudo python setup.py install## Getting Started>>> import topicsio
>>> client = topicsio.Topicsio(auth_api_key='Your api key')
>>> all_last_news = client.get_last_news()Authorpython-topicsio is developed and maintained by Didier Rano (didier.rano@gmail.com).
It can be found here:http://github.com/drano/python-topicsioSpecial thanks to:Wesley Bouarab, topics.io co-founder.
Package: python-topsis-Samridhi-101916086
TOPSISTechnique for Order Preference by Similarity to Ideal Solution is a multi-criteria decision making method. The method is based on finding an ideal and an anti-ideal solution and comparing the distance of each one of the alternatives to those. TOPSIS chooses the alternative of shortest Euclidean distance from the ideal solution, and greatest distance from the negative-ideal solution.Package UsageTo install the package:
pip install Topsis_Samridhi_101916086
This is a package focusing on finding the topsis score and rank of a dataframe (csv file) with only numerical values except for the first column.OUTPUTThe python file consists of the logic which excepts 4 parameter:Input csv fileWeights given by user comma separtedImpact given by user comma separatedResult csv file, just to restore the naming convention.. result file will contain 2 additional columns contianing topsis_score and rankLICENSECopyright (c) 2022 Samridhi Garg