Saravanan666/pypi-org huggingface dataset:
Package: durandal
DurandalDurandal is a convex NLP solver based on a successive linear programming technique. Uses the principle of supporting hyperplanes of convex functions to solve the problem. This cutting procedure is where we get the solver's name from, the legendary sword Durandal.Currently, Durandal is very experimental and is a personal project.Features- Solve NLPs via a series of converging LPs- Dynamic removal of cuts as they become redundant- Trust Region- A more generic LP interface for other LP solversRequriments (Restrictions)Only affine constraints are supportedFeasible space must be boundedThe objective function must be bounded above inside the feasible spaceThe objective function must be convex (nonconvex are allowed, but no convergence guarantees are given)How does it work?This algorithm forms a converging sequence of upper and lower bounds on the objective function by introducing cuts in the form of supporting hyperplanes of the objective function. Additionally, the candidate solution is always feasible so that it can be interrupted at any point in the method and still yeild a feasible approximate optimum. The core kernel of this routine is the generation of supporting hyperplanes and re-optimizing the central LP problem. This re-optimization warm started as the dual of the central LP is feasible after introducing the cut. Each visited point generates a supporting hyperplane which translates to a constraint/cut in the LP.This procedure can basically be viewed as making approximations over the epigraph of the objective function over the feasible region and refining the approximation per iteration.Should I use it?Is it free?YesDoes it work?YesExample code of solving a 1D NLPfromdurandal.nlpimportNLPimportnumpyimportmatplotlib.pyplotasplt# define the convex nonlinear objectivedeff(x):returnnumpy.exp(x)+x**2# define the gradiant of the objectivedefgrad_f(x):returnnumpy.exp(x)+2*x# Constrain x to have mangitude up to 2, |x| <= 2A=numpy.array([[1],[-1]])b=numpy.array([[2],[2]])# construct the nlp solver objectnlp=NLP(f,grad_f,A,b)# solve the NLP with up to 3 cuts while showing outputx_approx=nlp.solve(max_cuts=3,output=True)# start from where the last solve started off and solve for another 10 cuts while again showing outputsx_sol=nlp.solve(max_cuts=10,output=True)# reconstruct the nlp solver objectnlp=NLP(f,grad_f,A,b)# here we use a callback to record the upper and lower bounds per iterationlower_bounds=[]upper_bounds=[]defmy_callback(cb_nlp:NLP):lower_bounds.append(cb_nlp.lb)upper_bounds.append(cb_nlp.ub)nlp.solve(max_cuts=5,output=False,gen_callback=my_callback)#show the change in lower bound w.r.t. iterationplt.plot(upper_bounds,marker='x')plt.plot(lower_bounds,marker='o')plt.title('Upper and Lower Bound of the optimal solution w.r.t Iteration')plt.ylabel('f(x)')plt.xlabel('Iteration count')plt.legend(['Upper Bound','Lower Bound'])
Package: durasftp
DuraSFTPA durable extension the pysftp SFTP client:https://pysftp.readthedocs.io/InstallationpipinstalldurasftpCommand Line UsageShow the help:python-mdurasftp--helpMirror an SFTP endpoint to your local with private keys:python-mdurasftp--hostsome.sftp.server.com--port22--usernameyour_username\--private-key~/.ssh/id_rsa--private-key-pass'ULTRASECUREPASSWORD'\--local-base/tmp/local_copy_of_serverMirror an SFTP endpoint to your local with a password:python-mdurasftp--hostsome.sftp.server.com--port22--usernameyour_username\--password'ULTRASECUREPASSWORD'\--local-base/tmp/local_copy_of_serverPackage UsageThis package very closely mirrors the functionality of pysftp, except it automatically
recovers a connection in the event that network connectivity is intermittent.It also introduces a mirroring functionality, where you can copy a local directory to
a remote server, or copy a remote directory to the local. It will ignore files that
already exist on the destination, if the file size and modification time are identical.Basic UsageThe DurableSFTPConnection class is intended to be a drop-in replacement for the
pysftp.Connection class. With a stable network connection, it should be identical in
every way.fromdurasftpimportDurableSFTPConnectionconn=DurableSFTPConnection(host="some.sftp.server.com",port=22,username="your_username",password="ULTRASECUREPASSWORD")conn.listdir('/')Mirror from remote server to localfromdurasftpimportMirrorermirrorer=Mirrorer(local_base="/tmp/local_copy_of_server",host="some.sftp.server.com",port=22,username="your_username",password="ULTRASECUREPASSWORD",timeout=3,)mirrorer.mirror_from_remote(dry_run=True)
Package: duration
python time duration conversion moduleInstallationpip install durationUsageExamples below show how to convert timestamps inhh:mm:ssandmm:ssformat
to iso8601 strings, integer seconds, datetime.timedelta objects and
(hours, minutes, seconds,) deltasfromdurationimport(to_iso8601,to_seconds,to_timedelta,to_tuple,)time='1:23:45'iso8601=to_iso8601(time)# 'PT01H23M45S'seconds=to_seconds(time)# 5025td=to_timedelta(time)# timedelta(hours=1, minutes=23, seconds=45)tuple_=to_tuple(time)# (1, 23, 45,)Examples above use strict mode by default. In strict mode, conversion
functions raiseStrictnessErrorif your duration string meets one of the
following conditions:hh > 23mm > 59ss > 59To disable strict mode, passstrict=Falseto the conversion functionfromdurationimport(to_iso8601,to_seconds,to_timedelta,to_tuple,)time='24:83:25'iso8601=to_iso8601(time,strict=False)# 'P1DT01H23M25S'seconds=to_seconds(time,strict=False)# 91405td=to_timedelta(time,strict=False)# timedelta(seconds=91405)tuple_=to_tuple(time,strict=False)# (25, 23, 25,)
Package: duration-check
Duration CheckWorking python decorators to check how long function can take to be executed.Decorator availabletimeoutviatimeout_decorator_builder()durationCode exampleimportsysimportunittestfromduration_checkimporttimeout_decorator_builder# This CAN NOT be a lambda function because we can't pickle themdefmodule_getter():returnsys.modules[__name__]timeout=timeout_decorator_builder(module_getter)# This CAN NOT be a lambda function because we can't pickle themclassSuperTaskUnitTest(unittest.TestCase):@timeout(2)deftest_timeout_super_task(self):self.assertTrue(my_super_task())Issues/Bug report or improvement ideashttps://gitlab.com/devolive/pypi-packages/duration-check/-/issuesLicenseGNU Lesser General Public License v3 or later (LGPLv3+)
Package: duration-detective
██████╗ ██╗   ██╗██████╗  █████╗ ████████╗██╗ ██████╗ ███╗   ██╗      
        ██╔══██╗██║   ██║██╔══██╗██╔══██╗╚══██╔══╝██║██╔═══██╗████╗  ██║      
        ██║  ██║██║   ██║██████╔╝███████║   ██║   ██║██║   ██║██╔██╗ ██║      
        ██║  ██║██║   ██║██╔══██╗██╔══██║   ██║   ██║██║   ██║██║╚██╗██║      
        ██████╔╝╚██████╔╝██║  ██║██║  ██║   ██║   ██║╚██████╔╝██║ ╚████║      
        ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝   ╚═╝ ╚═════╝ ╚═╝  ╚═══╝      
                                                                              
        ██████╗ ███████╗████████╗███████╗ ██████╗████████╗██╗██╗   ██╗███████╗
        ██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝██║██║   ██║██╔════╝
        ██║  ██║█████╗     ██║   █████╗  ██║        ██║   ██║██║   ██║█████╗  
        ██║  ██║██╔══╝     ██║   ██╔══╝  ██║        ██║   ██║╚██╗ ██╔╝██╔══╝  
        ██████╔╝███████╗   ██║   ███████╗╚██████╗   ██║   ██║ ╚████╔╝ ███████╗
        ╚═════╝ ╚══════╝   ╚═╝   ╚══════╝ ╚═════╝   ╚═╝   ╚═╝  ╚═══╝  ╚══════╝A tree-like tool to check the media duration in your folders/subfolders.🚀  InstallationCreate a virtual environment (if needed)$ python3 -m venv <your_env>
