Saravanan666/pypi-org huggingface dataset:
Package: factorialhr
FactorialHR api python wrapperThis package provides a python wrapper to theapi of FactorialHR.DisclaimerI am not affiliated, associated, authorized, endorsed by, or in any way officially connected with EVERYDAY SOFTWARE, S.L. or FactorialHR, or any of its subsidiaries or its affiliates. The official factorialhr.com website can be found athttps://factorialhr.com/Unfortunately, the documentation is not detailed and updated, such that many parameters have been reverse engineered and
may be wrong or change at any time. If you encounter some
problems,open an issueorcontributethe fix yourself.UsageGet all employeesfromfactorialhrimportendpointsasyncwithendpoints.NetworkHandlerasapi:endpoint=endpoints.EmployeesEndpoint(api)all_employees=awaitendpoint.all()Get a dictionary with team id as key and a list of member as valuefromfactorialhrimportendpointsfromfactorialhrimportmodelsasyncwithendpoints.NetworkHandler('<api_key>')asapi:e_endpoint=endpoints.EmployeesEndpoint(api)t_endpoint=endpoints.TeamsEndpoint(api)all_employees=awaite_endpoint.all()all_teams=awaitt_endpoint.all()employees_by_team_id:dict[int,models.Employee]={team.id:[eforeinall_employeesife.idinteam.employee_ids]forteaminall_teams}TODOtestsoauth2 supportFamily situation endpointContract versions endpointSupplements endpointShift management endpointBreaks endpointApplication endpointATS messages endpointExpenses endpointGet Custom Table FieldsCreates a custom table valueContributeFeel free to contribute! Please fork this repository, install the development dependencies withpip install -e ".[dev]"and create pull request.
Package: factorio
factorio: A fixtures replacement toolfactoriois a fixtures replacement tool that's been heavily influenced byfactory boy. It's intention is to hide irrelevant fields when
writing a test.Even though it's been designed to play well with various ORMs, it tries to
avoid any interaction with a database, as the saving/retrieving an object
shouldn't be the responsibility of the factory.Under the hood it usesfakerto create realistic values for each field.LinksDocumentationChangelog
Package: factorio-balancers
factorio-balancersDescriptionThis package provides a framework to import and test belt balancers
from the game factorio.It is able to check a blueprint for belt input and output balance, full
throughput on regular use, and throughput unlimitedness.
It fully supports all vanilla belt types, sideloading and priority splitters
(currently ignores filters)A website for balancers with this program integrated coming soon atfactoriobalancers.comUsageYou can use thebalancer_testcommand to use the main balancer
testing tool on the command line.The following is the output of:$ balancer_test -husage: balancer_test [-h] [-f FILE] [-nb] [-t] [-s] [-es] [--string STRING]
                     [--silent]

Test a balancer configuration for its properties

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  The file from which to read the blueprint string
  -nb, --nobalance      If for any reason you don't want to test the balance
                        of the balancer
  -t, --trickle         Performs a balance test using belts that are not full
  -s, --sweep           Performs a throughput test on all combinations where
                        exactly 1 or 2 inputs and outputs are used
  -es, --extensivesweep
                        Performs a throughput test on all combinations of the
                        same number of inputs and outputs
  --string STRING       The blueprint string to parse
  --silent              Tell the script not to write intermediate data to the
                        screen. Note: this prints raw function results on exit
                        that are very user-unfriendly.
Package: factorio-changelog-creator
Factorio Changelog CreatorThis is a quick and dirty python script for generating changelog for Factorio mods in various formats.Quick installInstall latest version from PYPIpip install factorio-changelog-creatorInstall the current dev version fromGitHubpip install git+https://github.com/Roang-zero1/factorio-changelog-creator.gitUsageGet the script file and put it somewhere on your computer.Run the script from the command line usingfactorio-changelog-creator. If no parameters are given, it will look for a file namedchangelog.jsonin the directory it was called from and it will output into the same directory.There is a command line help available, which can be outputted withfactorio-changelog-creator -h.usage: factorio-changelog-creator [-h]
                                  [-f {md,ingame,forum} [{md,ingame,forum} ...]]
                                  [-v]
                                  [output_dir] [input_file]

Factorio changelog generator

positional arguments:
  output_dir            Directory where the files will be written
  input_file            JSON file to parse for changes

