Saravanan666/pypi-org huggingface dataset:
Package: selective-search
Selective SearchEnglish |简体中文This is a complete implementation of selective search in Python. I thoroughly read the related
papers[1][2][3]and the author’s MATLAB implementation. Compared with other
implementations, my method is authentically shows the idea of the original paper. Moreover, this method has clear logic
and rich annotations, which is very suitable for teaching purposes, allowing people who have just entered the CV field
to understand the basic principles of selective search and exercise code reading ability.InstallationInstalling fromPyPIis recommended :$ pip install selective-searchIt is also possible to install the latest version fromGithub source:$ git clone https://github.com/ChenjieXu/selective_search.git
$ cd selective_search
$ python setup.py installInstall fromAnaconda:condainstall-cchenjiexuselective_searchQuick Startimportskimage.iofromselective_searchimportselective_search# Load image as NumPy array from image filesimage=skimage.io.imread('path/to/image')# Run selective search using single modeboxes=selective_search(image,mode='single',random_sort=False)For detailed examples, referthispart of the
repository.ParametersModeThree modes correspond to various combinations of diversification strategies. The appoach to combine different
diversification strategies, say, color spaces, similarity measures, starting regions is listed in the following
table[1].ModeColor SpacesSimilarity MeasuresStarting Regions (k)Number of CombinationssingleHSVCTSF1001fastHSV, LabCTSF, TSF50, 1008qualityHSV, Lab, rgI, H, ICTSF, TSF, F, S50, 100, 150, 30080Color
Space[Source Code]Initial oversegmentation algorithm and our subsequent grouping algorithm are performed in this colour space.Similarity
Measure[Source Code]'CTSF' means the similarity measure is aggregate of color similarity, texture similarity, size similarity, and fill
similarity.Starting
Region[Source Code]A parameter of initial grouping algorithm[2], which yields high quality starting locations
efficiently. A larger k causes a preference for larger components of initial strating regions.Random SortIf random_sort set to True, function will carry out pseudo random sorting. It only alters sequences of bounding boxes,
instead of locations, which prevents heavily emphasis on large regions as combing proposals from up to 80 different
strategies[1]. This only has a significant impact when selecting a subset of region proposals with high
rankings, as in RCNN.References[1]J. R. R. Uijlings et al., Selective Search for Object Recognition, IJCV, 2013[2]Felzenszwalb, P. F. et al., Efficient Graph-based Image Segmentation, IJCV, 2004[3]Segmentation as Selective Search for Object Recognition
Package: selectolax
A fast HTML5 parser with CSS selectors usingModestandLexborengines.InstallationFrom PyPI using pip:pipinstallselectolaxIf installation fails due to compilation errors, you may need to installCython:pipinstallselectolax[cython]This usually happens when you try to install an outdated version of selectolax on a newer version of Python.Development version from GitHub:gitclone--recursivehttps://github.com/rushter/selectolaxcdselectolaxpipinstall-rrequirements_dev.txtpythonsetup.pyinstallHow to compile selectolax while developing:makecleanmakedevBasic examplesIn[1]:fromselectolax.parserimportHTMLParser...:...:html="""
   ...: <h1 id="title" data-updated="20201101">Hi there</h1>
   ...: <div class="post">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div>
   ...: <div class="post">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
   ...: """...:tree=HTMLParser(html)In[2]:tree.css_first('h1#title').text()Out[2]:'Hi there'In[3]:tree.css_first('h1#title').attributesOut[3]:{'id':'title','data-updated':'20201101'}In[4]:[node.text()fornodeintree.css('.post')]Out[4]:['Lorem Ipsum is simply dummy text of the printing and typesetting industry. ','Lorem ipsum dolor sit amet, consectetur adipiscing elit.']In[1]:html="<div><p id=p1><p id=p2><p id=p3><a>link</a><p id=p4><p id=p5>text<p id=p6></div>"...:selector="div > :nth-child(2n+1):not(:has(a))"In[2]:fornodeinHTMLParser(html).css(selector):...:print(node.attributes,node.text(),node.tag)...:print(node.parent.tag)...:print(node.html)...:{'id':'p1'}pdiv<pid="p1"></p>{'id':'p5'}textpdiv<pid="p5">text</p>Detailed overviewAvailable backendsSelectolax supports two backends:ModestandLexbor. By default, all examples use the Modest backend.
Most of the features between backends are almost identical, but there are still some differences.To uselexbor, just import the parser and use it in the similar way to theHTMLParser.In[1]:fromselectolax.lexborimportLexborHTMLParserIn[2]:html="""
   ...: <title>Hi there</title>
   ...: <div id="updated">2021-08-15</div>
   ...: """In[3]:parser=LexborHTMLParser(html)In[4]:parser.root.css_first("#updated").text()Out[4]:'2021-08-15'Simple BenchmarkExtract title, links, scripts and a meta tag from main pages of top 754 domains. Seeexamples/benchmark.pyfor more information.PackageTimeBeautiful Soup (html.parser)61.02 sec.lxml9.09 sec.html5_parser16.10 sec.selectolax (Modest)2.94 sec.selectolax (Lexbor)2.39 sec.Linksselectolax API referenceVideo introduction to web scraping using selectolaxDetailed overviewModest introductionModest benchmarkPython benchmarkAnother Python benchmarkLicenseModest engine —LGPL2.1selectolax -MIT
Package: selector
This distribution provides WSGI middleware for “RESTful” mapping of URL paths to WSGI applications. Selector now also comes with components for environ based dispatch and on-the-fly middleware composition. There is a very simple optional mini-language for path expressions. Alternately we can easily use regular expressions directly or even create our own mini-language. There is a simple “mapping file” format that can be used. There are no architecture specific features (to MVC or whatever). Neither are there any framework specific features.
Package: selectorlib
selectorlibA library to read a YML file with Xpath or CSS Selectors and extract data from HTML pages using themFree software: MIT licenseDocumentation:https://selectorlib.readthedocs.io.Example>>> from selectorlib import Extractor
>>> yaml_string = """
    title:
        css: "h1"
        type: Text
    link:
        css: "h2 a"
        type: Link
    """
>>> extractor = Extractor.from_yaml_string(yaml_string)
>>> html = """
    <h1>Title</h1>
    <h2>Usage
        <a class="headerlink" href="http://test">¶</a>
    </h2>
    """
>>> extractor.extract(html)
{'title': 'Title', 'link': 'http://test'}History
Package: selectors34
selectors34is a backport of the selectors module from Python 3.4. The
selectors module written by Charles-François Natali. This port is based on
Victor Stinner’strollius/selectors.pyport.Installation and UsageTo installselectors34via pip:$ pip install selectors34For best compatibility for Python 3.4, importselectors34like:try:
    import selectors
except ImportError:
    import selectors34 as selectorsProject DetailsDocumentation:https://docs.python.org/3/library/selectors.htmlPyPI:https://pypi.python.org/pypi/selectors34Issue tracker:https://bugs.python.org/(upstream)Issue tracker:https://github.com/berkerpeksag/selectors34/issuesSupported versions:Python 2.6, 2.7 and 3.3License:Python Software Foundation LicenseBuild status:Changelog1.2 (released on 2017-06-06)Pull request #3:wrap_error()compatibility layer for PEP 3151 has been
removed.
(Patch written by Victor Stinner.)Pull request #4: FixTypeErrorwhenselect.select()is monkeypatched
by Gevent. Note that this is no longer an issue with the stdlibselectorsmodule on Gevent 1.1 and later.
(Patch written by Przemysław Węgrzyn.)Pull request #7: Fix a memory leak when GC is disabled.
(Patch written by Max Baryshnikov.)1.1 (released on 2015-07-15)Issues #23209, #23225:selectors.BaseSelector.get_key()now raises aRuntimeErrorif the selector is closed. Andselectors.BaseSelector.close()now clears its internal reference to the
selector mapping to break a reference cycle.
(Initial patch written by Martin Richard and backported by Victor Stinner.)Issues #23209, #23225:selectors.BaseSelector.close()now clears its
internal reference to the selector mapping to break a reference cycle.
(Initial patch written by Martin Richard and backported by Victor Stinner.)Issue #23009: Make sureselectors.EpollSelector.select()works when no
FD is registered.
(Backported by Victor Stinner.)1.0 (released on 2015-02-05)Initial release.
Package: selector-standardization-beam
Selector-standardation-beamApache beam пайплайн стандартизации:читает данные протоколов (например, хранящиеся на GCS)вызывает selector-standardizers в виде масштабируемого пайплайна (исполняемого как локально, так и, например, на Dataflow, Spark и тп.)сохраняет результат стандартизации в виде Avro.GOOGLE_APPLICATION_CREDENTIALS=/Users/nzhiltsov/airflow-installation/google-configs/carbide-program-314404-b1f3be733966.json
Package: selector-standardizers
Selector-standardizersМодуль проекта Selector, реализующий основную логику обработки данных протоколов:распознавание уровня выборовраспознавание уровня комиссииподбор схемы данныхраспознавание полей протоколаконвертирование в стандартный формат, соответствующий схемеобучение ML-моделей распознавания.Для работы тестов необходимо задать переменную окружения GOOGLE_APPLICATION_CREDENTIALS, указывающую путь к JSON файлу аутентификации Google Cloud Storage (GCS) проекта codeforrussia-selector.PYTHONPATH=src GOOGLE_APPLICATION_CREDENTIALS=<path_to_google_credentials_json> pytestОбучение модели распознавания полей протоколовОбучение (точнее, fine-tuning) ML-модели осуществляется по текущей Avro схеме. Avro схема разрабатывается для выборов определенного уровня и типа. Pre-trained DeepPavlov RuBERT sentence encoder модель уже способна распознавать различные поля протоколов. Для улучшения ее качества используется fine-tuning модели по отношению к triplet loss на синтетических данных, сгенерированных из Avro схемы.Генерируются синтетические данные для обучения из имен и алиасов полей протоколов в схеме.Fine-tuning языковой модели по triplet loss.Экспорт модели в формат, принимаемый Sentence-BERT.Пример команды тренировки:PYTHONPATH=src python -m org.codeforrussia.selector.standardizer.recognizers.similarity.train --election-level REGIONAL --election-type PERSONAL --output-model-dir /tmp/codeforrussia-selector/ml-models/similarity-protocol-recognizer_1_0_0.zip
Package: selectpy
SelectPy ( selectpy )Selectpy is a simple python module to integrate a fully customizable select menu in your python projects.How To UseInstalling The ModulepipinstallselectpyImporting The Module in The ProjectfromselectpyimportselectAdding The Select Menu And Getting The Resultans=select(opts=["Option 1","Option 2"],msg="Choose an Option:",c=">",cursor_color="#ff0000",selected_color="#ff0000",unselected_color="#ffffff")print(ans)OutputChoose an Option:

> Option 1

  Option 2



Option 1Navigation For The Selection Menu:Up ArrowDown ArrowEnterEscapeCtrl + CThats it!
Package: selectz
selectz=======-----.. contents:: **Table of Contents**:backlinks: noneInstallation------------selectz is distributed on PyPI_ as a universal wheel and is available onLinux/macOS and Windows and supports Python 2.7/3.5+ and PyPy... code-block:: bash$ pip install selectzUsage-----Modified Python 3 selectors example_ using `selectz`... code-block:: pythonimport selectzimport socketsel = selectz.Selector()def accept(sock):conn, addr = sock.accept()  # Should be readyprint('accepted', conn, 'from', addr)conn.setblocking(False)sel.register('read', conn, read)def read(conn):data = conn.recv(1000)  # Should be readyif data:print('echoing', repr(data), 'to', conn)conn.send(data)  # Hope it won't blockelse:print('closing', conn)sel.remove(conn)conn.close()sock = socket.socket()sock.bind(('localhost', 1234))sock.listen(100)sock.setblocking(False)sel.register('read', sock, accept)while True:sel.select()License-------selectz is distributed under the terms of both- MIT_ License- Apache_ License, Version 2.0at your option... _PYPI: https://pypi.org.. _example: https://docs.python.org/3/library/selectors.html.. _MIT: https://choosealicense.com/licenses/mit.. _Apache: https://choosealicense.com/licenses/apache-2.0
Package: seledri-dennsgh
SeledriOverviewThis project provides a robust task scheduling system, utilizing aWorkerclass for task execution and aTimekeeperclass for managing task scheduling and lifecycle. It is designed to handle tasks efficiently, ensuring they are executed and cleaned up properly.FeaturesTask Execution: Execute tasks at specified times with the ability to pass arguments and keyword arguments.Task Scheduling: Schedule tasks with precision and handle their lifecycle.Logging: Comprehensive logging for monitoring task execution and job management.Modularity: Clear separation of concerns between task execution (Worker) and scheduling (Timekeeper).InstallationTo set up the project environment, follow these steps:Clone the repository:git clone https://your-repository-url.gitNavigate to the project directory:cd seledriInstall dependenciespip install apschedulerUsage...Starting the Schedulerfromworker.worker_apsimportWorkerfromscheduler.timekeeperimportTimekeeperfrompathlibimportPath# Initialize the Workerworker=Worker(function_map_file=Path("path_to_function_map.json"))# Start the workerworker.start_worker()# Initialize the Timekeeper with the worker instancetimekeeper=Timekeeper(persistence_file=Path("path_to_jobs.json"),worker_instance=worker)
Package: selee
selee Packageseleeis a python package that contains the functionfizz_buzz()in selee_module.Thefizz_buzz()function accepts a single argument, x and returns the output as string or the same type of the input x, using the below logic:Multiples of 3 returns “Fizz” instead of the numberMultiples of 5 return “Buzz”.For integers which are multiples of both 3 and 5 return “FizzBuzz”Any other cases return the inputQuick StartThis is a short introduction and quickstart for theseleepackage.fizz_buzzapplication starts by installing selee packagefrom selee import selee_moduleUsers can check the result of thefizz_buzzfunction by putting the input x inside the parentheses.selee_module.fizzbuzz(x)Examplesfrom selee import selee_module

selee_module.fizzbuzz(2)
 >> 2
selee_module.fizzbuzz(3)
 >> Fizz
selee_module.fizzbuzz(5)
 >> Buzz
 selee_module.fizzbuzz(15)
 >> FizzBuzzTestSeven test cases are included in theunit_test.py.
Below is the code for running those test cases.python -m unittest tests/unit_test.py
Package: selee-pk
selee_pk Packageselee_pkis a python package that contains the functionfizz_buzz()in selee_module.Thefizz_buzz()function accepts a single argument, x and returns the output as string or the same type of the input x, using the below logic:Multiples of 3 returns “Fizz” instead of the numberMultiples of 5 return “Buzz”.For integers which are multiples of both 3 and 5 return “FizzBuzz”Any other cases return the inputInstallationPython>=3.6 is needed.pip install selee_pkQuick StartThis is a short introduction and quickstart for theselee_pkpackage.fizz_buzzapplication starts by installing selee packagefrom selee_pk import selee_moduleUsers can check the result of thefizz_buzzfunction by putting the input x inside the parentheses.selee_module.fizzbuzz(x)Examplesfrom selee_pk import selee_module

selee_module.fizzbuzz(2)
 >> 2
selee_module.fizzbuzz(3)
 >> Fizz
selee_module.fizzbuzz(5)
 >> Buzz
 selee_module.fizzbuzz(15)
 >> FizzBuzzTestSeven test cases are included in theunit_test.py.
Below is the code for running those test cases.python -m unittest tests/unit_test.py
Package: selena-agent
IntroductionSelena is a tool for monitoring website performance by monitoring response
times, response codes and site content (via keyword checks).This is its agent part responsible for gathering the data and sending back
the results.InstallationRequirementsSelena agent requires Python 2.7 which is included in the latest Ubuntu Server 12.04 LTS systems:$ sudo apt-get install python-dev python-virtualenvDependencies:$ sudo apt-get install libcurl3 libcurl4-openssl-devMessage queueSelena agent communicates with a central queue withRedisas the broker. Install redis:$ sudo apt-get install redis-serverSince lost tasks can always be sent again, the durability guarantees which Redis
provides by default are not necessary. You can significantly speed up the queue
by commenting out thesavelines from/etc/redis/redis.conf.We can check the status of the Redis server:$ redis-cli -h localhost -p 6379 -n 0 infoVirtual EnvironmentCreate a virtual environment for Python in the user’s home directory:$ virtualenv . --distribute --no-site-packagesSystem UserUnprivileged and not owned by a person:$ sudo adduser --home /home/selena-agent selena-agent
$ sudo su - selena-agentIn any shell the user canactivatethe virtual environment. As a result, the
default Python executable and helper scripts will point to those within the
virtualenv directory structure:$ which python
/usr/local/bin/python
$ source bin/activate
(selena-agent)$ which python
/home/selena-agent/bin/pythonInstalling from pipSimply invoke:(selena-agent)$ pip install selena-agentInstalling from sourcesAlternatively, to live on the bleeding edge, you can clone the selena-agent git
repository toprojectand install it manually:(selena-agent)$ git clone git://github.com/allegro/selena-agent.git project
(selena-agent)$ cd project
(selena-agent)$ pip install -e .ConfigurationCreate fileselena-agent/settings-local.pyand fill in the appropriate data:Fill Redis connection data:REDIS_CONNECTION = {
    'HOST': 'your redis host',
    'PORT': 'your redis port',
    'DB': None,
    'PASSWORD': None,
}RQ queue name:QUEUE_NAME = 'your RQ queue name'The salt has to match the one from the main Selena administration page:SALT = 'taken from Selena system'RunTo run selena-agent use the command:(selena-agent)$ selena-agentLicenseSelena is licensed under theApache License, v2.0.Copyright (c) 2013-2014Allegro Group.
Package: selenate
Web Automation made easy, built around SeleniumSetting upFirst off make sure your browser is up to date, selenate will by default usefirefox.Download the latest selenium server look for the latest version number directory, and find a file selenium-server-standalone-x.xx.x.jar and save it asselenium-server.jarInstall selenate$pipinstallselenateInstall the Java Runtime Environment if you have not already, instructions to do so arehere. It’s also very likely that your package manager can also install it for you.DocumentationDocumentation is available atreadthedocsCodingHere’s some basic code to start a browser and navigate a little bitfromselenateimportSelenatebrowser=Selenate()# start your browserbrowser.get("https://github.com/wmak/selenate")# go to this urlbrowser.click(".mega-octicon")# click on this css element
Package: selench
SelenchSelench is a Python WebDriver wrapper that simplifies the use of the Selenium library.
It provides a more concise syntax that makes the code more readable and easier to understand.Key FeaturesElements have an explicit wait time by defaultElement type detection ( CSS & XPATH )InstallationThe easiest way to install the latest version from PyPI is by usingpip:pipinstallselenchAlternatively, install directly from the GitHub repository:pipinstallgit+https://github.com/dsymbol/selench.gitDocumentationThe documentation can be found athttps://dsymbol.github.io/selench/ExamplesHere are some examples of how to use Selench:fromselenchimportSelench,Keys# Create a new Selench instancedriver=Selench()# Navigate to googledriver.get('https://google.com')# Search google for 'Hello World!'driver.element('input[name="q"]').send_keys('Hello World!',Keys.ENTER)# Quit the driverdriver.quit()Using PyTest:fromselenchimportSelench,Keysimportpytest# Create a fixture to provide the driver instance to the test functions@pytest.fixturedefdriver():driver=Selench()yielddriverdriver.quit()deftest_ddg_search_query(driver):# Define a search querykeyword='github'# Navigate to duckduckgodriver.get('https://duckduckgo.com/')# Search duckduckgo for the keyworddriver.element('*[name="q"]').send_keys(keyword,Keys.ENTER)# Wait for the page title to contain the keyworddriver.wait_for.title_to_contain(keyword)# Find all the result titlestitles=driver.elements('a[data-testid="result-title-a"] span')# Check that the keyword is present in each titlefortitleintitles:assertkeywordintitle.text.lower()
Package: selenew
SeleNewSeleNew is a framework over Selenium to simplify UI Test Automation.SeleNew is a beautified and simplified approach to make your work easy and much faster.
Why SeleNew? There is a list of advantages that will help you to implement UI Test Automation in a very simplified way.You don't need to worry about killing the browser. SeleNew will do it for you. This will happen automatically as soon as work with the browser is completed and browser no longer needed.You don't need to worry about the locator search strategy. Whether it's CSS_SELECTOR, XPATH, ID or something else, it doesn't matter, rest assured SeleNew will find the element if there is one on the page.We have the possibility of ago_aroundin SeleNew. What does it mean? So, it is not a secret and known fact that some elements may be flaky and will not be found for some reason, while they are on the page. SeleNew will go around as long as needed to find it. This option can be easily customized by you. You just need to change the value of thego_aroundparameterYou don't need to worry about waits and struggle with explicit and implicit waits. SeleNew will do it on your behalf. It will wait for the element if the element exists on the page. This option can be easily customized by you. You just need to change the value of thetimeoutparameter.SeleNew provides clear and beautiful logging and exceptions. It will make your debugging much more easyPre-requisitesPython >= 3.8Getting startedInstallationFirst install SeleNew by below commandpip install selenew==<version>To start work using SeleNew please import required components. Example below:from selenew.base.base_object import SelenewLet's do it as simple as possibleUse below simplified approach from SeleNewselenew.send_keys(".search", "search object")Instead of below complicated approach from SeleniumWebDriverWait(self.driver, 2).until(
            ec.visibility_of_element_located((By.CSS_SELECTOR, ".search"))
        ).send_keys("search object")SeleNew Built-in functionalitiesAllgo_around,timeoutandelement_stateparameters can be customized as shown belowgo_aroundfunctionalityDefine as many attempts as you like or use the default one. Default value: 3selenew = SeleNew(browser, go_around=5)timeoutfunctionalityDefine as many times as you like, or use the default one. Default value: 3selenew.click(".login-button", timeout=5)element_statefunctionalityUse one of supported states. Default value: "single_visible"All supported states:"single_visible""clickable""multiple_visible""invisible"selenew.click(".login-button", element_state="clickable")ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseThis project is licensed under the MIT License.Author© 2023Toghrul Mirzayev