source <your_env>/bin/activateInstall via pippip install duration-detectiveRun it$ DurationDetective --path "/path/to/your/folder"

Scanning Folder :
/path/to/your/folder ...
├──22mins 02secs ⏲️  Batman Hush (2019) (1080p BluRay x265 SAMPA).mkv
├──16mins 39secs ⏲️  Batman.The.Killing.Joke.2016.1080p.6CH.ShAaNiG-[Bi-3-Seda.Ir].mkv
├──27mins 07secs ⏲️  Batman.VsTeenage.Mutant.Ninja.Turtles.2019.720p.WEBRip.x264-[YTS.AM].mp4
├──14mins 16secs ⏲️  Batman.and.Harley.Quinn.2017.WEB-DL.720p.MkvCage.mkv
├──12mins 07secs ⏲️  Batman.vs.Two.Face.2017.DVDRip.MkvCage.mkv
├──45mins 55secs ⏲️  Dark.Web.Cicada.3301.2021.720p.BRRip.Tamil.Dub.Dual-Audio.x264-1XBET.mkv
├──Good Will Hunting (1997) [1080p]/
│   ├──06mins 33secs ⏲️  Good.Will.Hunting.1997.1080p.BrRip.x264.YIFY.mp4
│   └──06mins 33secs ⏲️ : Good Will Hunting (1997) [1080p]/
├──Ship Of Theseus (2012)/
│   ├──24mins 42secs ⏲️  Ship.Of.Theseus.2012.720p.BluRay.x264.[YTS.AG].mp4
│   └──24mins 42secs ⏲️ : Ship Of Theseus (2012)/
├──The.Batman.2022.1080p.WEBRip.x265-RARBG/
│   ├──Subs/
│   │   └──00mins 00secs ⏲️ : Subs/
│   ├──56mins 12secs ⏲️  The.Batman.2022.1080p.WEBRip.x265-RARBG.mp4
│   └──56mins 12secs ⏲️ : The.Batman.2022.1080p.WEBRip.x265-RARBG/

