Saravanan666/pypi-org huggingface dataset:
Package: extract-values
Extract Values==============A Python module for extracting values out of a string using a simple pattern instead of a regular expression by defining groups of named characters using a pair of opening and closing delimiters.Examples:```pythonfrom extract_values import extract_values>>> extract_values('/2012/08/12/test.html', '/{year}/{month}/{day}/{title}.html'){ 'year': '2012', 'month': '08', 'day': '12', 'title': 'test' }>>> extract_values('John Doe <john@example.com> (http://example.com)', '{name} <{email}> ({url})'){'name': 'John Doe', 'email': 'john@example.com', 'url': 'http://example.com' }>>> extract_values('from 4th October  to 10th  October', 'from `from` to `to`', strip_values=True, whitespace=1, delimiters=['`', '`']){'from': '4th October', 'to': '10th October' }>>> extract_values('Convert 1500 Grams to Kilograms', 'convert {quantity} {from_unit} to {to_unit}', lowercase=True){'quantity': '1500', 'from_unit': 'grams', 'to_unit': 'kilograms' }]>>> extract_values('The time is 4:35pm here at Lima, Peru', 'The time is :time here at :city', delimiters=[':', '']){'time': '4:35pm', 'city': 'Lima, Peru'}```Optional parameters:* **lowercase** - When True is passed the string is lowercased first* **whitespace** - Minimal number of extra whitespace to remove* **strip_values** - When True calls strip() for each value removing whitespace* **delimiters** - A sequence with only the opening and closing delimitersIn order to install this package from [PyPi](http://pypi.python.org) you can run any of these commands:easy_install extract-valuesorpip install extract-valuesThis library can also be installed directly from Github with the following command:pip install git+ssh://git@github.com/gnrfan/extract-values.gitThis little project was inspired by a similar [Node.js](http://nodejs.org/) module created by sri-lankan developer [Lakshan Perera](http://laktek.com/) available [here](https://github.com/laktek/extract-values).(c) 2012 - Antonio Ognio <antonio@ognio.com> - Distributed under the BSD license - Made in Peru.
Package: extract-version
Extract VersionPython module for extracting version from the string or directory name.
Could make use for creating an inventory of installed versions of a particular application
or finding the latest installed version.The module offers the following functionality:Fetching version string from the string or name of the directoryValidating version stringSorting config and application directories that contain versions in its nameExamples:We fetch version2020.1.0from stringPyCharm-2020.1.0, or version1.0frommy_program_v1.0AppVersion.Major.Minorversion formatextract_version(version_string="PyCharm-2020.1.0")>"2020.1.0"Major.Minorversion formatextract_version(version_string="my_program_v1.0")>"1.0"Sort directories by the version of applicationsort_versions(["PyCharm-2018.1.2","PyCharm-2018.2.0","PyCharm-2020.1.0"])>["PyCharm-2018.1.2","PyCharm-2018.2.0","PyCharm-2020.1.0"]In edge cases with more than one pattern present, e.g.PyCharm-2018.1.2-windows-10.0,
we should provide a clue where the version should be extracted from,
in a form of a pattern-regex, e.g.PyCharm-(.*)-windows-10.0The call of such function may look like this:extract_version(version_string='PyCharm-2018.1.2-windows-10.0',pattern='PyCharm-(.*)-windows-10.0')>"2018.1.2"Create an inventory of installed versions of a particular applicationapplication_path="C:/Users/user/AppData/Local/JetBrains/PyCharm"pycharm_versions=available_versions(versions_path=application_path)>{"2018.1.2":"PyCharm-2018.1.2","2018.2.0":"PyCharm-2018.2.0","2020.1.0":"PyCharm-2020.1.0"}
Package: extract-video-ppt
extract ppt from a videoIf The video content is included ppt, then this tool can extract the ppt from the video and export a pdf file. Or you can just transform video to pdf -,-.install# install from pypipipinstallextract-video-ppt# or localpython./setup.pyinstall# or local userpython./setup.pyinstall--useruseage# help infoevp--help# exampleevp--similarity0.6--pdfnamehello.pdf--start_frame0:00:09--end_frame00:00:30././test.mp4# similarity: The similarity between this frame and the previous frame is less than this value and this frame will be saveed, default: 0.6# pdfname: the name for export pdf# start_frame: start frame time point, default = '00:00:00'# end_frame: end frame time point, default = 'INFINITY'exampleevp--similarity0.6--pdfnamehello.pdf--start_frame0:00:09--end_frame00:00:30./demo./demo/demo.mp4frame detail
Package: extract-wiki-words
extract_wiki_words - Extract words from Wikipedia dumps and create dictionariesThis script can extract words from Wikipedia XML dumps and create dictionaries.Installextract_wiki_wordson your system using :pip install extract-wiki-wordsUsage of the script to create a dictionary from a Wikipedia dump (https://dumps.wikimedia.org):extract_wiki_words frwiki-20210520-pages-articles-multistream.xml
Package: extra-datascience-tools
Python package with extra tools to use for data science.Welcome toextra-datascience-tools, a Python package which offers additional tools for data scientists. These tools include or will include e.g.:functionsclassesdecoratorsplots..which are useful and often used for most data science projects, so that you don't need to rewrite the same code over again or invent it yourself. Please be aware that this package was launched in oktober 2022 and thus the current amount of features might be limited, but the features that are present can be of great use.Personally I'm a huge fan of well-documented code, and this package strives for quality and well-documented code over lots of under-documented features. Please visitReadTheDocsfor this package's extensive documentation.Github pageInstallationUsing PyPipip install extra-datascience-toolsWithout using PyPigit clone https://github.com/sTomerG/extra-datascience-tools.git
cd extra-datascience-tools
pip install .If problems arise make sure to have the latest version of pip:python3 -m pip install --upgrade pipUsage>>> import extra_ds_toolsFor more information seethe tutorial.
Package: extradeco
## extradeco###   parametrized(flat_decorator)A super-flatter decorator decorator!One is supposed to decorate what would be your inner "wrapper" function in a decorator with"parametrized". That "wrapper" can now be used as a paramterized decorator with extra parameterswhatever parameters it takes when decorating are passed along with the func object when the func itselfis called - "*args" and "**kwargs" arguments should be passed down in the call to the original `func`.### Example of use:Create a flat decorator which wants parameters by doing:```from extradeco import paremetrized@parametrizeddef ubberlog(func, loglevel, *args, **kw):if loglevel > 2:print ("doing things")if loglevel > 1:print("doing less things")# Line that calls the original function directly on the decorator bodyresult = func(*args, **kw)if loglevel:print("function returned", result)return result```And then, the new logger decorator is ready to be used like this:```@ubberlog(2)def soma(a, b):return a + b@ubberlog(1)def s1(a, b):return a + b```### WarningFor now, the parameter names in the decorator cannot match any parameter name in the final decorated function.It is advised that you prefix the parameter names in the decorator with somethign that won't be present in the decorated functions.
Package: extraexceptions
Extra ExceptionsExtra Exceptions - library for those who lack the usual python exceptions.Documentation will be soon...To installpip install extraexceptionsTo importimport extraexceptionsorfrom extraexceptons import *Library give a new exceptions:Logical Fallacies - new 74 excepts.Cognitive Biases - new 56 excepts.Don't Stop Code Decorator:Library can catch exceptions and output only text with error, but if it will be, for example:fromextraexceptionsimport*@ignore_exc_decoratordefdiv(x,y):returnx/yprint(div(5,0))you will receive:Exception>>> division by zero
NoneNone - because x/y return traceback, but decorator catch his and function cant assign a value to return.
Package: extrainterpreters
extrainterpretersUtilities to make use of new
"interpreters"  module in Python 3.12Status: alphaUsage: for now one must build cpython 3.12 alpha from the main cpython branchthen, just import "extrainterpreters" and use theInterpreterclass
as a wrapper to the subinterpreter represented by a single integer
handle created by the newinterpretersmodule (that should be
in Python stdlib as soon as Eric Snow polishes it)with anextrainterpreter.Interpreterinstance, one can call:inter.run(func_name, *args, **kwargs})to run code there in the same
thread: the return value is just returned as long as it is pickleable.
Theinter.run_in_threadwith the same signature, will start a fresh
thead and call the target function there - the Interpreter instance  then should
be pooled in its "done()" method, and once done, the return value
will be available by calling  "result".Also working is a threading like interface:from extrainterpreters import Interpreter

...

    interp = Interpreter(target=myfunc, args=(...,))
    interp.start()
    ...
    interp.join()

    # bonus: we have return values!

    print(interp.result()It will even work for methods defined on the REPL, so, just
give it a try.There is a new class in the works which will be able to
run code in the sub-interpreter without depending of the
PEP554 "run_string" (once the setup is done). All processing in the sub-
interpreter will automatically take place in another thread,
and the roadmap is towards having a Future object and
anInterpreterPoolExecutorcompatible with the
existing executors inconcurrent.FuturesA lot of things here are subject to change.
For now, all data exchange takes place in a custom memory
buffer with 10MB (it is a bytearray on  the parent interpreter,
and a memoryview for that on the target)Data is passed to and back the interpreter using pickle - so,
no black magic trying to "kill an object here" and "make it be born there"
(not even if I intended to, as ctypes is not currently importable on
sub-interpreters).The good news is thatpicklewill take care of importing whatever is
needed on the other side, so that a function can run.RoadmapI plan to get this compatible with concurrent.futures.Executor, and have
an easy way to schedule a subinterpreter function execution as an async task.Also, I should come up with a Queue object to pass data back and forth.
As for the data passing mechanism: we will use pickle, no doubt.When is Beta?As soon as I get to a well thought way of creating the initial buffer
for comunication with a sub-interpreter.ArchitectureThe initial implementation used a pre-allocated mmaped file
to send/get data from other interpreters, until I found out the
mmap call in the sub-interpreter would build a separate mmap
object in a different memory region, and a lot of data copying
was taking place.Currently, two C methods retrieve the address of an object implementing
the buffer interface, and create a "stand alone" memoryview instance
from the address alone. This address is passed to the subinterpreter
as a string during the setup stage,
Package: extraire
extraireextraire (verb): to extractSimple program to dump onboard SHSH blobs with a valid generator forjailbrokeniOS devices. Supports Windows, macOS and Linux.What's this?This program dumps the IMG4 ApTicket from /dev/disk1 on the device, copies it to your computer and converts it to a valid SHSH blob, no external dependencies required.Even though the dumped SHSH blob is valid, you will still be limited by a few factors:SEP/Baseband/Rose firmware compatibility with the currently signed iOS versionIf you've updated to your current iOS version with the Settings app, you cannot use the dumped blob without a bootROM exploit (e.g. checkm8).RequirementsOpenSSH Server installed on your jailbroken device. That's it!InstallationFrom PyPIpip install -U extraireStandalone binariesStandalone binaries for Windows, macOS and Linux can be foundhere.You will need to allow executable permission for macOS and Linux after downloading. Runchmod +x /path/to/extrairein a terminal (replace/path/to/extrairewith the actual path).UsageRunextraireonly for an interactive guide.❯ extraire --help
usage: extraire [-h] [-p PASSWORD] [-o OUTPUT] [--non-interactive] [HOST[:PORT]]

positional arguments:
  HOST[:PORT]           The device's IP address

optional arguments:
  -h, --help            show this help message and exit
  -p PASSWORD, --password PASSWORD
                        The device's root user password
  -o OUTPUT, --output OUTPUT
                        Where to save the dumped blob
  --non-interactive     Don't interactively ask for missing value (assume default if missing)Running/building from sourceClone this repo, install the dependencies withpoetry installorpip install ., and runpython3 -m extraireTo build a wheel, dopoetry build.Creditstihmstar: without hisimg4toolcode I wouldn't be able to write code for dealing with IMG4s in Python.
Package: extra-keras-metrics
Additional metrics integrated with the TensorFlow and Keras Neural Network libraries.How do I install this package?As usual, just download it using pip:pipinstallextra_keras_metricsHow do I use this package?Other than by importing the single metrics from the package, we make available
also sets of metrics.Multi-class metricsTo retrieve an instance of the set of multi-class metrics you can use:fromextra_keras_metricsimportget_minimal_multiclass_metricsmodel=my_keras_model()model.compile(optimizer="nadam",loss="categorical_crossentropy",metrics=get_minimal_multiclass_metrics())Sparse multi-class metricsTo retrieve an instance of the set of sparse multi-class metrics you can use:fromextra_keras_metricsimportget_sparse_multiclass_metricsmodel=my_keras_model()model.compile(optimizer="nadam",loss="sparse_categorical_crossentropy",metrics=get_sparse_multiclass_metrics())Note that for now this only includes the categorial accuracy, since it is the only one
provided out-of-the-box by Tensorflow. We will be implementing more metrics ourselves.Binary metricsTo retrieve an instance of the set of binary-class metrics you can use:fromextra_keras_metricsimportget_standard_binary_metricsmodel=my_keras_model()model.compile(optimizer="nadam",loss="binary_crossentropy",metrics=get_standard_binary_metrics())All the binary metricsWe have implemented all sorts of binary metrics, including some relatively
more obscure ones. If you want ALL the binary metrics we implemented you can
use the following method:fromextra_keras_metricsimportget_complete_binary_metricsmodel=my_keras_model()model.compile(optimizer="nadam",loss="binary_crossentropy",metrics=get_complete_binary_metrics())ExtrasI’ve created also another couple packages you might enjoy this other one,
calledextra_keras_utilsthat contains some commonly used code for Keras projects andplot_keras_historywhich automatically plots a Keras training history.
Package: extra-keras-utils
Python package collecting commonly used snippets for the Keras library.How do I install this package?As usual, just download it using pip:pipinstallextra_keras_utilsTests CoverageSince some software handling coverages sometime get slightly different results, here’s three of them:is_gpu_availableMethod that returns a boolean if a GPU is detected or not.fromextra_keras_utilsimportis_gpu_availableifis_gpu_available():print("Using gpu!")is_multi_gpuMethod that returns a boolean if more than one GPU is detected.fromextra_keras_utilsimportis_multi_gpuifis_multi_gpu():print("More than one GPU is available!")set_seedMethod to get reproducible results.fromextra_keras_utilsimportset_seedset_seed(42)# set as seed 42, the results are nearly reproducible.set_seed(42,kill_parallelism=true)# set as seed 42, the results are fully reproducible.
Package: extramaths
extramaths 0.1.1A Python package that simplifies equations. Right now it only does quadratics and 2D shape areas, soon I'll add more.Go tohttps://pypi.org/project/extramaths/to install the package.Help PageThis help page shows examples of how all the functions work, for a more in-depth help page, please refer tohttps://github.com/WhenLifeHandsYouLemons/extramaths/wiki/Help.For Quadraticsfromextramathsimportquadsolvervalue1,value2=quadsolver.quadraticsolver(a,b,c)print(value1)print(value2)For Areas of 2D ShapesfromextramathsimportareasolverSquarearea_of_square=areasolver.area_square(length)print(area_of_square)Rectanglearea_of_rectangle=areasolver.area_rect(height,width)print(area_of_rectangle)Right-Angled Trianglearea_of_right_angled_triangle=areasolver.area_right_angle_tri(base,height)print(area_of_right_angled_triangle)Non Right-Angled Trianglearea_of_non_right_angled_triangle=areasolver.area_non_right_angle_tri(a,b,C)print(area_of_non_right_angled_triangle)Rhombusarea_of_rhombus=areasolver.area_rhombus(D,d)print(area_of_rhombus)Trapezoidarea_of_trapezoid=areasolver.area_trapezoid(a,b,height)print(area_of_trapezoid)Circlearea_of_circle=areasolver.area_circle(r)print(area_of_circle)
Package: extra-model
Table of Contentsextra-modelQuick startUsing docker-composeDownloading Embeddings[Optional] Run docker-compose build againRun extra-modelLearn moreAuthorsextra-modelCode to run the Extraalgorithmfor the unsupervised topic/aspect extraction on English texts.Read the Official Documentation hereQuick startIMPORTANT:When running Extra inside docker-container, make sure that Docker process has enough resources.
For example, on Mac/Windows it should have at least 8 Gb of RAM available to it.Read More about RAM RequirementsGitHub repo doesnotcome with Glove Embeddings. See sectionDownloading Embeddingsfor how to download the required embeddings.Using docker-composeThis is a preferred way to runextra-model.
You can find instructions on how to runextra-modelusing CLI or as a Python packagehereFirst, build the image:docker-composebuildThen, run following command to make sure thatextra-modelwas installed correctly:docker-composeruntestDownloading EmbeddingsNext step is to download the embeddings (we useGlovefrom Stanford in this project).To download the required embeddings, run the following command:docker-composerun--rmsetupThe embeddings will be downloaded, unzipped and formatted into a space-efficient format. Files will be saved in theembeddings/directory in the root of the project directory. If the process fails, it can be safely restarted. If you want to restart the process with new files, delete all files exceptREADME.mdin theembeddings/directory.[Optional] Rundocker-compose buildagainAfter you've downloaded the embeddings, you may want to rundocker-compose buildagain.
This will build an image with embeddings already present inside the image.The tradeoff here is that the image will be much bigger, but you won't spend ~2 minutes each time you runextra-modelwaiting for embeddings to be mounted into the container.
On the other hand, building an image with embeddings in the context will increase build time from ~3 minutes to ~10 minutes.Runextra-modelFinally, runningextra-modelis as simple as:docker-composerunextra-model/package/tests/resources/100_comments.csvNOTE: when using this approach, input file should be mounted inside the container.
By default, everything fromextra-modelfolder will be mounted to/package/folder.
This can be changed indocker-compose.yamlThis will produce aresult.csvfile in/io/(default setting) folder.There are multiple flags you can set to change input/outputs of extra. You can find them by running:docker-composerunextra-model--helpLearn moreOurofficial documentationis the best place to continue learning aboutextra-model:Explanation of inputs/outputsStep-by-step workflowof what happens inside ofextra-modelExamplesof howextra-modelcan be used in downstream applicationsDetailed explanationof how to runextra-modelusing different interfaces (viadocker-compose, via CLI, as a Python package).Authorsextra-modelwas written bymbalyasin@wayfair.com,mmozer@wayfair.com.
Package: extraneous
extraneousFind extraneous pip packages not listed in your requirements.txt or as a sub-dependency.mainInstall$pipinstallextraneousHelp$extraneous.py-husage: extraneous.py [-h] [--verbose] [--include paths] [--exclude names][--full]Identifies packages that are installed but not defined in requirements files.Prints the 'pip uninstall' command that removes these extraneous packages andany non-common dependencies. Looks for packages matching '*requirements*.txt'in the current working directory.optional arguments:-h, --helpshow this help message and exit--verbose, -vPrints installed site-package folders and requirements files.--include paths, -i pathsAdditional directories to look for '*requirements*.txt' files in.--exclude names, -e namesPackage names to not consider extraneous. ['extraneous', 'pipdeptree','pip', 'setuptools'] are not considered extraneous packages.--full, -fAllows ['extraneous', 'pipdeptree', 'pip', 'setuptools'] as extraneouspackages.Example output$extraneous.pyextraneous packages:smbprotocoluninstall via:pip uninstall -y smbprotocol cryptography dataclasses pyspnegoTestingClone the repo.Setup and activate a new venv.Installrequirements.txtandtest_requirements.txtinto your venv.Run$ python setup.py test.
Package: extrapypi
External pypi server with web ui and basics permissions managementextrapypi don’t mirror official pypi packages, and will not. It’s just not build with this goal in mind. extrapypi is just here to provide you an extra index to upload and install private packages simply.FeaturesUpload packages from twine / setuptoolsInstall packages with pip using only extra-index optionBasics permissions management using roles (currently admin, developer, installer, builder)Easy deployment / installation using the WSGI server you wantMySQL, PostgresSQL and SQLite supportExtensible storage systemCLI tools to help you deploy / init / test extrapypiBasic dashboard to visualize packages and usersCodebase aim to be simple and hackable
Package: extrarandom
extrarandomA library that provides extra utilities builtin on the builtin libraryrandom.Installationpip install extrarandomMethodsRandom booleanssome_bool=randbool()three_bools=randbools(3)Random charactersletter=randletter()uppercase=randuppercase()lowercase=randlowercase()Random hexnine=hex(9)twenty=hex(20)sth_between_9_and_20=randhex(nine,twenty)# returns a string just like hex()Random string manipulationmystring="abcdef"modified_string=strinsert(mystring,"HELLO")# some possible outcomes:# "abHELLOcdef", "HELLOabcdef", "abcdefHELLO", etc# if you don't want the substring to be inserted at the start/end:modified_string2=strinsertin(mystring,"HELLO")# impossible outcomes:# "HELLOabcdef", "abcdefHELLO"Random list manipulationmylist=[1,2,3,4]listinsert(mylist,-999)# some possible outcomes:# [-999, 1, 2, 3, 4] [1, 2, -999, 3, 4] [1, 2, 3, 4, -999]# listinsertin is similar to strinsertinRandom permutation/combinationperm=permutation(iterable)comb=permutation(iterable)Range objectssome_range_between_6_and_9=subrange(range(6,9))# possible values:# range(6, 7), range(6, 9), range(8, 9) etc.# start will not be equal to stopRandom iterationmylist=[1,2,3,4,5]foriinranditer(mylist,total=8):print(i)# print 8 random elements from mylistNot so useful stuff (yet)Infinite iteratorsforbinrandboolstream():print(b)# infinite random boolean stream lolRandom attribute manipulation (not too useful tho)getrandattr(obj)setrandattr(obj,value)delrandattr(obj)