Saravanan666/pypi-org huggingface dataset:
Package: midas-sbdata
MIDAS Simbench Data SimulatorDescriptionThis package contains a MIDAS module providing a simulator for Simbench data sets.Although this package is intended to be used with MIDAS, it does not depend from anything MIDAS-related except for themidas-utilpackage. You can use in any mosaik simulation scenario.InstallationThis package will usually installed automatically together withmidas-mosaik. It is available on pypi, so you can install it manually withpipinstallmidas-sbdataUsageThe complete documentation is available athttps://midas-mosaik.gitlab.io/midas.Inside of MIDASTo use the Simbench data inside of MIDAS, just addsbdatato your modulesmy_scenario:modules:-sbdata-...and configure it with:sbdata_params:my_grid_scope:step_size:900grid_name:my_grid_scopestart_date:2020-01-01 00:00:00+0100cos_phi:0.9filename:1-LV-rural3--0-sw.hdf5data_path:path/to/hdf-specified-by-filenameload_scaling:1.0load_mapping:defaultsgen_scaling:1.0sgen_mapping:defaultstorage_scaling:1.0storage_mapping:defaultinterpolate:Falserandomize_data:Falsenoise_factor:0.2randomize_cos_phi:Falseseed:~seed_max:1_000_000All of the attributes show their default values and can optionally be left out. Thexxx_mapping attributes can either bedefaultor a dictionary with a specific mapping. Whendefaultis used, the mapping defined in the powergrid profiles is used.LicenseThis software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.
Package: midas-sndata
MIDAS Smart Nord Data SimulatorDescriptionThis package contains a MIDAS module providing a simulator for the Smart Nord data set.Although this package is intended to be used with MIDAS, it does not depend from anything MIDAS-related except for themidas-utilpackage. You can use in any mosaik simulation scenario.InstallationThis package will usually installed automatically together withmidas-mosaik. It is available on pypi, so you can install it manually withpipinstallmidas-sndataUsageThe complete documentation is available athttps://midas-mosaik.gitlab.io/midas.Inside of MIDASTo use the powergrid inside of MIDAS, just addpowergridto your modulesmy_scenario:modules:-sndata-...and configure it with:sndata_params:my_grid_scope:step_size:900grid_name:my_grid_scopestart_date:2020-01-01 00:00:00+0100load_scaling:1.0household_mapping:{}land_mapping:{}cos_phi:0.9filename:SmartNordProfiles.hdf5data_path:path/to/hdf-specified-by-filenameinterpolate:Falserandomize_data:Falsenoise_factor:0.2randomize_cos_phi:Falseseed:~seed_max:1_000_000One of the mappings is required to create load models. All other attributes show their default values and can optionally be left out.LicenseThis software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.
Package: midas-store
MIDAS StoreDescriptionThis package contains a MIDAS module providing a database simulator. This works like most other collectors for mosaik, i.e., it accepts any number of inputs and stores them in a database file.Although this package is intended to be used with MIDAS, it does not depend from anything MIDAS-related except for themidas-utilpackage. You can use in any mosaik simulation scenario.InstallationThis package will usually installed automatically together withmidas-mosaik. It is available on pypi, so you can install it manually withpipinstallmidas-storeUsageThe complete documentation is available athttps://midas-mosaik.gitlab.io/midas.Inside of MIDASTo use the store inside of MIDAS, just addstoreto your modulesmy_scenario:modules:-store-...and configure it with (filenameis required, everything else is optional and can be left out if the default values, shown below, are used):store_params:filename:my_db.hdf5step_size:900overwrite:Falsebuffer_size:0All simulators that have something to store will then automatically connect to thestoresimulator.Any mosaik scenarioIf you don't use MIDAS, you can add thestoremanually to your mosaik scenario file. First, the entry in thesim_config:sim_config={"MidasHdf":{"python":"midas.modules.store:MidasHdf5"},# ...}Next, you need to start the simulator (assuming astep_sizeof 900):store_sim=world.start("MidasHdf",step_size=900)Finally, the model needs to be started:store=store_sim.Database(filename="path/to/my_db.hdf5",buffer_size=0,overwrite=False)Afterwards, you can defineworld.connect(other_entity, store, attrs)as you like.LicenseThis software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.
Package: midastest
Midas - Python Gold Testing ToolkitIf you're tired of writing assertions likeassert my_func('input') == 'output', just tellmidasyour inputs and it will automate all the rest!Installationpip install midastestUsageWrite a test using your favorite testing framework. You can use any framework as long as it'spytest:import midas

