Saravanan666/pypi-org huggingface dataset:
Package: rui
An imperfect Python ECSDocumentation:http://rui.rtfd.org.Github:http://github.com/timothyhahn/ruiFree software: BSD licensePyPI:https://pypi.python.org/pypi/rui/FeaturesA simple Python Entity Component SystemUnoptimizedFavors World based access, eschews Managers (Artemis, which inspired this, uses both)To learn more about Entity Component Systemshttp://www.gamedev.net/page/resources/_/technical/game-programming/understanding-component-entity-systems-r3013http://www.randygaul.net/2013/05/20/component-based-engine-design/http://gamadu.com/artemis/manual.htmlExamplesPress Space To Jump:https://github.com/timothyhahn/press-space-to-jumpHistory0.8.0(2014-1-27)Added example to READMEWorks decently well now!0.3.8(2014-1-27)You can now remove entities from groups0.3.5(2014-1-27)Groups now return empty list if there is no group of that name0.3.4(2014-1-26)Updated usage documentation to fix typoAdded partial (subset) component selection0.3.3(2014-1-26)Updated README with GitHub and PyPI linksSystems can now be removedEntities can now be removedEntities will now check if they are alive or else raise an exception0.3.2(2014-1-26)Added API documentation0.3.1(2014-1-25)Realized I already had an installation and usage section0.3.0(2014-1-25)Added usage documentationFixed capitalization in tests0.2.2(2014-1-25)Syntax error!0.2.1 (2014-1-25)Realized I was even doing that wrong - looked at Facebook’s tornado to figure it out0.2.0 (2014-1-25)Forgot a requirement for Travis-CI0.1.0 (2014-1-25)Added simple entity component systemFirst release on PyPI.
Package: ruia
Ruia🕸️ Async Python 3.6+ web scraping micro-framework based on asyncio.⚡ Write less, run faster.OverviewRuia is an async web scraping micro-framework, written withasyncioandaiohttp,
aims to make crawling url as convenient as possible.Write less, run faster:Documentation:中文文档|documentationOrganization:python-ruiaPlugin:awesome-ruia(Any contributions you make aregreatly appreciated!)FeaturesEasy: Declarative programmingFast: Powered by asyncioExtensible: Middlewares and pluginsPowerful: JavaScript supportInstallation# For Linux & Macpipinstall-Uruia[uvloop]# For Windowspipinstall-Uruia# New featurespipinstallgit+https://github.com/howie6879/ruiaTutorialsOverviewInstallationDefine Data ItemsSpider ControlRequest & ResponseCustomize MiddlewareWrite a PluginsTODOCache for debug, to decreasing request limitation,ruia-cacheProvide an easy way to debug the script,ruia-shellDistributed crawling/scrapingContributionRuia is still under developing, feel free to open issues and pull requests:Report or fix bugsRequire or publish pluginsWrite or fix documentationAdd test cases!!!Notice: We useblackto format the code.Thanksaiohttpdemiurge
Package: ruia-cache
ruia-cacheARuiaplugin for caching URLInstallationpipinstall-Uruia-cache# New featurespipinstallgit+https://github.com/python-ruia/ruia-cacheUsageruia-cachewill automatically cache the captured URL to prevent the second request to the target web page:importosfromruia_cacheimportRuiaCacheSpider# Set RUIA_CACHE pathos.environ.setdefault("RUIA_CACHE",os.path.dirname(__file__),)classDemo(RuiaCacheSpider):name="demo_spider"start_urls=["http://httpbin.org/get"]asyncdefparse(self,response):html=awaitresponse.text()print(html)if__name__=="__main__":Demo.start()# Using cache dataDemo.start()Enjoy it :)
Package: ruia-motor
ruia-motorARuiaplugin that uses the motor to store dataNotice:  Works on ruia >= 0.8.0Installationpipinstall-Uruia-motorUsageruia-motorwill be automatically store data to mongodb:fromruiaimportAttrField,Item,Response,Spider,TextFieldfromruia_motorimportRuiaMotorInsert,RuiaMotorUpdate,init_spiderclassHackerNewsItem(Item):target_item=TextField(css_select="tr.athing")title=TextField(css_select="a.storylink")url=AttrField(css_select="a.storylink",attr="href")asyncdefclean_title(self,value):returnvalue.strip()classHackerNewsSpider(Spider):start_urls=["https://news.ycombinator.com/news?p=1"]aiohttp_kwargs={"proxy":"http://0.0.0.0:1087"}asyncdefparse(self,response:Response):asyncforiteminHackerNewsItem.get_items(html=awaitresponse.text()):# Update data# https://motor.readthedocs.io/en/stable/api-asyncio/asyncio_motor_collection.html#motor.motor_asyncio.AsyncIOMotorCollection.update_oneyieldRuiaMotorUpdate(collection="hn_demo",filter={"title":item.title},update={"$set":item.results},upsert=True,)# Insert data# https://motor.readthedocs.io/en/stable/api-asyncio/asyncio_motor_collection.html#motor.motor_asyncio.AsyncIOMotorCollection.insert_one# yield RuiaMotorInsert(collection="hn_demo", data=item.results)asyncdefinit_plugins_after_start(spider_ins):spider_ins.mongodb_config={"host":"127.0.0.1","port":27017,"db":"ruia_motor"}init_spider(spider_ins=spider_ins)if__name__=="__main__":HackerNewsSpider.start(after_start=init_plugins_after_start)Enjoy it :)
Package: ruia-peewee-async
ruia-peewee-asyncARuiaplugin that usespeewee-asyncto store data to MySQL or PostgreSQL or both of them.InstallationUsingpiporpipenvorpoetryto install.pipinstallruia-peewee-async[aiomysql]pipenvinstallruia-peewee-async[aiomysql]poetryaddruia-peewee-async[aiomysql]or