✅ Total Duration: 3hr 39min 33secs ⏲️Use caseI have been using it personally for planning hours before diving into any Course videos or before Planning to binge watch any Television Series. Gives me a rough estimate of How much time consuming it can be.Contribution$ git clone https://github.com/3l-d1abl0/DurationDetective.gitRaise Issueshttps://github.com/3l-d1abl0/DurationDetective/issues
Package: durations-nlp
durations_nlpA python durations parsing library, providing a straight-forward API to parse duration string representations such as1d,1 day 2 hoursor2 days 3h 26m 52sand convert them to numeric values.What and WhyIt's easier and more straight forward to read a duration expressed in natural language (at least for a human), as an expression rather than an amount. When writing configuration files for example:interval:3 hoursis easier to understand for a human thaninterval:10800# secondsInstallationdurations_nlpcan be installed via pip:$pipinstalldurations_nlpUsageTo parse a duration string representation, just instantiate a Duration object and let it work for you. A Duration representation is composed of as many<value><scale>pairs as you need to express it:A value is an integer amount.A scale is a duration unit in it's short or long form (both singular and plural).Duration pairs can be separated with sep characters and expressions such as,orandExample Input1d2 days2 days and 4 hours4M, 22d and 6hoursScales ReferenceCentury:c,century,centuriesDecade:D,decade,decadesYear:y,year,YearMonth:M,month,monthsWeek:w,week,weeksDay:d,day,daysHour:h,hour,hoursMinute:m,minute,minutesSecond:s,second,secondsMillisecond:ms,millisecond,millisecondsUsage Examplefromdurations_nlpimportDurationone_hour="1hour"one_hour_duration=Duration(one_hour)one_hour_duration.to_seconds()# >>> 3600.0one_hour_duration.to_minutes()# >>> 60.0# You can even compose durations in their short# and long variationstwo_days_three_hours="2 days, 3h"two_days_three_hours_duration=Duration(two_days_three_hours)two_days_three_hours_duration.to_seconds()# >>> 183600.0two_days_three_hours_duration.to_hours()# >>> 51.0
Package: durationstring
A small module to assist in getting readable time in seconds that can be easily passed to time.sleep(seconds).Converterss - secondsm - minutesh - hoursd - daysFailing to provide a converter will default to seconds.Examplesimportduration_stringimporttimetime.sleep(duration_string.get("2m"))duration_string.is_valid("2f")# raises ValueErrorTestsThese are run using docstrings.
Package: durga
*****Durga*****.. image:: https://pypip.in/version/durga/badge.svg?style=flat:target: https://pypi.python.org/pypi/durga/:alt: Latest Version.. image:: https://pypip.in/py_versions/durga/badge.svg?style=flat:target: https://pypi.python.org/pypi/durga/:alt: Supported Python Versions.. image:: https://pypip.in/status/durga/badge.svg?style=flat:target: https://pypi.python.org/pypi/durga/:alt: Development Status.. image:: https://pypip.in/license/durga/badge.svg?style=flat:target: https://pypi.python.org/pypi/durga/:alt: License.. image:: https://travis-ci.org/transcode-de/durga.png?branch=develop:target: https://travis-ci.org/transcode-de/durga:alt: Build Status.. image:: https://readthedocs.org/projects/durga/badge/?version=latest:target: https://readthedocs.org/projects/durga/?badge=latest:alt: Documentation StatusCreate easy to use Python objects for REST resources including schema validation.Documentation available at `Read the Docs`_... include:: AUTHORS.rst|transcode_de|_Sponsored by `reelport`_... _Read the Docs: https://durga.readthedocs.org/.. |transcode_de| image:: http://www.transcode.de/img/logo_en.png:width: 300px.. _transcode_de: http://www.transcode.de/.. _reelport: http://www.reelport.com/
Package: durguestprofile
durguestprofileProvides a complete Integrated Development Environment to automate Guest Profile AuditMain FeaturesHere are just a few of the things that durguestprofile does well:Combine Guest Profile DataExtract the following reports from Opera PMS, Profile Address for individual guests only.
This Sample code will join the following files into one reusable Excel workbook.use osr_landscape.osr to collect the guest profile data.You can add as many as files and hotels in one folder.
You will be asked to choose the folder where all the above files are saved.
Final output will be 'FINAL_AUDIT_DATE.csv' file in same folder.
Warning: Do not change the csv file data structure.
Use this file to feed the Excel Template and start validating the output and
to update Power BI dashboards.from durguestprofile import properties_score
df = properties_score(files_folder=files_folder, criteria_file=criteria_file)Where to get itThe source code is currently hosted on GitHub at:https://github.com/roinsightsupport/durguestprofileBinary installers for the latest released version are available at thePython
Package Index (PyPI).pip install durguestprofile
# or Trusted host PyPI
pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org durguestprofilePythonPython 32bit is required, you can install it from the following sources.python.orgPortable PythonDependenciesnumpy>=1.23.5pandas>=1.5.3XlsxWriter>=3.0.3lxml>=4.9.1pyparsing>=3.0.9openpyxl>=3.0.10customtkinter==5.1.2sparse_dot_topn>=0.3.1scikit-learn>=1.1.1scipy>=1.10.0matplotlib==3.7.1See the [full installation instructions] for minimum supported versions of required, recommended and optional dependencies.LicenseROInsight.comDocumentationThe official documentation is hosted onhttps://pypi.org/project/durguestprofileGetting HelpFurther, general questions and discussions can also take place on theGitter.Contributing to durguestprofileAll contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.If you are simply looking to start working with the durguestprofile codebase, navigate to  start looking through interesting issues.
Package: durham-directory
Python bindings for the Durham University (UK) DirectoryThis package provides basic python bindings forthe Durham University
Directory, where Durham University
students and staff can look up fellow students and staff.It is nothing more than a wrapper aroundrequestsandbs4, and absolutely
nothing clever is being done (although I do think the code is pleasantly
simple).Installationpython-mpipinstalldurham-directoryCLI Usagedurham-directory--help
durham-directory--onameJohn--surnameMorrisAPI Usagefromdurham_directoryimportQueryquery=Query(username="me")# will prompt for password when evaluatedquery(oname="John",surname="Morris",type_="any")Or if you want to choose one result:fromdurham_directoryimportQueryOnequery=QueryOne()query(oname="John",surname="Morris",type_="any")We use fuzzy string matching viafuzzywuzzy(ignoring the title) to sort
results, as Durham appears to return them bogosorted.ScriptsAn example script parsing a csv extracted from the spreadsheets it seems
timetabling send around and printing Org-mode tables is inparse_csv.py.
Package: durham-XNet
XNetXNet is a Convolutional Neural Network designed for the segmentation
of X-Ray images into bone, soft tissue and open beam
regions. Specifically, it performs well on small datasets with the aim
to minimise the number of false positives in the soft tissue class.ArchitectureBuilt on a typical encoder-decoder architecture as
inspired bySegNet.Additional feature extraction stage, with weight sharing across some
layers.Fine and coarse grained feature preservation through concatenation
of layers.L2 regularisation at each of the convolutional layers, to decrease overfitting.The architecture is described in theXNet.pyfile.OutputXNet outputs a mask of equal size to the input images.TrainingXNet is trained on a small dataset which has undergone
augmention. Examples of this augmentation step can be found in theaugmentations.ipynbnotebook in theAugmentationsfolder. Similarly theTrainingfolder contains python scripts that perform the necessary augementations.Runningtrain.pyfrom theTrainingfolder calls various other scripts to perform one of two possible ways of augmenting the images:'On the fly augmentation' where a new set of augmentations is generated at each epoch.Pre-augmented images.BenchmarkingXNet was benchmarked against two of the leading segmentation networks:SimplifiedSegNet(found in theSimpleSegNet.pyfile)UNet(found in theUNet.pyfile)DataWe trained on a dataset of:150 X-Ray images.No scatter correction.1500x1500.tifimage downsampled to 200x20020 human body part classes.Highly imbalanced.As this work grew out of work with a corporation we are sadly unable to share the propriatory data we used.More informationFor more information and context see the conference posterPoster.pdf.Please note that some of the path variables may need to be corrected in order to utilise the current filing system. These are planned to be updated in the future.
Package: durin
Durin control systemThis repository contains Python code that interfaces with the robot Durin, built by theNeurocomputing Systems groupat theKTH Royal Instititute of Technology.
Please note that this is only the reference implementation for our interface. See below.InstallationWe require a working Python installation with access topip.
After that, installation is straight-forward:pipinstalldurinUsageThe interface is meant to be used via Python. More examples can be found in thedurin/examplesfolder.fromdurinimport*# The ip address to Durin is 172.16.223.9X, where X is the number of the robot (1, 2, or 5).durin_ip="172.16.223.91"# This connects to durin and displays a user interface (UI)withDurinUI(durin_ip)asdurin:whileTrue:# Get observation(obs,dvs,cmd)=durin.read()# Do clever things...# Move durin 100 units left with 0 forward/backward motion and 0 rotationcommand=Move(100,0,0)# Send a command to Durindurin(command)# ... this loop continues forever!# You can exit it on your computer by pressing CTRL+CSensory dataThedurin.read()method will give you access toAnObservationfrom the robot sensors object containing.tofTime of Flight sensors.chargeBattery chargeA 640x480 DVSPyTorchtensorThis tensor has buffered/stacked events since the last.read()command.Note that this isonlyavailable if the Durin has a DVS sensor installedReplies from the robot, following anyPollcommandsThis is specified in the protocol datasheet below - feel free to ignoreCommandsThe most important command isMove(x, y, rotation). thex,y,rotationvalues should be in the interval between [-500, 500].Custom implementationYou can interface to the microcontroller (sensor + wheel actuation) and DVS microcamera with TCP and UDP.
A complete specification is available via Google Drive:https://docs.google.com/spreadsheets/d/11jD30J00-03ygZ6zJaVTnjJRQKfczT-wMIdBdpYMxD4/edit?usp=sharingEach robot has two IP addresses - one for the microcontroller and one for the DVS controller.
The robots are numbered 1, 2, or 5. Insert those numbers whereXis written below:172.16.223.9X: Microcontroller for sensory data and motor commands172.16.223.10x: Raspberry Pi for streaming DVS dataContactReach out to Juan or Jens if you need anything.
Package: duro-rest
duro_restAn API client for theDuro REST API.InstallationInstalling fromPyPipip install duro_restInstalling fromconda-forgeTBDExamplesThe Duro client is a very minimal API client for reading data from theDuro v1 REST API. It does not define classes for each object type and instead returns plain dictionaries
and lists.Base Clientfromduro_restimportClient# Create a new client, providing your API key. By default clients will make calls to the public REST# API, but the endpoint base can be overridden if neededclient=Client("your-api-key")# Fetch a component by its Duro assigned id (as opposed to the CPN)component=client.component("component-id")# Fetch a list of all components in Durocomponents=client.components()# Fetch a list of all components in Duro filtered by statuscomponents=client.components(status="OBSOLETE")BOM ClientThe Duro API does not support pulling BOMs directly. The BOM Client is here to make that experience
a little easier.fromduro_restimportBOMClient# Create a new bom client for fetching full BOMs (either nested or flattened). It accepts the same# arguments as the base clientclient=Client("your-api-key")# Get a nested BOM starting from a productnested_product_bom=client.product_bom("product-id")# Get a nested BOM starting from a componentnested_component_bom=client.component("component-id")# Convert the nested BOM into flattened BOMindented_product_bom=nested_product_bom.idented()# Flattening will collapse rows for the same components togetherflattened_product_bom=indented_product_bom.flatten()
Package: durtodateandtime
durtodateandtimePython3 Module to convert from duration to date and time.InstallationInstall with pippip3 install -U durtodateandtimeUsageIn [1]: import durtodateandtime                                                                                       

In [2]: durtodateandtime.duration_to_date_and_time(86401)                                                             
Out[2]: '1 day, 00:00:01'

In [3]: durtodateandtime.duration_to_int_days(86401)                                                                  
Out[3]: 1

In [4]: durtodateandtime.duration_to_time(86401)                                                                      
Out[4]: '00:00:01'