@midas.test(format='lines')
def test_length(line):
    return str(len(line))Create a filetest_length.inwith a few examples:Hello
Foo

What a wonderful worldRun your testing tool:pytest
# TODO: show complaining outputAfter inspecting the output, move it to a file calledtest_length.gold:mv test_length.actual test_length.goldRun your testing tool again:pytestIt succeeds!What happened is thattest_length.goldcontains the expected inputs and outputs of the tests, and running the tests compares actual outputs with expected outputs:cat test_length.gold
{
  "Hello": "'5'",
  "Foo": "'3'",
  "": "'0'",
  "What a wonderful world": "'22'"
}Try changing the code:import pytest

@midas.test(format='lines')
def test_length(line):
    return str(len(line) * 2)Runpytestagain and watch your tests fail:==================================================================== test session starts =====================================================================
platform darwin -- Python 3.8.9, pytest-7.0.1, pluggy-1.0.0
rootdir: /Users/aursaraf/dev/dojo/midas
collected 4 items                                                                                                                                            

tests/test_api.py FF.F                                                                                                                                 [100%]

[..]
__________________________________________________________ test_length[What a wonderful world-'22'] __________________________________________________________

[..]
expected = "'22'", actual = "'44'"

    def midas_assert(expected, actual):
>       assert expected == actual
E       AssertionError