optional arguments:
  -h, --help            show this help message and exit
  -f {md,ingame,forum} [{md,ingame,forum} ...], --formats {md,ingame,forum} [{md,ingame,forum} ...]
                        Which format[s] should be generated
  -v, --verbose         Output verbosityBy default the markdown and in-game changelog will be generated. The forum changelog can be generated withpython3 changelog-script.py -f forum.changelog_forum.txt: The syntax forums.factorio.com usesCHANGELOG.md: A markdown syntax that should work both on mods.factorio.com and GitHubchangelog.txt: The syntax the game uses - this is what should be left in the modFormatThe changelog definition file should be a JSON file containing a dictionary of version dictionaries.The format of the dictionary is this:{"0.1.0":{"date":"2019-06-08",--Optional,canbeanything"Changes":["Change without category"],--ChangeswillbeputintheOtherCategory"Categories":{--Categoriesmaybeanystring"Features":["Change in category"]}}}Changes can be declared as simple strings, or as a table in the following format:{"change":"Change description",--Mandatory"more":"https://link.to.nowhere.com",--Optional"by":"Name",--Optional}moreandbywork in the same way, but have different meanings:moreis a link with more information andbyis
the author of the change.
They can be either a single entry or a list of entries, the list will be outputted comma-separated.
Each entry may either be a plain string that will be directly used or a dictionary with a single entry in the format:{"url_text":"url_target"}Depending on the format either a link will be generated of if this in not possiblemorewill use theurl_targetvalue andbywill use theurl_text.AcknowledgementInitial Lua implementation by theRustyKnife/factorio-changelog-script
Package: factoriolib
factoriolibThis repository contains a python package able to create and mainpulate factorio blueprintUsageBasicsIn order to create simple blueprints you can simply create the entity objects needed and push them into the blueprint's entities list:fromfactoriolibimportentitiesfromfactoriolibimportblueprintsfromfactoriolib.coreimportPosition,Direction# Create a set of entity instancestransportBelt=entities.TransportBelt(position=Position(0.5,-0.5),direction=Direction(Direction.EAST))inserter=entities.Inserter(position=Position(0.5,0.5),direction=Direction(Direction.SOUTH))chest=entities.WoodenChest(position=Position(0.5,1.5))pump=entities.Pump(position=Position(1.5,0.5),direction=Direction(Direction.NORTH))# create a blueprint instanceblueprint=blueprints.Blueprint()# access the blueprint's entities and push all newly created entities into itblueprint.entities().push(transportBelt,inserter,chest,pump)# print the dict representation of the blueprintprint(blueprint.toDict())# print the factorio exchange stringprint(blueprint.exchangeString())The generated exchange string can be imported into your game.FiltersSome entities such as chests may have logistics filters or a bar (the limit as to how many slots may be filled).fromfactoriolibimportentitiesfromfactoriolibimportblueprintsfromfactoriolib.coreimportPosition,LogisticFilterfromfactoriolib.itemsimportWood,IronPlate# Create a requester chest for wood and iron plates with a limit to 3 slotschest=entities.LogisticChestRequester(position=Position(0.5,0.5),bar=3)# add the filters (note that the index is 1 based)chest.request_filters().push(LogisticFilter(Wood.name(),1,1337),LogisticFilter(IronPlate.name(),2,42),)Circuit networkEntities that may be connected to a circuit network may be connected using the ConnectionMaker helper:fromfactoriolibimportentitiesfromfactoriolibimportblueprintsfromfactoriolib.coreimportPosition,CircuitCondition,Signalfromfactoriolib.utilityimportConnectionMakerfromfactoriolib.itemsimportWoodpole=entities.MediumElectricPole(position=Position(0.5,0.5))inserter=entities.Inserter(position=Position(5.5,0.5))# set the stack size to 1inserter.override_stack_size(1)# set the circuit condition to wood signal greater than 1337inserter.circuit_condition(CircuitCondition(first_signal=Signal(Wood.name(),type="item"),constant=1337,comparator=">"))# connect both entities by red wireConnectionMaker.make(inserter,pole,"red")
Package: factorio-rcon-py
factorio-rcon-pyA simple Factorio RCON clientInstallWithout async supportpip install factorio-rcon-pyWith async supportpip install factorio-rcon-py[async]Async support is available as soon as the required dependency (anyio) is installed, sopip install factorio-rcon-py anyiois mostly equivalent, but not recommended due to dependency versioning.Python 3.8+ is required.UsageExample:importfactorio_rconclient=factorio_rcon.RCONClient("127.0.0.1",12345,"mypassword")response=client.send_command("/help")All documentation is in the docstrings of each class/method.Asynchronous usage of this module is possible thanks toanyio. This means that you can use the async client with asyncio and trio. Use the AsyncRCONClient class. More details are in its docstring.Available methods in both classes are (see docstrings for more info):connect - Connects to the RCON server.close - Closes the connection to the RCON server.send_packet - Sends a packet to the RCON server.receive_packet - Receives a packet from the RCON server.send_command - Sends a single command to the RCON server.send_commands - Sends multiple commands to the RCON server.Note that both the sync/async clients can be used as sync/async context managers respectively.The methods for sending/receiving packets are available in case you want to
write your own packet handlers, but in most cases you will never need to touch
these and can use send_command(s).MentionsThanks to:Truman Kilenfor the initial code / idea.De Sa Léofor contributing context manager support.LicenseLGPLv2.1
Package: factorlab
factorlabPython library which enables the transformation of raw data into informative alpha and risk factors used in the investment algorithm development processInstallation$pipinstallfactorlabUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensefactorlabwas created by Systamental. It is licensed under the terms of the Apache License 2.0 license.Creditsfactorlabwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: factornado
Permission is hereby granted, free of charge, to any person obtaining a copy ofthis software and associated documentation files (the "Software"), to deal inthe Software without restriction, including without limitation the rights touse, copy, modify, merge, publish, distribute, sublicense, and/or sell copiesof the Software, and to permit persons to whom the Software is furnished to doso, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.Description: factornado==========Factory for creating micro-services with tornado0.11~~~- Allow to override register url with host_url in the configuration file0.10.0~~~- Swagger is now in openapi 3.0.00.9~~~- Create a `authentication` decorator to check authentication and roles for endpoints. Works fine with keycloak (5337753, 659dc3a)- Create a `get_token` method to generate JWT token using SSO server (edca747)- Default handlers need to be declare in the final service (e2164b3)- WebMethod use URL rather URI (fb2c5ef)0.8~~~- Reorganize processes so that they are all child of main process (853d6e8)- Create a `logger` submodule for simpler log configuration (fb2f20e)0.7~~~- handlers.RequestHandler has now methods to parse args and kwargs (3c28e0f)- Todo and Do handlers push errors traceback to tasks server (5c49712)- Close properly AsyncHTTPClient in Heartbeat.post (a98317c)0.6~~~- Proxy properly service error reason (5e50a20)- Avoid multiple task assignment when multithreading tasks example (0d3fa50)0.5~~~- Method Application.get_host (7e63ec3)- Todo.todo_loop has been replaced by Todo.todo_list with different signature (16c684e)- New handlers.Log handler is set by default (e0d972d)- Callbacks are not only on POST methods (9b2fc96)0.4~~~- Tasks handlers are incorporated into the library (in `factornado.tasks`)- All examples have a swagger attribute.0.3~~~- Several example on how to use factornado- Tests based on these examples- application.WebMethod allows to pass headers- heartbeat reorganized to be asynchronous- possibility to stop the server- shortcut factornado.RequestHandler to tornado.web.RequestHandler0.2~~~- Application object lets you run a server in a few lines- Todo and Do handler let you create periodicTasks in a few lines0.1~~~- A first versionKeywords: microservices web tornadoPlatform: UNKNOWNClassifier: Programming Language :: Python :: 2.7Classifier: Programming Language :: Python :: 3.4Classifier: Programming Language :: Python :: 3.5Classifier: License :: OSI Approved :: MIT LicenseClassifier: Development Status :: 5 - Production/Stable
Package: factor-reader
factor_reader相关链接说明文档pypiGithub安装与升级首次安装pipinstallfactor_reader升级pipinstallfactor_reader--upgrade使用factor_reader目前共包含两个功能：查看目前包含哪些因子，以及每个因子的基本信息读取某一因子在某段时间上的因子数据importfactor_reader# 第一步：实例化一个FactorReader对象，输入tokentoken='xxxxxxxxxx'fr=factor_reader.FactorReader(token)# 第二步：查看当前因子数据库中有哪些因子（此步骤可选）fr.show_all_factors_information()# 展示所有可读取因子的相关信息# 第三步：读取因子数据## ①读取单日单个因子的数据fr.read_factor('球队硬币',trade_date=20230113)# 读取球队硬币因子在2023年1月13日的因子数据fr.read_factor('factor4',trade_date=20230113)# 读取方正金工多因子系列第4篇的因子在2023年1月13日的因子数据## ②读取多个交易日单个因子的数据fr.read_factor('球队硬币',start_date=20230101,end_date=20230113)# 读取球队硬币因子从2023年1月1日至2023年1月13日的因子数据fr.read_factor('factor4',start_date=20230101,end_date=20230113,sql_like=True)# 以sql的形式，读取方正金工多因子系列第4篇的因子从2023年1月1日至2023年1月13日的因子数据## ③读取多个交易日多个因子的因子数据fr.read_factor(['球队硬币','云开雾散'],start_date=20230101,end_date=20230113)# 分别读取球队硬币因子和云开雾散因子从2023年1月1日至2023年1月13日的因子数据fr.read_factor(['球队硬币','云开雾散','飞蛾扑火'],start_date=20230101,end_date=20230113,sql_like=True)# 以sql的形式，分别读取球队硬币因子、云开雾散因子、飞蛾扑火因子从2023年1月1日至2023年1月13日的因子数据fr.read_factor(['球队硬币','云开雾散','飞蛾扑火'],trade_date=20230113,sql_like=True)# 以sql的形式，分别读取球队硬币因子、云开雾散因子、飞蛾扑火因子2023年1月13日的因子数据
Package: factors
[![pypi-version]][pypi]# factorsGenerates actuarial factors for premium calculations## Installation$ pip install factors## RequirementsThese dependencies are automatically installed:Numpy
Pandas
xlrd
openpyxl## Example>> from factors.examples import example1
>> example1()## Changelog
See CHANGELOG.md for the latest changes.[changelog]: CHANGELOG.md
[pypi-version]:https://img.shields.io/pypi/v/factors.svg[pypi]:https://pypi.python.org/pypi/factors
Package: factorset
factorsetA Python package for computing chinese financial factors.Free software: MIT licenseDocumentation:https://factorset.readthedocs.io.Depository:https://github.com/quantasset/factorset/issues.Features20 sample factors.Async fundamental data collection module.Creditsfactorset:
Providing Financial factors set of Chinese A-share. 提供中国A股市场因子集合，包含各类常用及特异因子计算方法，持续更新中。
提供轻量级因子计算框架，高可扩展。持续更新中。Development Leadwingturb <http://idwzx.com>Code37 <495673131@qq.com>jiamicu <jamic-sai@qq.com>Mutex86 <gningh@gmail.com>Andyliwr <541989418@qq.com>Notmeor <531356207@qq.com>History0.0.2 (2018-05-04)Add Factors module with 20 sample factors.Imporved data collection module.0.0.1 (2018-04-19)First release on PyPI.
Package: factory-boss
Factory BossFake entire data schemas. Easily.Original repository:https://github.com/mariushelf/factory_bossUse caseFactory Boss can help you whenever you need to mock data schemas, for example when
you cannot work or develop with the original data for privacy, GDPR related issues
and security concerns.FeaturesFactory Boss can mock entire data schemas, including relationships and dependencies
between features and objects.Schema specifications are read from a simple yaml format.
The generated output is a list of dictionaries for each mocked entity, which can
easily be written to a database, converted to pandas DataFrames etc.InstallationThis package is available on PyPI and can be installed withpip install factory_boss.UsageMocking a data schema consists of two steps:Specify the schema.Generate data.Specify a schemaSchemas are specified in yaml, including relationships between entities and mock
rules.Seesimple_schema.yamlfor an example.Generate mock datafrompprintimportpprintimportyamlfromfactory_boss.generatorimportGeneratorfromfactory_boss.spec_parser.parserimportSpecParserwithopen("examples/simple_schema.yaml","r")asf:schema=yaml.safe_load(f)parser=SpecParser()parsed_spec=parser.parse(schema)generator=Generator(parsed_spec)instances=generator.generate()print("INSTANCES")print("=========")pprint(instances)Seefactory_boss/scripts/generate.pyfor
the full script.RoadmapMany much, above all documentation.Here are biggest "milestones":documentationfinalize the schema specificationsupport dynamic fields (generate fields via a Python function with other
fields as input)In theissues sectionthere are some more tickets.ContributingI'm more than happy to accept help in the form of bug reports, feature requests,
or pull requests, even though there is no formal "contribution guideline" yet.If you want to help just reach out to me :)AcknowledgementsThis work wouldn't be possible without the amazingfakerpackage.Factory Boss is also heavily inspired byfactory_boy,
but has a different focus. While factory_boy excels at generating single objects
and test fixtures, Factory Boss aims at faking entire data schemas. In that sense
it offers both a subset and a superset of factory_boy's features.LicenseMIT -- seeLICENSEAuthor: Marius Helf (helfsmarius@gmail.com)
Package: factoryboy-edsl
Factoryboy-edslFactoryboy helpers forElasticsearch-dsldocuments.Installationpip install factoryboy-edslUsageSimple usage:fromfactory_edslimportEDSLDocumentFactory,EDSLInnerDocFactoryfromelasticsearch_dslimportDocument,InnerDoc# Define elasticsearch-dsl documentsclassCommentDocument(InnerDoc):author=Text()content=Text()classPostDocument(Document):title=Text()comments=Nested(CommentDocument)classIndex:name="index_name"# Define factoriesclassCommentInnerDocFactory(EDSLInnerDocFactory):classMeta:model=CommentDocumentauthor=factory.Faker("name")content=factory.Faker("sentence",nb_words=4)classPostDocumentFactory(EDSLDocumentFactory):classMeta:model=PostDocumenttitle=factory.Faker("sentence",nb_words=4)# Build your test datacomments=CommentInnerDocFactory.create_batch(10)post=PostDocumentFactory(comments=comments)print(post.to_dict())The factory-boystrategiesare applied:post=PostDocumentFactory.build()# in-memory onlypost=PostDocumentFactory.create()# write to elastic clusterUsemeta_idarg to update an existing document:post=PostDocumentFactory(meta_id="999")assertpost.meta.id=="999"assertPostDocument.exists(id="999")post=PostDocumentFactory(meta_id="999",title="hello")assertPostDocument.get(id="999").title=="hello"Set optionstrip_unknown_fieldsto False to allow extra fields:classPostDocumentFactory(EDSLDocumentFactory):classMeta:model=PostDocumentstrip_unknown_fields=Falsepost=PostDocumentFactory(title="hello",extra_field="extra")assertdoc.title=="hello"assertdoc.extra_field=="extra"
Package: factory-boy-extra
Extra factories for factory_boyThis library contains 2 base factories.AsyncSQLAlchemyModelFactoryTortoiseModelFactoryTortoiseModelFactoryIs made to use it with tortoise-orm.UsageIt works aout of the box, if you have already initialized
tortoise-orm for testing.You can check how to do this intortoise docs.importfactoryfromtortoiseimportfields,modelsfromfactory_boy_extra.tortoise_factoryimportTortoiseModelFactoryclassTargetModel(models.Model):name=fields.CharField(max_length=200)classTargetModelFactory(TortoiseModelFactory):name=factory.Faker("word")classMeta:model=TargetModelThat's it. Now you can use it in your tests, E.G.@pytest.mark.asyncioasyncdeftest_factories():targets=TargetModelFactory.create_batch(10)actual_models=awaitTargetModel.all()assertlen(actual_models)==10AsyncSQLAlchemyModelFactoryUsageAt your conftest.py initialize your factories
with AsyncSession.@pytest.fixture(autouse=True)definit_factories(dbsession:AsyncSession)->None:"""Init factories."""BaseFactory.session=dbsessionThe dbsession factory can be obtained inpytest-async-sqlalchemylibrary,
or you can add it by yourself:importpytestfromsqlalchemy.ext.asyncioimportcreate_async_engine,AsyncSessionfromsqlalchemy.ormimportsessionmaker@pytest.fixture()asyncdefdbsession():"""Fixture that returns a SQLAlchemy session with a SAVEPOINT, and the rollback to itafter the test completes."""engine=create_async_engine(database_url)# You must provide your database URL.connection=awaitengine.connect()trans=awaitconnection.begin()Session=sessionmaker(connection,expire_on_commit=False,class_=AsyncSession)session=Session()try:yieldsessionfinally:awaitsession.close()awaittrans.rollback()awaitconnection.close()awaitengine.dispose()Now you can create factories and use them in your tests.fromfactory_boy_extra.async_sqlalchemy_factoryimportAsyncSQLAlchemyModelFactoryclassTargetModel(Base):__tablename__="targetmodel"name=Column(String(length=120),nullable=False)# noqa: WPS432classTargetModelFactory(AsyncSQLAlchemyModelFactory):name=factory.Faker("word")classMeta:model=TargetModelIn tests it wil look like this:importpytestfromsqlalchemy.ext.asyncioimportAsyncSessionfromsqlalchemyimportselect@pytest.mark.asyncioasyncdeftest_successful_notification(dbsession:AsyncSession)->None:TargetModelFactory.create_batch(10)actual_models=(awaitdbsession.execute(select(TargetModel))).fetchall()assertlen(actual_models)==10
Package: factory-djoy
Factory DjoyFactories for Django, creating valid model instances every time.Factory Djoy provides two simple classes,UserFactoryandCleanModelFactory, which wrap Factory Boy. They callfull_clean()when
creating Django model instances to ensure that only valid data enters your
Django database.CompatibilityFactory Djoy is compatible with:Django 2.2, 3.0 and 3.1Python 3 (3.7, 3.8, 3.9, 3.10, 3.11)Factory Boy version 2.11 or greater.ResourcesDocumentation on ReadTheDocsPackage on PyPISource code on GitHubLicensed on MITChangelog