pipinstallruia-peewee-async[aiopg]pipenvinstallruia-peewee-async[aiopg]poetryaddruia-peewee-async[aiopg]or

pipinstallruia-peewee-async[all]pipenvinstallruia-peewee-async[all]poetryinstallruia-peewee-async[all]ruia-peewee-async[all]means to install both aiomysql and aiopg.UsageA complete example is inthe example directory.There's acreate_modelmethod to create the Peewee model based on database configuration.
You can use thecreate_modelmethod to manipulate tables before starting the spider.fromruia_peewee_asyncimportcreate_modelmysql_model,mysql_manager,postgres_model,postgres_manager=create_model(mysql=mysql)# or postgres=postgres or both# create the table at the same timemysql_model,mysql_manager,postgres_model,postgres_manager=create_model(mysql=mysql,create_table=True)# or postgres=postgres or bothrows=mysql_model.select().count()print(rows)And classSpiderfromruia_peewee_asynchas attributes below related to database you can use.frompeeweeimportModelfromtypingimportCallable,DictfromtypingimportOptionalasTOptionalfrompeewee_asyncimport(AsyncQueryWrapper,Manager,MySQLDatabase,PooledMySQLDatabase,PooledPostgresqlDatabase,PostgresqlDatabase,)fromruiaimportSpiderasRuiaSpiderclassSpider(RuiaSpider):mysql_model:Union[Model,Dict]# It will be a Model instance after spider started.mysql_manager:Managerpostgres_model:Union[Model,Dict]# same abovepostgres_manager:Managermysql_db:MySQLDatabasepostgres_db:PostgresqlDatabasemysql_filters:TOptional[AsyncQueryWrapper]postgres_filters:TOptional[AsyncQueryWrapper]For more information, check outpeewee's documentationandpeewee-async's documentation.DevelopmentUsingpyenvto install the version of python that you need.
For examplepyenvinstall3.7.9Then go to the root of the project and run:poetryinstall&&poetryinstall-Eaiomysql-Eaiopgto install all dependencies.MacOS users have to runbrew install postgresqlto install postgresql and export thepg_configto the PATH,
so that thepsycorg2dependency can be installed successfully with pip.Usingpoetry shellto enter the virtual environment.
Or open your favorite editor and select the virtual environment to start coding.Usingpytestto run unit tests undertestsfolder.Usingpytest --cov .to run all tests and generate coverage report in terminal.Thanksruiapeewewpeewee-asyncaiomysqlaiopgschemapytest and its awesome plugins
Package: ruia-pyppeteer
ruia-pyppeteerARuiaplugin for loading javascriptNotice:  Works on ruia >= 0.8.0Installationpipinstallruia_pyppeteer# New featurespipinstallgit+https://github.com/ruia-plugins/ruia-pyppeteerUsageruia_pyppeteerwill load js by using pyppeteer.You need to pay attention when you use load_js, it will download a recent version of Chromium (~100MB). This only happens once.Load JavaScriptimportasynciofromruia_pyppeteerimportPyppeteerRequestasRequestrequest=Request("https://www.jianshu.com/",load_js=True)response=asyncio.get_event_loop().run_until_complete(request.fetch())print(response)Complete examplefromruiaimportAttrField,Item,TextFieldfromruia_pyppeteerimportPyppeteerSpiderasSpiderclassJianshuItem(Item):target_item=TextField(css_select="ul.list>li")author_name=TextField(css_select="a.name")author_url=AttrField(attr="href",css_select="a.name")asyncdefclean_author_name(self,author_name):returnauthor_name.strip()asyncdefclean_author_url(self,author_url):returnf"https://www.jianshu.com{author_url}"classJianshuSpider(Spider):start_urls=["https://www.jianshu.com/"]concurrency=10asyncdefparse(self,response):html=awaitresponse.page.content()asyncforiteminJianshuItem.get_items(html=html):# Loading js by using PyppeteerRequestprint(item)awaitresponse.browser.close()if__name__=="__main__":JianshuSpider.start()Enjoy it :)
Package: ruia-ua
ruia-uasimple user-agent middleware forRuiaInstallationpipinstall-Uruia-uaUsageruia-uawill be automatically with a randomUser-Agentfor your request'sheadersfromruiaimportAttrField,TextField,Item,Spiderfromruia_uaimportmiddlewareclassHackerNewsItem(Item):target_item=TextField(css_select='tr.athing')title=TextField(css_select='a.storylink')url=AttrField(css_select='a.storylink',attr='href')classHackerNewsSpider(Spider):start_urls=['https://news.ycombinator.com/news?p=1','https://news.ycombinator.com/news?p=2']asyncdefparse(self,response):# Do something...print(response.html)if__name__=='__main__':HackerNewsSpider.start(middleware=middleware)Enjoy it :)
Package: ruins-app
# RUINS climate data and regional model app![GitHub release (latest by date)](https://img.shields.io/github/v/release/hydrocode-de/RUINSapp?color=success&logo=Github)
![PyPI](https://img.shields.io/pypi/v/ruins-app?color=success&logo=PyPI)
[![Test RUINS](https://github.com/hydrocode-de/RUINSapp/actions/workflows/main.yml/badge.svg)](https://github.com/hydrocode-de/RUINSapp/actions/workflows/main.yml)
[![Docker Image CI](https://github.com/hydrocode-de/RUINSapp/actions/workflows/docker-image.yml/badge.svg)](https://github.com/hydrocode-de/RUINSapp/actions/workflows/docker-image.yml)
[![codecov](https://codecov.io/gh/hydrocode-de/RUINSapp/branch/main/graph/badge.svg?token=SFxENKltZb)](https://codecov.io/gh/hydrocode-de/RUINSapp)This is a compilation of tools to assess and visualise climate data and climate model projections at the German North Sea coast. This app is intended to especially focus on the treatment of uncertainties within the data and model projections.For more information about the RUINS project, see our website.All data is public domain from the respectively quoted sources. The tools are developed in Python under MIT license without any liability.
Please join, fork, reuse…## Development State[Pre-Release Checklist](https://github.com/hydrocode-de/RUINSapp/issues/20)### Applications[Weather Explorer Overview](https://github.com/hydrocode-de/RUINSapp/issues/21)[Climate Explorer Overview](https://github.com/hydrocode-de/RUINSapp/issues/29)[Management Explorer Overview](https://github.com/hydrocode-de/RUINSapp/issues/32)
Package: ruishi
ruishi睿视门禁API的封装使用方法fromruishiimportRuishifromruishi.modelsimportUserCreateuser=Ruishi(UserCreate(username='yourusername',password='yourpassword'))rooms=user.get_room_list()print([room.dict()forroominrooms])doors=user.get_device_list([room.nodeUuid.hexforroominrooms])print(print([door.dict()fordoorindoors]))print(user.open_door('dooruuid'))
Package: rukip
rukipAn Embedded CKIP Rasa NLU ComponentsIntroductionThis open-source library implementsRasacustom components.It offerstokenizerandfeaturizerpowered byckiptaggeras components in RasaNLU pipeline.Installationpipinstallrukiprukip is a python library hosted on PyPI. Requirements:python >= 3.6rasa >= 1.4.0ckiptagger[tf] >= 0.0.19UsageDownload model filesThe model files are available on several mirror sites.iis-ckipgdrive-ckipgdrive-jacobvsdannielYou can download and extract to the desired path by the following steps:Downloads to./data.zipExtracts to./data/AddCKIPTokenizercomponent into rasa nlu pipeline and configure model_path as./data.The following is the exampleRasa NLU config filelanguage:"zh"pipeline:-name:"rukip.tokenizer.CKIPTokenizer"model_path:"./data"-name:"rukip.featurizer.CKIPFeaturizer"model_path:"./data"token_features:["word","pos"]-name:"CRFEntityExtractor"features:[["ner_features"],["ner_features"],["ner_features"]]-name:"CountVectorsFeaturizer"-name:"EmbeddingIntentClassifier"ComponentsCKIPTokenizerThis component hasonerequired field (model_path) to be configured and offerstwooptional fields for user to assign dictionaries.recommend_dict_pathis the file containing list of user-defined recommended-word. Default isNonecooerce_dict_pathis the file containing a list of must-word. Default isNoneThe following is the example of user-defined dictionary. Each line shows one pair of word and weight.土地公 1
土地婆 1
公有 2
來亂的 1
緯來體育台 1CKIPFeaturizerThis component hasonerequired field (model_path) to be configured and offers another optional fields for user to assign.token_featuresis list of features extracted from ckiptagger to generatener_features. Default is["word", "pos"]Development$>gitclonegit@github.com:circlelychen/rukip.git
$>pipinstall-rrequirements-to-freeze.dev.txt
$>maketestLicenselicensed under the GNU General Public License v3.0
Package: rul-adapt
RUL AdaptThis library contains a collection of unsupervised domain adaption algorithms for RUL estimation.
They are provided asLightningModulesto be used inPyTorch Lightning.Currently, five approaches are implemented, including their original hyperparameters:LSTM-DANNby Da Costa et al. (2020)ADARULby Ragab et al. (2020)LatentAlignby Zhang et al. (2021)TBiGRUby Cao et al. (2021)Consistency-DANNby Siahpour et al. (2022)Three approaches are implemented without their original hyperparameters:ConditionalDANNby Cheng et al. (2021)ConditionalMMDby Cheng et al. (2021)PseudoLabelsas used by Wang et al. (2022)This includes the following general approaches adapted for RUL estimation:Domain Adaption Neural Networks (DANN)by Ganin et al. (2016)Multi-Kernel Maximum Mean Discrepancy (MMD)by Long et al. (2015)Each approach has an example notebook which can be found in theexamplesfolder.InstallationThis library is pip-installable. Simply type:pipinstallrul-adaptContributionContributions are always welcome. Whether you want to fix a bug, add a feature or a new approach, just open an issue and a PR.
Package: rul-datasets
RUL DatasetsThis library contains a collection of common benchmark datasets forremaining useful lifetime (RUL)estimation.
They are provided asLightningDataModulesto be readily used inPyTorch Lightning.Currently, five datasets are supported:C-MAPSSTurbofan Degradation DatasetFEMTO(PRONOSTIA) Bearing DatasetXJTU-SYBearing DatasetN-C-MAPSSNew Turbofan Degradation DatasetDummyA tiny, simple dataset for debuggingAll datasets share the same API, so they can be used as drop-in replacements for each other.
That means, if an experiment can be run with one of the datasets, it can be run with all of them.
No code changes needed.Aside from the basic ones, this library contains data modules for advanced experiments concerningtransfer learning,unsupervised domain adaptionandsemi-supervised learning.
These data modules are designed ashigher-order data modules.
This means they take one or more of the basic data modules as inputs and adjust them to the desired use case.InstallationThe library is pip-installable. Simply type:pipinstallrul-datasetsContributionContributions are always welcome. Whether you want to fix a bug, add a feature or a new dataset, just open an issue and a PR.
Package: rule
RuleA rule engine written in python.The rule is a json/yaml string or python object of a list expression.
The expression is like[op, arg0, arg1, ..., argn], theopis the operator,
andarg0..nis the arguments for the operator. Any argument can be another expression.For writing convenience, the first argument will be tried to resolve as the context parameter.
Or, you can just use the specialvaroperator to indicate the context parameter.Usage>>> from rule import Rule
>>>
>>> context = dict(a=1, world='hello')
>>> Rule(['=', ['var', 'a'], 1]).match(context)
True
>>> Rule("['=', ['var', 'a'], 1]").match(context)
True
>>> Rule(['=', 'a', 1]).match(context)
True
>>> Rule(['=', 'hello', 'hello']).match(context)
True
>>> Rule(['=', 'world', 'hello']).match(context)
True
>>> Rule(['<', 'a', 10]).match(context)
True
>>> Rule(['=', ['>', 'a', 10], False]).match(context)
True
>>>
>>> context = dict(ldap_id='Harry', hosts='sa,sb,sc', reason='hehe', nologin=False,
...                group='wheel,sysadmin,platform', package='dev-python/sa-tools',
...                branch='release', cc='Tony,Mike',)
>>> Rule(['contains', 'hosts', 'sa,']).match(context)
True
>>> Rule(['contains', ['split', 'hosts', ','], 'sa']).match(context)
True
>>> Rule(['in', 'branch', 'master', 'release']).match(context)
True
>>> Rule(['=', 'ldap_id', 'Harry']).match(context)
True
>>> Rule(['match', 'package', 'dev-python/*']).match(context)
True
>>> Rule(['regex', 'package', 'dev-python/.*']).match(context)
True
>>> Rule(['is', 'nologin', False]).match(context)
TrueSeerule/op.pyfor more supported operators.Licensehttp://tclh123.mit-license.org/
Package: rule30py
Rule30Installationpipinstallrule30pyUsagefromrule30importrandom,Rule30Randomprint(random())# to use the Psuedo-Random Number Generatorrng=Rule30Random()print(rng.random())print(rng.getrandbits(8))# all the methods of random.Random are available, such as:print(rng.randint(0,100))print(rng.uniform(0,1))print(rng.choice(range(10))print(rng.sample(range(10),3))
Package: rule34Py
rule34pyPython api wrapper forrule34.xxx.Getting StartedInstall it using pippip install rule34pyInstall it from Sourcegit clone https://github.com/b3yc0d3/rule34Py.git
cd rule34Py
python setup.py sdist
pip install -e .DocumentationYou can find the documentationhere.[!NOTE]
The documentation might move in the future.Code Snippetfromrule34Pyimportrule34Pyr34Py=rule34Py()# get comments of an postr34Py.get_comments(4153825)# get post by its idr34Py.get_post(4153825)# get top 100 icamer34Py.icame()# search for posts by tag(s)r34Py.search(["neko"],page_id=2,limit=50)# get pool by idr34Py.get_pool(17509)# get a random post (in this case with tag(s))random=r34Py.random_post(["neko"])# get general site statsr34Py.stats.top_taggers()r34Py.stats.top_commenters()r34Py.stats.top_forum_posters()r34Py.stats.top_image_posters()r34Py.stats.top_note_editors()r34Py.stats.top_favorites()DevelopmentFollow these steps to setup everything needed to develop on rule34Py.Currently this setup guide only shows how it is done on unix-like systems.Clone This Repositorygit clone https://github.com/b3yc0d3/rule34Py.git

cd rule34Py

git checkout developSetting Up Virtual Python Environmentpython -m venv venv

source venv/bin/activateTo deactivate the virtual environment type the following in your terminaldeactivateInstall and Build rule34Py in the Virtual Environmentpython3 -m build -s -w -n

pip install -e .Committing your ChangesBranch name should be prefixed withfix-when fixing an bug/errorfeat-when a feature got addedchore-everything else that doesn't fall in the above categoriesThe title must be descriptive, what your pull request changes/does.Write a breve description of what the pull request does/solves in the commit.If your pull request fixes an issue, please mention that issue in the commit title.Example structure of a commit messagehere goes the title of the commit

Here goes the descriptionThe title shall not be longer then 50 characters.Select thedevelopbranch for pull requests.
Package: rulebase_symbols_detector
rulebase_symbols_detectorDescriptionLet people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.Installationpip install rulebase_symbols_detectorRequirementspip install https://gitlab.com/trungtv/vi_spacy/-/raw/master/vi_core_news_lg/dist/vi_core_news_lg-0.0.1.tar.gz
pip install pyvi
pip install undertheseaUsagefrom rulebase_symbols_detector.question_symbol_detector import QuestionSymbolDetector
question_symbol_detector = QuestionSymbolDetector()
print(question_symbol_detector.detect('Tin tức HPG'))SupportTell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.RoadmapIf you have ideas for releases in the future, it is a good idea to list them in the README.ContributingState if you are open to contributions and what your requirements are for accepting them.For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.Authors and acknowledgmentShow your appreciation to those who have contributed to the project.LicenseFor open source projects, say how it is licensed.Project statusIf you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
Package: ruleCore
The ruleCore Engine is an event-driven rule engine that manages and executes
reaction rules.The ruleCore Engine provides capabilities for detection of complex patterns of
events, called situations. Events can be combined with logical and temporal
operators in order to describe complex situations. When a situation is detected,
the ruleCore Engine can execute an action to alert external applications or
users of the situation.The ruleCore Engine is fed with events through connectors. Currently connector
implementations exists for plain sockets, XML-RPC, IBM WebSphere MQ and TIBCO
Rendezvous.
Package: ruledownloader
Rule DownloaderThis is a tool to aid in the downloading and archival of Snort
rulesets.  It also includes a tool, rulechanges.py to itemize the
changes from one version of a ruleset to another.ConfigurationThe ruledownloader is configured with an INI style file.  The
configuration file is passed to the ruledownloader with the -c command
line switch.  Alternatively, the ruledownloader will look for a file
named ruledownloader.conf in the current directory and use that.Example Configuration[general]

# The dest-dir parameter tells ruledownloader where to place the
# files it downloads.  Subdirectories will be created under this
# directory for each conifgured ruleset.
dest-dir = .

# A ruleset configuration for a VRT subscription ruleset for Snort
# 2.9.0.4.
[ruleset vrt-subscription-2904]

# Set to no to skip downloading this ruleset.
enabled = yes

# The URL this ruleset is found at.
url = http://www.snort.org/sub-rules/snortrules-snapshot-2904.tar.gz/<yourOinkCodeHere>

# Another ruleset configuration.
[ruleset et-open-290]
enabled = yes
url = http://rules.emergingthreats.net/open/snort-2.9.0/emerging.rules.tar.gzDirectory StructureWithin the configured destination directory each policy will get its
own directory based on on the name of the policy.  That directory will
contained timestamped directory names based on when the ruleset was
downloaded.  A symlink names 'latest' will point to the most recently
downloader version of the ruleset.ExampleGiven the et-open-290 ruleset configuration above the following
directory structure will be created../et-open-290/201104070917/emerging.rules.tar.gz
./et-open-290/201104071531/emerging.rules.tar.gz
./et-open-209/latest -> 201104070917Reporting ChangesThe rulechanges script can report the difference between an old and
new version of a ruleset.Usage:./rulechanges.py <oldRuleset.tar.gz> <newRuleset.tar.gz>