midas/__init__.py:12: AssertionError
================================================================== short test summary info ===================================================================
FAILED tests/test_api.py::test_length[Hello-'5'] - AssertionError
FAILED tests/test_api.py::test_length[Foo-'3'] - AssertionError
FAILED tests/test_api.py::test_length[What a wonderful world-'22'] - AssertionError
================================================================ 3 failed, 1 passed in 0.03s =================================================================Licensemidasis distributed under the MIT license.
Package: midas-timesim
MIDAS Time SimulatorDescriptionThis package contains a MIDAStimesimmodule, which contains a simulator that tracks time and is able to manipulate it within the simulation.The intended use-case for the time simulator is to be used inside of MIDAS.
However, it only depends on themidas-utilpackage and be used in any mosaik simulation scenario.InstallationThis package will usually installed automatically together withmidas-mosaik. It is available on pypi, so you can install it manually withpipinstallmidas-timesimUsageThe complete documentation is available athttps://midas-mosaik.gitlab.io/midas.Inside of MIDASTo use the store inside of MIDAS, simply addtimesimto your modules:my_scenario:modules:-timesim# - ...This is sufficient for the timesim to run.
However, additional configuration is possible with:my_scenario:# ...timesim_params:start_date:2020-01-01 01:00:00+0100All of the core simulators that have support time inputs will then automatically connect to thetimesimsimulator.
The scopetimesimwill be created automatically but no other scopes are supported.Any Mosaik ScenarioIf you don't use MIDAS, you can add thetimesimmanually to your mosaik scenario file. First, the entry in thesim_config:sim_config={"TimeSimulator":{"python":"midas.modules.timesim:TimeSimulator"},# ...}Next, you need to start the simulator (assuming astep_sizeof 900):timesim_sim=world.start("TimeSimulator",step_size=900)Finally, the model needs to be started:timesim=timesim_sim.Timegenerator()Afterwards, you can defineworld.connect(timesim, other_entity, attrs)as you like.LicenseThis software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.
Package: midas-util
MIDAS UtilDescriptionThis package contains a set of utility functions that are used by other MIDAS packages. This includes the base data model and simulator that is used by most of the modules that are based on time used as well as the upgrade module base class.InstallationThis package will usually be installed automatically if you use any of the other MIDAS packages. However, you can install it manually from pypi withpipinstallmidas-utilor clone this repository and install directly from the source code.UsageSince this is a loose collection of functions and base classes, there is no general usage advice. If you want to use some of the functions, you should have a look at those functions. Most of them have at least a bit of documentation.Further documentation is available athttps://midas-mosaik.gitlab.io/midas.LicenseThis software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.
Package: midas-weather
MIDAS WeatherDescriptionThis package contains a Midas module providing a simulator for weather data.Although this package is intendet to be used with Midas, it does not depend on anything Midas-related except for themidas-utilpackage.
You can use it in any mosaik simulation scenario.InstallationThis package will usually be installed automatically together withmidas-mosaik.
It is available on pypi, you can install it manually withpipinstallmidas-weatherUsageThe complete documentation is available athttps://midas-mosaik.gitlab.io/midas.Inside of MidasTo use the weather data inside of Midas, addweatherto your modulesmy_scenario:modules:-weather-...and configure it withweather_params:my_weather_scope:weather_mapping:WeatherCurrent:-interpolate:truerandomize:trueIf a store module is enabled, the weather module will automatically send all outputs to the store.Any mosaik scenarioIf you don't use Midas, you can add theweathermanually to your mosaik scenario file.
First, the entry in thesim_config:sim_config={"WeatherData":{"python":"midas.modules.weather.simulator:WeatherDataSimulator"},# ...}Next, you need to definestart_dateandstep_size.
Thestart_dateis to be provided as ISO datestring and can anything between 2009 and 2022:start_date="2021-06-08 14:00:00+0000"Thestep_sizecan be anything between 1 and 3600.
Higher values might be possible, but this is untested.Now, the simulator can be started:weather_sim=world.start("WeatherData",step_size=900,start_date=start_date)Next, a weather data model can be started:weather_model=weather_sim.WeatherCurrent(interpolate=True,randomize=True)Finally, the model needs to be connected to other models:world.connect(weather_model,other_entity,"t_air_deg_celsius","wind_v_m_per_s")LicenseThis software is released under the GNU Lesser General Public License (LGPL). See the license file for more information about the details.
Package: midb
Mostly Invisible DatabaseA database access layer that acts like python in-memory objects.Disclaimer: Only minimal attempts have been made at speed. And mainly
intended for personal projects. Deeply nested data structures will
likely be slow.Example:>>>importmidb>>>root=midb.get_root('db_file.db')>>>root['test']=1>>>root['test2']={'test3':3}>>>exit()later ...>>>importmidb>>>root=midb.get_root('db_file.db')>>>root['test']1>>>root['test2']['test3']3>>>root['test2']PDict({'test3':3},_backend=SQLiteBackend(filename="db_file.db"),_id=1,_temp=None)>>>root['test2'].in_memory(){'test3':3}>>>exit()What's currently supported?Currently, the types that are supported are:Simple types:strNoneboolintfloatcomplexdatetime.datetimedatetime.datedatetime.timecontainer types (must not contain unsupported types)dict (silently converted to PDict)tuple (silently convert to PTuple)list (silently convert to PList)custom objects (see below for example)Custom objectsCustom objects are still not fully tested, but the basics have been
including property descriptors. Also, custom objects that are hashable may be used
as keys in dictionaries. The following has been tested and works.importmidb# define or import an class#   Note: subclassing midb.MemoryObject is not necessary but useful#         because it defines __repr__ and __eq__.classMyObj(midb.MemoryObject):def__init__(self,a_value,b_value):self.a=a_valueself.b=b_valuedefsome_other_method(self,input):self.methods_may_set=inputreturnf"{self.a},{self.b}"# define a persistent object with an _in_memory_class attribute set to the object you# want to have it emulate and decorate it with the @midb.setup_pobject decorator.@midb.setup_pobjectclassPMyObj(midb.PObject):_in_memory_class=MyObjWith those objects imported or defined:# first runroot=midb.get_root("filename.db")root['my object']=MyObj(1,2)print(root['my object'].a)print(root['my object'].b)print(root['my object'].some_other_method(3))print(root['my object'].methods_may_set)Later (also with the above classes defined or imported) ...root=midb.get_root("filename.db")print(root['my object'].a)print(root['my object'].b)print(root['my object'].some_other_method(4))print(root['my object'].methods_may_set)If you encounter any problems with the classes you have defined,
please file an issue athttps://gitlab.com/gossrock/midb/-/issues.Future:Support for and/or documentation of additional or custom serializers.More examples and documentationAdd support for other standard library classes that represent storable data.decimal.Decimal and fractions.Fractionset and frozensetcollections.namedtuple()/typing.NamedTuple and dataclasses.dataclasscolletions.OrderdDictenum.Enum and friendspathlib.PathAdd generic type annotation to collection types.BugsPlease report bugs athttps://gitlab.com/gossrock/midb/-/issues
Package: midbench
The Maryland Inverse Design Benchmark SuiteTheMaryland Inverse Design (MID) Benchmark Suiteis a set of libraries for running computational experiments on Machine Learning models forInverse Designacross a wide variety of domains and metrics. Its goal is to facilitate reproducible research in this area and help broaden the applicability of various ID algorithms across many applications by making it easy to run otherwise complex engineering design simulations using a common interface specification. It also provides a set of metrics that are relevant to different aspects of ID performance commonly used in research papers. In this way, if a researcher designs a new kind of ID algorithm, they will be able to use this repository to run a large set of tests across common examples of increasing range and complexity.You can read more about the library atits documentation website.
Package: middel
middel📜 Middle/Modern English Translator CLI - Written in Python...     ..      ..        .       ..          ..                        .. 
  x*8888x.:*8888: -"888:     @88>   dF          dF                    x .d88"  
 X   48888X `8888H  8888     %8P   '88bu.      '88bu.                  5888R   
X8x.  8888X  8888X  !888>     .    '*88888bu   '*88888bu        .u     '888R   
X8888 X8888  88888   "*8%-  .@88u    ^"*8888N    ^"*8888N    ud8888.    888R   
'*888!X8888> X8888  xH8>   ''888E`  beWE "888L  beWE "888L :888'8888.   888R   
  `?8 `8888  X888X X888>     888E   888E  888E  888E  888E d888 '88%"   888R   
  -^  '888"  X888  8888>     888E   888E  888E  888E  888E 8888.+"      888R   
   dx '88~x. !88~  8888>     888E   888E  888F  888E  888F 8888L        888R   
 .8888Xf.888x:!    X888X.:   888&  .888N..888  .888N..888  '8888c. .+  .888B . 
:""888":~"888"     `888*"    R888"  `"888*""    `"888*""    "88888%    ^*888%  
    "~'    "~        ""       ""       ""          ""         "YP'       "%
Package: middlebury-directory
A Python API for the Middlebury directory.fromdirectoryimportsearchsearch(email="dsilver@middlebury.edu")# [<Person 30972781062F9A6167A8D944F82CFD64>]Simple SearchPerform a simple keyword search.fromdirectoryimportsearchsearch("Dana Silver")# [<Person 30972781062F9A6167A8D944F82CFD64>]This is equivalent passing thequerykeyword argument:fromdirectoryimportsearchsearch(query="Dana Silver")# [<Person 30972781062F9A6167A8D944F82CFD64>]Advanced SearchPerform an advanced search with some or all of the available search fields:
first_name, last_name, email, phone, address, location, job_title, person_type,
department.You can’t perform a simple search and an advanced search in the same query.
Settingqueryand any of the other fields will fail validation.fromdirectoryimportsearchsearch(email="dsilver@middlebury.edu")# [<Person 30972781062F9A6167A8D944F82CFD64>]fromdirectoryimportsearchsearch(first_name="Dana",person_type="Faculty")# [<Person 90338E439DA4652A2BDE2AC3F327A563>]Advanced UsageFor raw access to validation and search fields, and control over when the HTTP
requests are sent, use the Search class. The Search class can be initialized
with any of the arguments to the search method.fromdirectoryimportSearch# Construct a search objectquery=Search('Dana Silver')# Validate the searchquery.validate()# Get the search fields (makes an HTTP request for form parameters)query.search_fields()# Get the search results (makes HTTP requests for the search results)query.results()
Package: middlestorm
IntroductionStormis a fast, small and powerful object-relational mapper.
Try it to use in web-aware applications.WSGI application mainly miltithreaded, but Store object isnot thread safe.Middlestorm middleware manage Store objects (one per thread) and add it intoenvirondictonary.Simple exampleThere are 3 ways to create middleware:classdecoratorPaste configurationClass middleware:from wsgiref.simple_server import make_server
from storm.database import create_database

from middlestorm import MiddleStorm

def storm_app(environ, start_response):
    store = environ['storm.store']
    # ...

db = create_database('postgres://user:password@host/base')
app = MiddleStorm(storm_app, db)

make_server('', 8000, app).serve_forever()Decorator middleware:from wsgiref.simple_server import make_server
from storm.database import create_database

import middlestorm

@middlestorm.decorator(create_database('postgres://user:password@host/base'))
def storm_app(environ, start_response):
    store = environ['storm.store']
    # ...

make_server('', 8000, storm_app).serve_forever()To create middleware via Paste configuration, add a stanza to the .ini
file:[filter:middlestorm]
use = middlestorm#middlestorm
db_uri = sqlite:myapp.dband then add that filter to the Paste pipeline (again, in the .ini file):[pipeline:main]
pipeline =
    middlestorm
    myappBy default Store placed in variablestorm.store. This can be customized:app = MiddleStorm(storm_app, db, key='custom.mystore')or decorator style:@middlestorm.decorator(db, key='custom.mystore')
def storm_app(environ, start_response):
    store = environ['custom.mystore']or in the Paste configuration:[filter:middlestorm]
use = middlestorm#middlestorm
db_uri = sqlite:myapp.db
key = myapp.storeLegalmiddlestorm distributed under terms ofGNU LGPL v.2.1.Copyright 2007 - presentVsevolod Balashov.LinksSource code ofmiddlestorm.
Arch LinuxPKGBUILD.
Package: middleware
Copyright (c) 2016 David BetzInstallationpip install middlewareCompatibilityPython 2 and 3PurposeMost everyone needs a concept of middleware.Following are examples of using this, seetest_middleware.pyfor
full examples.class AdditionMiddleware1(Middleware):
    def create(self):
        def func(mwa, context):
            try:
                counter = context['counter']
            except:
                counter = 0
            context['counter'] = counter + 1

            return next(mwa)

        return funcWhen using a class, add acreatefunction which returns a function.
This inner fuction accepts the middleware array and the data context and
returnsnext(mwa)to create a middleware chain.For this example, I’ll add two more:class AdditionMiddleware2(AdditionMiddleware1):
    pass


class AdditionMiddleware3(AdditionMiddleware2):
    passNow to run it. Usesetto set an array of middleware andaddto
add one to the array.setoverwrites everything. That’s just whatsetmeans.handler = Handler()
handler.set([AdditionMiddleware1, AdditionMiddleware2])
handler.add(AdditionMiddleware3)
handler.execute()

# handler['counter'] == 3In this case, there is no initial context and each of the three
middleware increment a counter ending withhandler['counter']== 3.You can skip the entire class stuff too:handler = Handler()
def inline(wma, context):
    context['myvalue'] = 12
handler.add(inline)
handler.execute()
# handler['myvalue'] == 12Use the following to send initial context:handler = Handler(counter=1)It’s actuallykwargs, so you can load it up:handler = Handler(**{'a': 1, 'b': 2})
def inline(wma, context):
    context['a'] = context['a'] + context['b']
handler.add(inline)
handler.execute()
Package: middleware-active-directory
`pip install middleware-active-directory`Requires `middleware_test`**Initialization**`active_directory_init` -- creates base ActiveDirectory class and record in db with system.You can override the common methods in class with own requests or use default ones.Platform: UNKNOWNClassifier: Development Status :: 3 - AlphaClassifier: Environment :: Web EnvironmentClassifier: Intended Audience :: DevelopersClassifier: License :: OSI Approved :: BSD LicenseClassifier: Operating System :: OS IndependentClassifier: Programming Language :: Python :: 2
Package: middleware-apm
Middleware's APM (Application Performance Monitoring) tool is a powerful solution that empowers developers to gain valuable insights into the performance and behavior of their Python applications.By installing the Middleware Host agent and integrating the APM package, developers can seamlessly monitor their applications and take advantage of various functionalities. The APM allows automatic collection of distributed tracing data, metrics, logs, and profiling information.You can follow ourdocumentationto install the Middleware Host agent and integrate the APM package with yourPythonapplication.